Port Changes to 1.16, Fix server launch

This commit is contained in:
simibubi 2020-10-12 22:16:06 +02:00
parent cbeb5dc649
commit 442d89e09e
32 changed files with 74 additions and 47 deletions

View file

@ -1,5 +1,5 @@
{ {
"parent": "item/generated", "parent": "minecraft:item/generated",
"textures": { "textures": {
"layer0": "create:item/cinder_flour" "layer0": "create:item/cinder_flour"
} }

View file

@ -36,7 +36,6 @@ import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin; import mezz.jei.api.JeiPlugin;
import mezz.jei.api.ingredients.IIngredientType; import mezz.jei.api.ingredients.IIngredientType;
import mezz.jei.api.registration.IGuiHandlerRegistration; import mezz.jei.api.registration.IGuiHandlerRegistration;
import mezz.jei.api.registration.IModIngredientRegistration;
import mezz.jei.api.registration.IRecipeCatalystRegistration; import mezz.jei.api.registration.IRecipeCatalystRegistration;
import mezz.jei.api.registration.IRecipeCategoryRegistration; import mezz.jei.api.registration.IRecipeCategoryRegistration;
import mezz.jei.api.registration.IRecipeRegistration; import mezz.jei.api.registration.IRecipeRegistration;

View file

@ -4,10 +4,9 @@ import java.util.function.Supplier;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import mezz.jei.api.gui.drawable.IDrawable; import mezz.jei.api.gui.drawable.IDrawable;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;

View file

@ -4,9 +4,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.mojang.blaze3d.matrix.MatrixStack;
import org.apache.commons.lang3.mutable.MutableInt; 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.BasinRecipe;
import com.simibubi.create.content.contraptions.processing.HeatCondition; import com.simibubi.create.content.contraptions.processing.HeatCondition;
import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.fluid.FluidIngredient;

View file

@ -8,8 +8,8 @@ import com.simibubi.create.AllItems;
import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.contraptions.processing.ProcessingOutput;
import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe; import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.gui.GuiGameElement; import com.simibubi.create.foundation.gui.GuiGameElement;
import mezz.jei.api.constants.VanillaTypes; import mezz.jei.api.constants.VanillaTypes;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;

View file

@ -2,6 +2,8 @@ package com.simibubi.create.compat.jei.category;
import java.util.Arrays; import java.util.Arrays;
import javax.annotation.Nullable;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials; import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
@ -17,8 +19,6 @@ import mezz.jei.api.ingredients.IIngredients;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.math.vector.Vector3f; import net.minecraft.util.math.vector.Vector3f;
import javax.annotation.Nullable;
public abstract class ProcessingViaFanCategory<T extends IRecipe<?>> extends CreateRecipeCategory<T> { public abstract class ProcessingViaFanCategory<T extends IRecipe<?>> extends CreateRecipeCategory<T> {
public ProcessingViaFanCategory(String name, IDrawable icon) { public ProcessingViaFanCategory(String name, IDrawable icon) {

View file

@ -71,8 +71,8 @@ public abstract class GeneratingKineticTileEntity extends KineticTileEntity {
// FIXME add colours back // FIXME add colours back
// String stressString = spacing + "%s" + Lang.translate("generic.unit.stress").getUnformattedComponentText() + " %s"; // 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(new StringTextComponent(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(stressTotal), Lang.translate("gui.goggles.at_current_speed").getUnformattedComponentText())));
tooltip.add(componentSpacing.copy().append(new StringTextComponent(IHaveGoggleInformation.format(stressBase)) 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))); .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)) tooltip.add(componentSpacing.copy().append(new StringTextComponent(IHaveGoggleInformation.format(stressTotal))

View file

@ -1,7 +1,6 @@
package com.simibubi.create.content.contraptions.components.actors.dispenser; package com.simibubi.create.content.contraptions.components.actors.dispenser;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.DispenserBlock; import net.minecraft.block.DispenserBlock;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;

View file

@ -10,7 +10,6 @@ import com.simibubi.create.foundation.advancement.AllTriggers;
import com.simibubi.create.foundation.advancement.ITriggerable; import com.simibubi.create.foundation.advancement.ITriggerable;
import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.item.SmartInventory; import com.simibubi.create.foundation.item.SmartInventory;
import com.simibubi.create.foundation.utility.BlockHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.block.BlockState; 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.AxisAlignedBB;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.fluids.FluidStack;
public class MechanicalMixerTileEntity extends BasinOperatingTileEntity { public class MechanicalMixerTileEntity extends BasinOperatingTileEntity {

View file

@ -34,7 +34,6 @@ import net.minecraft.block.material.PushReaction;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraft.entity.item.BoatEntity;
import net.minecraft.entity.item.HangingEntity; import net.minecraft.entity.item.HangingEntity;
import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
import net.minecraft.entity.item.minecart.FurnaceMinecartEntity; import net.minecraft.entity.item.minecart.FurnaceMinecartEntity;

View file

@ -8,8 +8,6 @@ import java.util.UUID;
import javax.annotation.Nullable; 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 org.apache.commons.lang3.mutable.MutableBoolean;
import com.simibubi.create.Create; 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.networking.AllPackets;
import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Iterate; import com.simibubi.create.foundation.utility.Iterate;
import com.simibubi.create.foundation.utility.NBTHelper;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.item.minecart.AbstractMinecartEntity; import net.minecraft.entity.item.minecart.AbstractMinecartEntity;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.NBTUtil; import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants.NBT; import net.minecraftforge.common.util.Constants.NBT;
import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.INBTSerializable;

View file

@ -23,7 +23,7 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
private final List<ITextComponent> tooltip; private final List<ITextComponent> tooltip;
public GoggleConfigScreen() { public GoggleConfigScreen() {
ITextComponent componentSpacing = ITextComponent.of(" "); ITextComponent componentSpacing = new StringTextComponent(" ");
tooltip = new ArrayList<>(); tooltip = new ArrayList<>();
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay1"))); tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay1")));
tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay2").formatted(TextFormatting.GRAY))); tooltip.add(componentSpacing.copy().append(Lang.translate("gui.config.overlay2").formatted(TextFormatting.GRAY)));

View file

@ -4,6 +4,7 @@ import java.text.DecimalFormat;
import java.util.List; import java.util.List;
import net.minecraft.util.text.ITextComponent; 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 * 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("#.##"); DecimalFormat decimalFormat = new DecimalFormat("#.##");
String spacing = " "; 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 * this method will be called when looking at a TileEntity that implemented this interface

View file

@ -9,7 +9,7 @@ import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult; 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.minecraft.world.World;
import net.minecraftforge.event.entity.ProjectileImpactEvent; import net.minecraftforge.event.entity.ProjectileImpactEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
@ -35,7 +35,7 @@ public class BlazeBurnerHandler {
event.setCanceled(true); event.setCanceled(true);
event.getThrowable() event.getThrowable()
.setMotion(Vec3d.ZERO); .setMotion(Vector3d.ZERO);
event.getThrowable() event.getThrowable()
.remove(); .remove();

View file

@ -6,6 +6,7 @@ import java.util.List;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
public enum InstructionSpeedModifiers { public enum InstructionSpeedModifiers {
@ -23,7 +24,7 @@ public enum InstructionSpeedModifiers {
value = modifier; value = modifier;
} }
private InstructionSpeedModifiers(int modifier, String label) { private InstructionSpeedModifiers(int modifier, String label) {
this.label = ITextComponent.of(label); this.label = new StringTextComponent(label);
translationKey = "gui.sequenced_gearshift.speed." + Lang.asId(name()); translationKey = "gui.sequenced_gearshift.speed." + Lang.asId(name());
value = modifier; value = modifier;
} }

View file

@ -19,6 +19,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.ListNBT; import net.minecraft.nbt.ListNBT;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
public class SequencedGearshiftScreen extends AbstractSimiScreen { public class SequencedGearshiftScreen extends AbstractSimiScreen {
@ -142,7 +143,7 @@ public class SequencedGearshiftScreen extends AbstractSimiScreen {
if (def.hasValueParameter) { if (def.hasValueParameter) {
String text = def.formatValue(instruction.value); String text = def.formatValue(instruction.value);
int stringWidth = textRenderer.getStringWidth(text); 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) if (def.hasSpeedParameter)
label(matrixStack, 127, yOffset - 3, instruction.speedModifier.label); label(matrixStack, 127, yOffset - 3, instruction.speedModifier.label);

View file

@ -71,7 +71,7 @@ public class StressGaugeTileEntity extends GaugeTileEntity {
if (getTheoreticalSpeed() == 0) if (getTheoreticalSpeed() == 0)
tooltip.add(new StringTextComponent(ItemDescription.makeProgressBar(3, -1)).append(Lang.translate("gui.stressometer.no_rotation")).formatted(TextFormatting.DARK_GRAY)); 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"))); // + Lang.translate("gui.stressometer.no_rotation")));
else { else {
tooltip.add(componentSpacing.copy().append(StressImpact.getFormattedStressText(stressFraction))); tooltip.add(componentSpacing.copy().append(StressImpact.getFormattedStressText(stressFraction)));

View file

@ -15,7 +15,6 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Quaternion;
import net.minecraft.util.math.vector.Vector3f; import net.minecraft.util.math.vector.Vector3f;
public class SandPaperItemRenderer extends ItemStackTileEntityRenderer { public class SandPaperItemRenderer extends ItemStackTileEntityRenderer {

View file

@ -3,18 +3,18 @@ package com.simibubi.create.content.logistics.block.redstone;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import com.simibubi.create.foundation.item.TooltipHelper;
import net.minecraft.block.BlockState;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import com.mojang.brigadier.exceptions.CommandSyntaxException; 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.SmartTileEntity;
import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour;
import com.simibubi.create.foundation.utility.Couple; import com.simibubi.create.foundation.utility.Couple;
import com.simibubi.create.foundation.utility.Pair; import com.simibubi.create.foundation.utility.Pair;
import net.minecraft.block.BlockState;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.ICommandSource; import net.minecraft.command.ICommandSource;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;

View file

@ -58,7 +58,7 @@ public class StockpileSwitchScreen extends AbstractSimiScreen {
offBelow = new ScrollInput(guiLeft + 113, guiTop + 69, 33, 14).withRange(0, 96) offBelow = new ScrollInput(guiLeft + 113, guiTop + 69, 33, 14).withRange(0, 96)
.titled(lowerLimit) .titled(lowerLimit)
.calling(state -> { .calling(state -> {
offBelowLabel.text = ITextComponent.of(state + "%"); offBelowLabel.text = new StringTextComponent(state + "%");
lastModification = 0; lastModification = 0;
if (onAbove.getState() - 4 <= state) { if (onAbove.getState() - 4 <= state) {
onAbove.setState(state + 5); 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) onAbove = new ScrollInput(guiLeft + 113, guiTop + 52, 33, 14).withRange(5, 101)
.titled(upperLimit) .titled(upperLimit)
.calling(state -> { .calling(state -> {
onAboveLabel.text = ITextComponent.of(state + "%"); onAboveLabel.text = new StringTextComponent(state + "%");
lastModification = 0; lastModification = 0;
if (offBelow.getState() + 4 >= state) { if (offBelow.getState() + 4 >= state) {
offBelow.setState(state - 5); offBelow.setState(state - 5);

View file

@ -74,7 +74,7 @@ public class FilterItem extends Item implements INamedContainerProvider {
List<ITextComponent> makeSummary = makeSummary(stack); List<ITextComponent> makeSummary = makeSummary(stack);
if (makeSummary.isEmpty()) if (makeSummary.isEmpty())
return; return;
ItemDescription.add(tooltip, ITextComponent.of(" ")); ItemDescription.add(tooltip, new StringTextComponent(" "));
ItemDescription.add(tooltip, makeSummary); ItemDescription.add(tooltip, makeSummary);
} }
} }

View file

@ -137,7 +137,7 @@ public class ClientSchematicLoader {
if (Files.isDirectory(path)) if (Files.isDirectory(path))
return; return;
availableSchematics.add(ITextComponent.of(path.getFileName().toString())); availableSchematics.add(new StringTextComponent(path.getFileName().toString()));
}); });
} catch (NoSuchFileException e) { } catch (NoSuchFileException e) {
// No Schematics created yet // No Schematics created yet

View file

@ -149,7 +149,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
if (schematicsLabel != null) { if (schematicsLabel != null) {
schematicsLabel.colored(0xCCDDFF); schematicsLabel.colored(0xCCDDFF);
schematicsLabel.text = ITextComponent.of(container.getTileEntity().uploadingSchematic); schematicsLabel.text = new StringTextComponent(container.getTileEntity().uploadingSchematic);
} }
if (schematicsArea != null) if (schematicsArea != null)
schematicsArea.visible = false; schematicsArea.visible = false;

View file

@ -1,5 +1,7 @@
package com.simibubi.create.content.schematics.block; package com.simibubi.create.content.schematics.block;
import static net.minecraft.util.text.TextFormatting.BLUE;
import static net.minecraft.util.text.TextFormatting.DARK_PURPLE;
import static net.minecraft.util.text.TextFormatting.GRAY; import static net.minecraft.util.text.TextFormatting.GRAY;
import java.util.ArrayList; import java.util.ArrayList;
@ -23,6 +25,7 @@ import com.simibubi.create.foundation.item.ItemDescription.Palette;
import com.simibubi.create.foundation.item.TooltipHelper; import com.simibubi.create.foundation.item.TooltipHelper;
import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.networking.AllPackets;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.Widget; import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.renderer.Rectangle2d; import net.minecraft.client.renderer.Rectangle2d;
@ -32,8 +35,6 @@ import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.util.text.TranslationTextComponent;
import static net.minecraft.util.text.TextFormatting.*;
public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> { public class SchematicannonScreen extends AbstractSimiContainerScreen<SchematicannonContainer> {
private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM; private static final AllGuiTextures BG_BOTTOM = AllGuiTextures.SCHEMATICANNON_BOTTOM;

View file

@ -1,6 +1,5 @@
package com.simibubi.create.content.schematics.client; package com.simibubi.create.content.schematics.client;
import com.simibubi.create.foundation.gui.GuiGameElement;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
import com.mojang.blaze3d.matrix.MatrixStack; 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.AbstractSimiScreen;
import com.simibubi.create.foundation.gui.AllGuiTextures; import com.simibubi.create.foundation.gui.AllGuiTextures;
import com.simibubi.create.foundation.gui.AllIcons; 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.gui.widgets.IconButton;
import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.Lang;

View file

@ -21,7 +21,13 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.FireBlock; import net.minecraft.block.FireBlock;
import net.minecraft.block.FlowingFluidBlock; import net.minecraft.block.FlowingFluidBlock;
import net.minecraft.client.Minecraft; 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.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms; import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.texture.AtlasTexture; import net.minecraft.client.renderer.texture.AtlasTexture;

View file

@ -19,7 +19,7 @@ public class Label extends AbstractSimiWidget {
public Label(int x, int y, ITextComponent text) { public Label(int x, int y, ITextComponent text) {
super(x, y, Minecraft.getInstance().fontRenderer.getWidth(text), 10); super(x, y, Minecraft.getInstance().fontRenderer.getWidth(text), 10);
font = Minecraft.getInstance().fontRenderer; font = Minecraft.getInstance().fontRenderer;
this.text = ITextComponent.of("Label"); this.text = new StringTextComponent("Label");
color = 0xFFFFFF; color = 0xFFFFFF;
hasShadow = false; hasShadow = false;
suffix = ""; suffix = "";

View file

@ -9,6 +9,7 @@ import com.simibubi.create.foundation.utility.Lang;
import net.minecraft.util.text.IFormattableTextComponent; import net.minecraft.util.text.IFormattableTextComponent;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
public class ScrollInput extends AbstractSimiWidget { public class ScrollInput extends AbstractSimiWidget {
@ -131,7 +132,7 @@ public class ScrollInput extends AbstractSimiWidget {
} }
protected void writeToLabel() { protected void writeToLabel() {
displayLabel.text = ITextComponent.of(String.valueOf(state)); displayLabel.text = new StringTextComponent(String.valueOf(state));
} }
protected void updateTooltip() { protected void updateTooltip() {

View file

@ -1,7 +1,22 @@
package com.simibubi.create.foundation.item; package com.simibubi.create.foundation.item;
import static com.simibubi.create.foundation.item.TooltipHelper.*; import static com.simibubi.create.foundation.item.TooltipHelper.cutStringTextComponent;
import static net.minecraft.util.text.TextFormatting.*; 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.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View file

@ -2,7 +2,10 @@ package com.simibubi.create.foundation.item;
import static net.minecraft.util.text.TextFormatting.DARK_GRAY; 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 java.util.concurrent.atomic.AtomicInteger;
import com.mojang.bridge.game.Language; import com.mojang.bridge.game.Language;
@ -23,7 +26,12 @@ import net.minecraft.item.BlockItem;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.TieredItem; 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 { public class TooltipHelper {
@ -84,7 +92,7 @@ public class TooltipHelper {
} }
public static List<ITextComponent> cutStringTextComponent(String c, TextFormatting defaultColor, TextFormatting highlightColor) { public static List<ITextComponent> 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<ITextComponent> cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor) { public static List<ITextComponent> cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor) {
@ -93,7 +101,7 @@ public class TooltipHelper {
public static List<ITextComponent> cutStringTextComponent(String c, TextFormatting defaultColor, TextFormatting highlightColor, public static List<ITextComponent> cutStringTextComponent(String c, TextFormatting defaultColor, TextFormatting highlightColor,
int indent) { int indent) {
return cutTextComponent(ITextComponent.of(c), defaultColor, highlightColor, indent); return cutTextComponent(new StringTextComponent(c), defaultColor, highlightColor, indent);
} }
public static List<ITextComponent> cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor, public static List<ITextComponent> cutTextComponent(ITextComponent c, TextFormatting defaultColor, TextFormatting highlightColor,
@ -194,7 +202,7 @@ public class TooltipHelper {
// Summary // Summary
if (I18n.hasKey(summaryKey)) if (I18n.hasKey(summaryKey))
tooltip = tooltip.withSummary(ITextComponent.of(I18n.format(summaryKey))); tooltip = tooltip.withSummary(new StringTextComponent(I18n.format(summaryKey)));
// Requirements // Requirements
if (stack.getItem() instanceof BlockItem) { if (stack.getItem() instanceof BlockItem) {

View file

@ -136,7 +136,7 @@ public class ValueBox extends ChasingAABBOutline {
public void renderContents(MatrixStack ms, IRenderTypeBuffer buffer) { public void renderContents(MatrixStack ms, IRenderTypeBuffer buffer) {
super.renderContents(ms, buffer); super.renderContents(ms, buffer);
FontRenderer font = Minecraft.getInstance().fontRenderer; 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); ms.translate(17.5f, -5f, 7f);
boolean isFilter = stack.getItem() instanceof FilterItem; boolean isFilter = stack.getItem() instanceof FilterItem;

View file

@ -5,6 +5,8 @@ import java.util.List;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import javax.annotation.Nonnull;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.FloatNBT; import net.minecraft.nbt.FloatNBT;
@ -12,8 +14,6 @@ import net.minecraft.nbt.INBT;
import net.minecraft.nbt.ListNBT; import net.minecraft.nbt.ListNBT;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import javax.annotation.Nonnull;
public class NBTHelper { public class NBTHelper {
public static void putMarker(CompoundNBT nbt, String marker) { public static void putMarker(CompoundNBT nbt, String marker) {