diff --git a/src/generated/resources/assets/create/models/item/cinder_flour.json b/src/generated/resources/assets/create/models/item/cinder_flour.json index 1b1110255..be3b38c30 100644 --- a/src/generated/resources/assets/create/models/item/cinder_flour.json +++ b/src/generated/resources/assets/create/models/item/cinder_flour.json @@ -1,5 +1,5 @@ { - "parent": "item/generated", + "parent": "minecraft:item/generated", "textures": { "layer0": "create:item/cinder_flour" } diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index a9dc134a7..c4026232e 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -36,7 +36,6 @@ import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; import mezz.jei.api.ingredients.IIngredientType; import mezz.jei.api.registration.IGuiHandlerRegistration; -import mezz.jei.api.registration.IModIngredientRegistration; import mezz.jei.api.registration.IRecipeCatalystRegistration; import mezz.jei.api.registration.IRecipeCategoryRegistration; import mezz.jei.api.registration.IRecipeRegistration; diff --git a/src/main/java/com/simibubi/create/compat/jei/DoubleItemIcon.java b/src/main/java/com/simibubi/create/compat/jei/DoubleItemIcon.java index a8ac25d4f..468b956a5 100644 --- a/src/main/java/com/simibubi/create/compat/jei/DoubleItemIcon.java +++ b/src/main/java/com/simibubi/create/compat/jei/DoubleItemIcon.java @@ -4,10 +4,9 @@ import java.util.function.Supplier; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; - import com.simibubi.create.foundation.gui.GuiGameElement; + import mezz.jei.api.gui.drawable.IDrawable; -import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.RenderHelper; import net.minecraft.item.ItemStack; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java index 07ea90b3e..9fd29db9b 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BasinCategory.java @@ -4,9 +4,9 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import com.mojang.blaze3d.matrix.MatrixStack; import org.apache.commons.lang3.mutable.MutableInt; +import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.contraptions.processing.BasinRecipe; import com.simibubi.create.content.contraptions.processing.HeatCondition; import com.simibubi.create.foundation.fluid.FluidIngredient; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java index 84cdaca01..c69434183 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java @@ -8,8 +8,8 @@ import com.simibubi.create.AllItems; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe; import com.simibubi.create.foundation.gui.AllGuiTextures; - import com.simibubi.create.foundation.gui.GuiGameElement; + import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; diff --git a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java index 4914a4a85..5eb3eeece 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/ProcessingViaFanCategory.java @@ -2,6 +2,8 @@ package com.simibubi.create.compat.jei.category; import java.util.Arrays; +import javax.annotation.Nullable; + import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlocks; @@ -17,8 +19,6 @@ import mezz.jei.api.ingredients.IIngredients; import net.minecraft.item.crafting.IRecipe; import net.minecraft.util.math.vector.Vector3f; -import javax.annotation.Nullable; - public abstract class ProcessingViaFanCategory> extends CreateRecipeCategory { public ProcessingViaFanCategory(String name, IDrawable icon) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/GeneratingKineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/GeneratingKineticTileEntity.java index 3e9b6bd25..055569bc7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/GeneratingKineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/GeneratingKineticTileEntity.java @@ -71,8 +71,8 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity { // FIXME add colours back // String stressString = spacing + "%s" + Lang.translate("generic.unit.stress").getUnformattedComponentText() + " %s"; - // tooltip.add(ITextComponent.of(String.format(stressString, IHaveGoggleInformation.format(stressBase), Lang.translate("gui.goggles.base_value").getUnformattedComponentText()))); - // tooltip.add(ITextComponent.of(String.format(stressString, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed").getUnformattedComponentText()))); + // tooltip.add(new StringTextComponent(String.format(stressString, IHaveGoggleInformation.format(stressBase), Lang.translate("gui.goggles.base_value").getUnformattedComponentText()))); + // tooltip.add(new StringTextComponent(String.format(stressString, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed").getUnformattedComponentText()))); tooltip.add(componentSpacing.copy().append(new StringTextComponent(IHaveGoggleInformation.format(stressBase)) .append(Lang.translate("generic.unit.stress")).append(" ").formatted(TextFormatting.AQUA)).append(Lang.translate("gui.goggles.base_value").formatted(TextFormatting.DARK_GRAY))); tooltip.add(componentSpacing.copy().append(new StringTextComponent(IHaveGoggleInformation.format(stressTotal)) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java index 21b36b8b8..88aea0fed 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/dispenser/MovedDefaultDispenseItemBehaviour.java @@ -1,7 +1,6 @@ package com.simibubi.create.content.contraptions.components.actors.dispenser; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; -import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.DispenserBlock; import net.minecraft.entity.item.ItemEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java index 75979acbf..c6f27147d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MechanicalMixerTileEntity.java @@ -10,7 +10,6 @@ import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.advancement.ITriggerable; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.item.SmartInventory; -import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; @@ -26,7 +25,6 @@ import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.vector.Vector3d; -import net.minecraftforge.fluids.FluidStack; public class MechanicalMixerTileEntity extends BasinOperatingTileEntity { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java index 9d38c2573..d560f6608 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java @@ -34,7 +34,6 @@ import net.minecraft.block.material.PushReaction; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; -import net.minecraft.entity.item.BoatEntity; import net.minecraft.entity.item.HangingEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.entity.item.minecart.FurnaceMinecartEntity; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java index e63c0c6b8..5c11f28cd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/train/capability/MinecartController.java @@ -8,8 +8,6 @@ import java.util.UUID; import javax.annotation.Nullable; -import com.simibubi.create.foundation.utility.NBTHelper; -import net.minecraft.util.math.vector.Vector3d; import org.apache.commons.lang3.mutable.MutableBoolean; import com.simibubi.create.Create; @@ -18,12 +16,14 @@ import com.simibubi.create.content.contraptions.components.structureMovement.tra import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Iterate; +import com.simibubi.create.foundation.utility.NBTHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.NBTUtil; +import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.INBTSerializable; diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java index 4d616c511..a170c9b1b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleConfigScreen.java @@ -23,7 +23,7 @@ public class GoggleConfigScreen extends AbstractSimiScreen { private final List tooltip; public GoggleConfigScreen() { - ITextComponent componentSpacing = ITextComponent.of(" "); + ITextComponent componentSpacing = new StringTextComponent(" "); tooltip = new ArrayList<>(); tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay1"))); tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay2").formatted(TextFormatting.GRAY))); diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java index 25dd3e328..39fce1002 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/IHaveGoggleInformation.java @@ -4,6 +4,7 @@ import java.text.DecimalFormat; import java.util.List; import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; /* * Implement this Interface in the TileEntity class that wants to add info to the screen @@ -12,7 +13,7 @@ public interface IHaveGoggleInformation { DecimalFormat decimalFormat = new DecimalFormat("#.##"); String spacing = " "; - ITextComponent componentSpacing = ITextComponent.of(spacing); + ITextComponent componentSpacing = new StringTextComponent(spacing); /** * this method will be called when looking at a TileEntity that implemented this interface diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerHandler.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerHandler.java index 85e847690..eb0f9b6e9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerHandler.java @@ -9,7 +9,7 @@ import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.vector.Vector3d; import net.minecraft.world.World; import net.minecraftforge.event.entity.ProjectileImpactEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -35,7 +35,7 @@ public class BlazeBurnerHandler { event.setCanceled(true); event.getThrowable() - .setMotion(Vec3d.ZERO); + .setMotion(Vector3d.ZERO); event.getThrowable() .remove(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/InstructionSpeedModifiers.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/InstructionSpeedModifiers.java index c67db6829..6835b54bf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/InstructionSpeedModifiers.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/InstructionSpeedModifiers.java @@ -6,6 +6,7 @@ import java.util.List; import com.simibubi.create.foundation.utility.Lang; import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public enum InstructionSpeedModifiers { @@ -23,7 +24,7 @@ public enum InstructionSpeedModifiers { value = modifier; } private InstructionSpeedModifiers(int modifier, String label) { - this.label = ITextComponent.of(label); + this.label = new StringTextComponent(label); translationKey = "gui.sequenced_gearshift.speed." + Lang.asId(name()); value = modifier; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java index 5ebd4fa50..cedb8ef4c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftScreen.java @@ -19,6 +19,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.ListNBT; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public class SequencedGearshiftScreen extends AbstractSimiScreen { @@ -142,7 +143,7 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen { if (def.hasValueParameter) { String text = def.formatValue(instruction.value); int stringWidth = textRenderer.getStringWidth(text); - label(matrixStack, 90 + (12 - stringWidth / 2), yOffset - 3, ITextComponent.of(text)); + label(matrixStack, 90 + (12 - stringWidth / 2), yOffset - 3, new StringTextComponent(text)); } if (def.hasSpeedParameter) label(matrixStack, 127, yOffset - 3, instruction.speedModifier.label); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeTileEntity.java index 20d6ab474..0f6399ea9 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/StressGaugeTileEntity.java @@ -71,7 +71,7 @@ public class StressGaugeTileEntity extends GaugeTileEntity { if (getTheoreticalSpeed() == 0) tooltip.add(new StringTextComponent(ItemDescription.makeProgressBar(3, -1)).append(Lang.translate("gui.stressometer.no_rotation")).formatted(TextFormatting.DARK_GRAY)); - // tooltip.add(ITextComponent.of(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1) + // tooltip.add(new StringTextComponent(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1) // + Lang.translate("gui.stressometer.no_rotation"))); else { tooltip.add(componentSpacing.copy().append(StressImpact.getFormattedStressText(stressFraction))); diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java index 89a85b2f1..be4ddb73a 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItemRenderer.java @@ -15,7 +15,6 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.vector.Quaternion; import net.minecraft.util.math.vector.Vector3f; public class SandPaperItemRenderer extends ItemStackTileEntityRenderer { diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java index 3efdf4429..ad8222d0d 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeTileEntity.java @@ -3,18 +3,18 @@ package com.simibubi.create.content.logistics.block.redstone; import java.util.List; import java.util.Optional; -import com.simibubi.create.foundation.item.TooltipHelper; -import net.minecraft.block.BlockState; import javax.annotation.Nullable; import com.google.gson.JsonElement; import com.google.gson.JsonParser; import com.mojang.brigadier.exceptions.CommandSyntaxException; +import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Pair; +import net.minecraft.block.BlockState; import net.minecraft.command.CommandSource; import net.minecraft.command.ICommandSource; import net.minecraft.entity.Entity; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchScreen.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchScreen.java index cb1bd6519..887050bd7 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchScreen.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchScreen.java @@ -58,7 +58,7 @@ public class StockpileSwitchScreen extends AbstractSimiScreen { offBelow = new ScrollInput(guiLeft + 113, guiTop + 69, 33, 14).withRange(0, 96) .titled(lowerLimit) .calling(state -> { - offBelowLabel.text = ITextComponent.of(state + "%"); + offBelowLabel.text = new StringTextComponent(state + "%"); lastModification = 0; if (onAbove.getState() - 4 <= state) { onAbove.setState(state + 5); @@ -72,7 +72,7 @@ public class StockpileSwitchScreen extends AbstractSimiScreen { onAbove = new ScrollInput(guiLeft + 113, guiTop + 52, 33, 14).withRange(5, 101) .titled(upperLimit) .calling(state -> { - onAboveLabel.text = ITextComponent.of(state + "%"); + onAboveLabel.text = new StringTextComponent(state + "%"); lastModification = 0; if (offBelow.getState() + 4 >= state) { offBelow.setState(state - 5); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java index fac3c5075..f65251ec1 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java @@ -74,7 +74,7 @@ public class FilterItem extends Item implements INamedContainerProvider { List makeSummary = makeSummary(stack); if (makeSummary.isEmpty()) return; - ItemDescription.add(tooltip, ITextComponent.of(" ")); + ItemDescription.add(tooltip, new StringTextComponent(" ")); ItemDescription.add(tooltip, makeSummary); } } diff --git a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java index b4ebcb6a2..e23e61d8b 100644 --- a/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java +++ b/src/main/java/com/simibubi/create/content/schematics/ClientSchematicLoader.java @@ -137,7 +137,7 @@ public class ClientSchematicLoader { if (Files.isDirectory(path)) return; - availableSchematics.add(ITextComponent.of(path.getFileName().toString())); + availableSchematics.add(new StringTextComponent(path.getFileName().toString())); }); } catch (NoSuchFileException e) { // No Schematics created yet diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java index cd52943a5..18ff9f986 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableScreen.java @@ -149,7 +149,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen { private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicPromptScreen.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicPromptScreen.java index 692c70f60..f9b85a07d 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicPromptScreen.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicPromptScreen.java @@ -1,6 +1,5 @@ package com.simibubi.create.content.schematics.client; -import com.simibubi.create.foundation.gui.GuiGameElement; import org.lwjgl.glfw.GLFW; import com.mojang.blaze3d.matrix.MatrixStack; @@ -9,6 +8,7 @@ import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllIcons; +import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.widgets.IconButton; import com.simibubi.create.foundation.utility.Lang; diff --git a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java index 78e6db517..b2fac7095 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java +++ b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java @@ -21,7 +21,13 @@ import net.minecraft.block.Blocks; import net.minecraft.block.FireBlock; import net.minecraft.block.FlowingFluidBlock; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.*; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.ItemRenderer; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.ItemCameraTransforms; import net.minecraft.client.renderer.texture.AtlasTexture; diff --git a/src/main/java/com/simibubi/create/foundation/gui/widgets/Label.java b/src/main/java/com/simibubi/create/foundation/gui/widgets/Label.java index db2e0d0ab..9784fecef 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/widgets/Label.java +++ b/src/main/java/com/simibubi/create/foundation/gui/widgets/Label.java @@ -19,7 +19,7 @@ public class Label extends AbstractSimiWidget { public Label(int x, int y, ITextComponent text) { super(x, y, Minecraft.getInstance().fontRenderer.getWidth(text), 10); font = Minecraft.getInstance().fontRenderer; - this.text = ITextComponent.of("Label"); + this.text = new StringTextComponent("Label"); color = 0xFFFFFF; hasShadow = false; suffix = ""; diff --git a/src/main/java/com/simibubi/create/foundation/gui/widgets/ScrollInput.java b/src/main/java/com/simibubi/create/foundation/gui/widgets/ScrollInput.java index f807661bf..146874bbf 100644 --- a/src/main/java/com/simibubi/create/foundation/gui/widgets/ScrollInput.java +++ b/src/main/java/com/simibubi/create/foundation/gui/widgets/ScrollInput.java @@ -9,6 +9,7 @@ import com.simibubi.create.foundation.utility.Lang; import net.minecraft.util.text.IFormattableTextComponent; import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TextFormatting; public class ScrollInput extends AbstractSimiWidget { @@ -131,7 +132,7 @@ public class ScrollInput extends AbstractSimiWidget { } protected void writeToLabel() { - displayLabel.text = ITextComponent.of(String.valueOf(state)); + displayLabel.text = new StringTextComponent(String.valueOf(state)); } protected void updateTooltip() { diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index 66aab2272..84ce82b5d 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -1,7 +1,22 @@ package com.simibubi.create.foundation.item; -import static com.simibubi.create.foundation.item.TooltipHelper.*; -import static net.minecraft.util.text.TextFormatting.*; +import static com.simibubi.create.foundation.item.TooltipHelper.cutStringTextComponent; +import static com.simibubi.create.foundation.item.TooltipHelper.cutTextComponent; +import static net.minecraft.util.text.TextFormatting.AQUA; +import static net.minecraft.util.text.TextFormatting.BLUE; +import static net.minecraft.util.text.TextFormatting.DARK_GRAY; +import static net.minecraft.util.text.TextFormatting.DARK_GREEN; +import static net.minecraft.util.text.TextFormatting.DARK_PURPLE; +import static net.minecraft.util.text.TextFormatting.DARK_RED; +import static net.minecraft.util.text.TextFormatting.GOLD; +import static net.minecraft.util.text.TextFormatting.GRAY; +import static net.minecraft.util.text.TextFormatting.GREEN; +import static net.minecraft.util.text.TextFormatting.ITALIC; +import static net.minecraft.util.text.TextFormatting.LIGHT_PURPLE; +import static net.minecraft.util.text.TextFormatting.RED; +import static net.minecraft.util.text.TextFormatting.STRIKETHROUGH; +import static net.minecraft.util.text.TextFormatting.WHITE; +import static net.minecraft.util.text.TextFormatting.YELLOW; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index 8260778b7..23e5acd17 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -2,7 +2,10 @@ package com.simibubi.create.foundation.item; import static net.minecraft.util.text.TextFormatting.DARK_GRAY; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import com.mojang.bridge.game.Language; @@ -23,7 +26,12 @@ import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.TieredItem; -import net.minecraft.util.text.*; +import net.minecraft.util.text.IFormattableTextComponent; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; +import net.minecraft.util.text.Style; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TextProcessing; public class TooltipHelper { @@ -84,7 +92,7 @@ public class TooltipHelper { } public static List cutStringTextComponent(String c, TextFormatting defaultColor, TextFormatting highlightColor) { - return cutTextComponent(ITextComponent.of(c), defaultColor, highlightColor, 0); + return cutTextComponent(new StringTextComponent(c), defaultColor, highlightColor, 0); } public static List cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor) { @@ -93,7 +101,7 @@ public class TooltipHelper { public static List cutStringTextComponent(String c, TextFormatting defaultColor, TextFormatting highlightColor, int indent) { - return cutTextComponent(ITextComponent.of(c), defaultColor, highlightColor, indent); + return cutTextComponent(new StringTextComponent(c), defaultColor, highlightColor, indent); } public static List cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor, @@ -194,7 +202,7 @@ public class TooltipHelper { // Summary if (I18n.hasKey(summaryKey)) - tooltip = tooltip.withSummary(ITextComponent.of(I18n.format(summaryKey))); + tooltip = tooltip.withSummary(new StringTextComponent(I18n.format(summaryKey))); // Requirements if (stack.getItem() instanceof BlockItem) { diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java index 564d440ba..618e26ced 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBox.java @@ -136,7 +136,7 @@ public class ValueBox extends ChasingAABBOutline { public void renderContents(MatrixStack ms, IRenderTypeBuffer buffer) { super.renderContents(ms, buffer); FontRenderer font = Minecraft.getInstance().fontRenderer; - ITextComponent countString = ITextComponent.of(count == 0 ? "*" : count + ""); + ITextComponent countString = new StringTextComponent(count == 0 ? "*" : count + ""); ms.translate(17.5f, -5f, 7f); boolean isFilter = stack.getItem() instanceof FilterItem; diff --git a/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java b/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java index 3800b4fb0..150b47aa5 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/NBTHelper.java @@ -5,6 +5,8 @@ import java.util.List; import java.util.function.Consumer; import java.util.function.Function; +import javax.annotation.Nonnull; + import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.FloatNBT; @@ -12,8 +14,6 @@ import net.minecraft.nbt.INBT; import net.minecraft.nbt.ListNBT; import net.minecraft.util.math.AxisAlignedBB; -import javax.annotation.Nonnull; - public class NBTHelper { public static void putMarker(CompoundNBT nbt, String marker) {