diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java index ad803fe88..1732f3dcc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntity.java @@ -217,7 +217,7 @@ public abstract class KineticTileEntity extends SmartTileEntity // DO NOT READ kinetic information when placed after movement if (wasMoved) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); return; } @@ -237,7 +237,7 @@ public abstract class KineticTileEntity extends SmartTileEntity overStressed = capacity < stress && StressImpact.isEnabled(); } - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); if (clientPacket && overStressedBefore != overStressed && speed != 0) effects.triggerOverStressedEffect(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java index 3ca60c4e2..d19143009 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java @@ -225,7 +225,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); if (compound.contains("Entity") && !isFrozen() && !isOccupied()) { entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity")); this.searchForEntity = true; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleTileEntity.java index 4a3c9b2ed..8a82767cd 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/NozzleTileEntity.java @@ -51,7 +51,7 @@ public class NozzleTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); if (!clientPacket) return; range = compound.getFloat("Range"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java index 94dfc48d8..bf0b4b968 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutTileEntity.java @@ -169,7 +169,7 @@ public class SpoutTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); tank.readFromNBT(compound.getCompound("TankContent")); fluidLevel.readNBT(compound.getCompound("Level"), clientPacket); processingTicks = compound.getInt("ProcessingTicks"); diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankTileEntity.java index 0658fe787..864936f7d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/tank/FluidTankTileEntity.java @@ -278,7 +278,7 @@ public class FluidTankTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); BlockPos controllerBefore = controller; int prevSize = width; diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java index 7251db871..3e375230b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinTileEntity.java @@ -62,7 +62,7 @@ public class BasinTileEntity extends SmartTileEntity implements ITickableTileEnt @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); inputInventory.deserializeNBT(compound.getCompound("InputItems")); outputInventory.deserializeNBT(compound.getCompound("OutputItems")); if (compound.contains("fluids")) diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipeBuilder.java b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipeBuilder.java index d33278705..f8b307df7 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipeBuilder.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/ProcessingRecipeBuilder.java @@ -17,6 +17,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.Ingredient; +import net.minecraft.tags.ITag; import net.minecraft.tags.Tag; import net.minecraft.util.IItemProvider; import net.minecraft.util.NonNullList; @@ -103,7 +104,7 @@ public class ProcessingRecipeBuilder> { // Datagen shortcuts - public ProcessingRecipeBuilder require(Tag tag) { + public ProcessingRecipeBuilder require(ITag.INamedTag tag) { return require(Ingredient.fromTag(tag)); } @@ -120,7 +121,7 @@ public class ProcessingRecipeBuilder> { return require(FluidIngredient.fromFluid(fluid, amount)); } - public ProcessingRecipeBuilder require(Tag fluidTag, int amount) { + public ProcessingRecipeBuilder require(ITag.INamedTag fluidTag, int amount) { return require(FluidIngredient.fromTag(fluidTag, amount)); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerTileEntity.java index ce344136c..edd73e309 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerTileEntity.java @@ -165,7 +165,7 @@ public class BlazeBurnerTileEntity extends SmartTileEntity { protected void read(CompoundNBT compound, boolean clientPacket) { activeFuel = FuelType.values()[compound.getInt("fuelLevel")]; remainingBurnTime = compound.getInt("burnTimeRemaining"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } /** diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverTileEntity.java index b865c8fce..634980423 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverTileEntity.java @@ -81,7 +81,7 @@ public class BeltObserverTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { turnOffTicks = compound.getInt("TurnOff"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java index 768a34ad5..e8f3fd293 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java @@ -92,7 +92,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity { .target(0) .withSpeed(.05f)); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); if (!clientPacket) return; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java index 262b7f713..6d98befe5 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/chute/ChuteTileEntity.java @@ -476,7 +476,7 @@ public class ChuteTileEntity extends SmartTileEntity implements IHaveGoggleInfor pull = compound.getFloat("Pull"); push = compound.getFloat("Push"); bottomPullDistance = compound.getFloat("BottomAirFlowDistance"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); if (hasWorld() && world.isRemote && !previousItem.equals(item, false) && !item.isEmpty()) { if (world.rand.nextInt(3) != 0) diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotTileEntity.java index a71da8fb6..923c03fa6 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/DepotTileEntity.java @@ -110,7 +110,7 @@ public class DepotTileEntity extends SmartTileEntity { if (compound.contains("HeldItem")) heldItem = TransportedItemStack.read(compound.getCompound("HeldItem")); processingOutputBuffer.deserializeNBT(compound.getCompound("OutputBuffer")); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterTileEntity.java index 67a444c52..a73d333a4 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterTileEntity.java @@ -46,7 +46,7 @@ public class AdjustableRepeaterTileEntity extends SmartTileEntity { protected void read(CompoundNBT compound, boolean clientPacket) { state = compound.getInt("State"); charging = compound.getBoolean("Charging"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java index 513b93c3d..ea893752e 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java @@ -241,7 +241,7 @@ public class FunnelTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); extractionCooldown = compound.getInt("TransferCooldown"); if (clientPacket && compound.contains("Flap")) { int direction = compound.getInt("Flap"); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/inventories/AdjustableCrateTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/inventories/AdjustableCrateTileEntity.java index e2e7a2161..70126cbc8 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/inventories/AdjustableCrateTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/inventories/AdjustableCrateTileEntity.java @@ -153,7 +153,7 @@ public class AdjustableCrateTileEntity extends CrateTileEntity implements INamed protected void read(CompoundNBT compound, boolean clientPacket) { allowedAmount = compound.getInt("AllowedAmount"); inventory.deserializeNBT(compound.getCompound("Inventory")); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java index 09075f2dc..dd52d6141 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverTileEntity.java @@ -35,7 +35,7 @@ public class AnalogLeverTileEntity extends SmartTileEntity implements IHaveGoggl state = compound.getInt("State"); lastChange = compound.getInt("ChangeTimer"); clientState.target(state); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkTileEntity.java index 3dda8d012..67cddfe50 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkTileEntity.java @@ -75,7 +75,7 @@ public class RedstoneLinkTileEntity extends SmartTileEntity { @Override protected void read(CompoundNBT compound, boolean clientPacket) { transmitter = compound.getBoolean("Transmitter"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); receivedSignal = compound.getInt("Receive"); receivedSignalChanged = compound.getBoolean("ReceivedChanged"); diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchTileEntity.java index 165302045..b647f9c41 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchTileEntity.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/StockpileSwitchTileEntity.java @@ -42,7 +42,7 @@ public class StockpileSwitchTileEntity extends SmartTileEntity { currentLevel = compound.getFloat("Current"); powered = compound.getBoolean("Powered"); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } @Override diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java index d342f2b78..70afb82e9 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java @@ -196,7 +196,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC if (compound.contains("FlyingBlocks")) readFlyingBlocks(compound); - super.read(compound, clientPacket); + super.fromTag(compound, clientPacket); } protected void readFlyingBlocks(CompoundNBT compound) { diff --git a/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java b/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java index 61fc561f6..b8ed82197 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java @@ -13,6 +13,7 @@ import com.simibubi.create.Create; import net.minecraft.advancements.ICriterionTrigger; import net.minecraft.advancements.PlayerAdvancements; import net.minecraft.advancements.criterion.CriterionInstance; +import net.minecraft.advancements.criterion.EntityPredicate; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.util.ResourceLocation; @@ -73,8 +74,8 @@ public abstract class CriterionTriggerBase> suppliers); diff --git a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java index 230c93366..823a30710 100644 --- a/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java +++ b/src/main/java/com/simibubi/create/foundation/block/connected/CTModel.java @@ -92,7 +92,7 @@ public class CTModel extends BakedModelWrapper { continue; BakedQuad newQuad = new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length), - quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.shouldApplyDiffuseLighting()); + quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.hasShade()); VertexFormat format = DefaultVertexFormats.BLOCK; int[] vertexData = newQuad.getVertexData(); diff --git a/src/main/java/com/simibubi/create/foundation/block/render/ColoredVertexModel.java b/src/main/java/com/simibubi/create/foundation/block/render/ColoredVertexModel.java index f39a720b5..bbe9eca96 100644 --- a/src/main/java/com/simibubi/create/foundation/block/render/ColoredVertexModel.java +++ b/src/main/java/com/simibubi/create/foundation/block/render/ColoredVertexModel.java @@ -44,7 +44,7 @@ public class ColoredVertexModel extends BakedModelWrapper { for (int i = 0; i < quads.size(); i++) { BakedQuad quad = quads.get(i); BakedQuad newQuad = new BakedQuad(Arrays.copyOf(quad.getVertexData(), quad.getVertexData().length), - quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.shouldApplyDiffuseLighting()); + quad.getTintIndex(), quad.getFace(), quad.getSprite(), quad.hasShade()); VertexFormat format = DefaultVertexFormats.BLOCK; int[] vertexData = newQuad.getVertexData(); diff --git a/src/main/java/com/simibubi/create/foundation/block/render/CustomRenderedItemModelRenderer.java b/src/main/java/com/simibubi/create/foundation/block/render/CustomRenderedItemModelRenderer.java index 41c4820d7..40e20a5a3 100644 --- a/src/main/java/com/simibubi/create/foundation/block/render/CustomRenderedItemModelRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/block/render/CustomRenderedItemModelRenderer.java @@ -5,6 +5,7 @@ import com.simibubi.create.foundation.item.PartialItemModelRenderer; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.model.ItemCameraTransforms; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; import net.minecraft.item.ItemStack; @@ -12,7 +13,7 @@ public class CustomRenderedItemModelRenderer @Override @SuppressWarnings("unchecked") - public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + public void render(ItemStack stack, ItemCameraTransforms.TransformType p_239207_2_, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { M mainModel = ((M) Minecraft.getInstance() .getItemRenderer() .getItemModelWithOverrides(stack, null, null)); diff --git a/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java b/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java index d82d9e7df..1badf0b3c 100644 --- a/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java @@ -42,11 +42,11 @@ public class KillTPSCommand { } return 1; - }).then(Commands.argument(Lang.translate("command.killTPSCommand.argument.tickTime"), + }).then(Commands.argument(Lang.translate("command.killTPSCommand.argument.tickTime").getUnformattedComponentText(), IntegerArgumentType.integer(1)).executes(ctx -> { // killtps start tickTime int tickTime = IntegerArgumentType.getInteger(ctx, - Lang.translate("command.killTPSCommand.argument.tickTime")); + Lang.translate("command.killTPSCommand.argument.tickTime").getUnformattedComponentText()); Create.lagger.setTickTime(tickTime); Create.lagger.setLagging(true); ctx.getSource().sendFeedback((Lang.createTranslationTextComponent( diff --git a/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java b/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java index 22ba2e61e..61fd7e20e 100644 --- a/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java +++ b/src/main/java/com/simibubi/create/foundation/data/recipe/CreateRecipeProvider.java @@ -13,7 +13,7 @@ import net.minecraft.data.DataGenerator; import net.minecraft.data.IFinishedRecipe; import net.minecraft.data.RecipeProvider; import net.minecraft.item.Item; -import net.minecraft.tags.Tag; +import net.minecraft.tags.ITag; import net.minecraft.util.IItemProvider; import net.minecraftforge.common.Tags; @@ -46,19 +46,19 @@ public abstract class CreateRecipeProvider extends RecipeProvider { protected static class I { - static Tag redstone() { + static ITag.INamedTag redstone() { return Tags.Items.DUSTS_REDSTONE; } - static Tag gold() { + static ITag.INamedTag gold() { return AllTags.forgeItemTag("ingots/gold"); } - static Tag goldSheet() { + static ITag.INamedTag goldSheet() { return AllTags.forgeItemTag("plates/gold"); } - static Tag stone() { + static ITag.INamedTag stone() { return Tags.Items.STONE; } @@ -78,23 +78,23 @@ public abstract class CreateRecipeProvider extends RecipeProvider { return AllBlocks.ANDESITE_CASING.get(); } - static Tag brass() { + static ITag.INamedTag brass() { return AllTags.forgeItemTag("ingots/brass"); } - static Tag brassSheet() { + static ITag.INamedTag brassSheet() { return AllTags.forgeItemTag("plates/brass"); } - static Tag iron() { + static ITag.INamedTag iron() { return Tags.Items.INGOTS_IRON; } - static Tag zinc() { + static ITag.INamedTag zinc() { return AllTags.forgeItemTag("ingots/zinc"); } - static Tag ironSheet() { + static ITag.INamedTag ironSheet() { return AllTags.forgeItemTag("plates/iron"); } @@ -110,35 +110,35 @@ public abstract class CreateRecipeProvider extends RecipeProvider { return AllItems.INTEGRATED_CIRCUIT.get(); } - static Tag copperBlock() { + static ITag.INamedTag copperBlock() { return AllTags.forgeItemTag("storage_blocks/copper"); } - static Tag brassBlock() { + static ITag.INamedTag brassBlock() { return AllTags.forgeItemTag("storage_blocks/brass"); } - static Tag zincBlock() { + static ITag.INamedTag zincBlock() { return AllTags.forgeItemTag("storage_blocks/zinc"); } - static Tag copper() { + static ITag.INamedTag copper() { return AllTags.forgeItemTag("ingots/copper"); } - static Tag copperSheet() { + static ITag.INamedTag copperSheet() { return AllTags.forgeItemTag("plates/copper"); } - static Tag copperNugget() { + static ITag.INamedTag copperNugget() { return AllTags.forgeItemTag("nuggets/copper"); } - static Tag brassNugget() { + static ITag.INamedTag brassNugget() { return AllTags.forgeItemTag("nuggets/brass"); } - static Tag zincNugget() { + static ITag.INamedTag zincNugget() { return AllTags.forgeItemTag("nuggets/zinc"); } diff --git a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java index 6e097a0e4..ecd5d45ab 100644 --- a/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java +++ b/src/main/java/com/simibubi/create/foundation/fluid/FluidIngredient.java @@ -14,6 +14,7 @@ import net.minecraft.fluid.Fluid; import net.minecraft.nbt.CompoundNBT; import net.minecraft.network.PacketBuffer; import net.minecraft.tags.FluidTags; +import net.minecraft.tags.ITag; import net.minecraft.tags.Tag; import net.minecraft.util.JSONUtils; import net.minecraft.util.ResourceLocation; @@ -23,7 +24,7 @@ public abstract class FluidIngredient implements Predicate { public static final FluidIngredient EMPTY = new FluidStackIngredient(); - public static FluidIngredient fromTag(Tag tag, int amount) { + public static FluidIngredient fromTag(ITag.INamedTag tag, int amount) { FluidTagIngredient ingredient = new FluidTagIngredient(); ingredient.tag = tag; ingredient.amountRequired = amount; @@ -158,7 +159,7 @@ public abstract class FluidIngredient implements Predicate { public static class FluidTagIngredient extends FluidIngredient { - protected Tag tag; + protected ITag.INamedTag tag; @Override protected boolean testInternal(FluidStack t) { @@ -169,7 +170,7 @@ public abstract class FluidIngredient implements Predicate { @Override protected void readInternal(PacketBuffer buffer) { ResourceLocation resourcelocation = buffer.readResourceLocation(); - tag = FluidTags.getContainer() + tag = FluidTags.func_226157_a_() .get(resourcelocation); } @@ -181,7 +182,7 @@ public abstract class FluidIngredient implements Predicate { @Override protected void readInternal(JsonObject json) { ResourceLocation id = new ResourceLocation(JSONUtils.getString(json, "fluidTag")); - tag = FluidTags.getContainer() + tag = FluidTags.func_226157_a_() .get(id); if (tag == null) throw new JsonSyntaxException("Unknown fluid tag '" + id + "'"); diff --git a/src/main/java/com/simibubi/create/foundation/item/WipScription.java b/src/main/java/com/simibubi/create/foundation/item/WipScription.java index 224af7f48..4fbd9768c 100644 --- a/src/main/java/com/simibubi/create/foundation/item/WipScription.java +++ b/src/main/java/com/simibubi/create/foundation/item/WipScription.java @@ -14,7 +14,7 @@ public class WipScription extends ItemDescription { public WipScription(Palette palette) { super(palette); - add(getLines(), TextFormatting.RED + Lang.translate("tooltip.workInProgress")); + add(getLines(), Lang.translate("tooltip.workInProgress").formatted(TextFormatting.RED)); int descriptions = 0; while (I18n.hasKey("create.tooltip.randomWipDescription" + descriptions++)) @@ -22,7 +22,7 @@ public class WipScription extends ItemDescription { if (--descriptions > 0) { int index = new Random().nextInt(descriptions); - String translate = Lang.translate("tooltip.randomWipDescription" + index); + ITextComponent translate = Lang.translate("tooltip.randomWipDescription" + index); add(getLines(), TooltipHelper.cutString(translate, TextFormatting.DARK_RED, TextFormatting.DARK_RED)); } } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/SmartTileEntity.java b/src/main/java/com/simibubi/create/foundation/tileEntity/SmartTileEntity.java index bb1a42cdc..6864fd7c6 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/SmartTileEntity.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/SmartTileEntity.java @@ -8,6 +8,7 @@ import java.util.function.Consumer; import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType; +import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.tileentity.TileEntityType; @@ -75,26 +76,26 @@ public abstract class SmartTileEntity extends SyncedTileEntity implements ITicka } @Override - public final void readClientUpdate(CompoundNBT tag) { - read(tag, true); + public final void readClientUpdate(BlockState state, CompoundNBT tag) { + fromTag(state, tag, true); } @Override - public final void read(CompoundNBT tag) { - read(tag, false); + public final void fromTag(BlockState state, CompoundNBT tag) { + fromTag(state, tag, false); } /** * Hook only these in future subclasses of STE */ - protected void read(CompoundNBT compound, boolean clientPacket) { + protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) { if (firstNbtRead) { firstNbtRead = false; ArrayList list = new ArrayList<>(); addBehavioursDeferred(list); list.forEach(b -> behaviours.put(b.getType(), b)); } - super.read(compound); + super.fromTag(state, compound); behaviours.values() .forEach(tb -> tb.read(compound, clientPacket)); } 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 02bce8463..d98ce4678 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 @@ -18,13 +18,15 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.IFormattableTextComponent; import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public class ValueBox extends ChasingAABBOutline { protected ITextComponent label = ITextComponent.of("Value Box"); protected ITextComponent sublabel = ITextComponent.of(""); - protected String scrollTooltip = ""; + protected ITextComponent scrollTooltip = StringTextComponent.EMPTY; protected Vector3d labelOffset = Vector3d.ZERO; protected int passiveColor; @@ -57,7 +59,7 @@ public class ValueBox extends ChasingAABBOutline { return this; } - public ValueBox scrollTooltip(String scrollTip) { + public ValueBox scrollTooltip(ITextComponent scrollTip) { this.scrollTooltip = scrollTip; return this; } @@ -108,7 +110,7 @@ public class ValueBox extends ChasingAABBOutline { ms.translate(0, 10, 0); renderHoveringText(ms, buffer, sublabel); } - if (!scrollTooltip.isEmpty()) { + if (!scrollTooltip.getUnformattedComponentText().isEmpty()) { ms.translate(0, 10, 0); renderHoveringText(ms, buffer, scrollTooltip, 0x998899, 0x111111); } @@ -125,7 +127,7 @@ public class ValueBox extends ChasingAABBOutline { ItemStack stack; int count; - public ItemValueBox(String label, AxisAlignedBB bb, BlockPos pos, ItemStack stack, int count) { + public ItemValueBox(ITextComponent label, AxisAlignedBB bb, BlockPos pos, ItemStack stack, int count) { super(label, bb, pos); this.stack = stack; this.count = count; @@ -135,13 +137,13 @@ public class ValueBox extends ChasingAABBOutline { public void renderContents(MatrixStack ms, IRenderTypeBuffer buffer) { super.renderContents(ms, buffer); FontRenderer font = Minecraft.getInstance().fontRenderer; - String countString = count == 0 ? "*" : count + ""; + ITextComponent countString = ITextComponent.of(count == 0 ? "*" : count + ""); ms.translate(17.5f, -5f, 7f); boolean isFilter = stack.getItem() instanceof FilterItem; boolean isEmpty = stack.isEmpty(); float scale = 1.5f; - ms.translate(-font.getStringWidth(countString), 0, 0); + ms.translate(-font.getWidth(countString), 0, 0); if (isFilter) ms.translate(3, 8, 7.25f); @@ -194,7 +196,7 @@ public class ValueBox extends ChasingAABBOutline { public static class IconValueBox extends ValueBox { AllIcons icon; - public IconValueBox(String label, INamedIconOptions iconValue, AxisAlignedBB bb, BlockPos pos) { + public IconValueBox(ITextComponent label, INamedIconOptions iconValue, AxisAlignedBB bb, BlockPos pos) { super(label, bb, pos); subLabel(Lang.translate(iconValue.getTranslationKey())); icon = iconValue.getIcon(); diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxTransform.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxTransform.java index 1c9f3169d..f73f150b7 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxTransform.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/ValueBoxTransform.java @@ -2,6 +2,7 @@ package com.simibubi.create.foundation.tileEntity.behaviour; import java.util.function.Function; +import com.simibubi.create.foundation.utility.BlockHelper; import org.apache.commons.lang3.tuple.Pair; import com.mojang.blaze3d.matrix.MatrixStack; @@ -46,9 +47,9 @@ public abstract class ValueBoxTransform { protected Vector3d rotateHorizontally(BlockState state, Vector3d vec) { float yRot = 0; - if (state.has(BlockStateProperties.FACING)) + if (BlockHelper.hasBlockStateProperty(state, BlockStateProperties.FACING)) yRot = AngleHelper.horizontalAngle(state.get(BlockStateProperties.FACING)); - if (state.has(BlockStateProperties.HORIZONTAL_FACING)) + if (BlockHelper.hasBlockStateProperty(state, BlockStateProperties.HORIZONTAL_FACING)) yRot = AngleHelper.horizontalAngle(state.get(BlockStateProperties.HORIZONTAL_FACING)); return VecHelper.rotateCentered(vec, yRot, Axis.Y); } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionHandler.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionHandler.java index 81c6db155..a0ee70745 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionHandler.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionHandler.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; +import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.RaycastHelper; import net.minecraft.block.Block; @@ -61,14 +62,14 @@ public class EdgeInteractionHandler { public static List getConnectiveSides(World world, BlockPos pos, Direction face, EdgeInteractionBehaviour behaviour) { List sides = new ArrayList<>(6); - if (Block.hasSolidSide(world.getBlockState(pos.offset(face)), world, pos.offset(face), face.getOpposite())) + if (BlockHelper.hasBlockSolidSide(world.getBlockState(pos.offset(face)), world, pos.offset(face), face.getOpposite())) return sides; for (Direction direction : Direction.values()) { if (direction.getAxis() == face.getAxis()) continue; BlockPos neighbourPos = pos.offset(direction); - if (Block.hasSolidSide(world.getBlockState(neighbourPos.offset(face)), world, neighbourPos.offset(face), + if (BlockHelper.hasBlockSolidSide(world.getBlockState(neighbourPos.offset(face)), world, neighbourPos.offset(face), face.getOpposite())) continue; if (!behaviour.connectivityPredicate.test(world, pos, face, direction)) diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionRenderer.java index 9d1cfa357..87ddf3a7a 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/edgeInteraction/EdgeInteractionRenderer.java @@ -19,6 +19,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.StringTextComponent; public class EdgeInteractionRenderer { @@ -63,7 +64,7 @@ public class EdgeInteractionRenderer { AxisAlignedBB bb = EdgeInteractionHandler.getBB(pos, closestEdge); boolean hit = bb.contains(target.getHitVec()); - ValueBox box = new ValueBox("", bb.offset(-pos.getX(), -pos.getY(), -pos.getZ()), pos); + ValueBox box = new ValueBox(StringTextComponent.EMPTY, bb.offset(-pos.getX(), -pos.getY(), -pos.getZ()), pos); Vector3d textOffset = Vector3d.ZERO; boolean positive = closestEdge.getAxisDirection() == AxisDirection.POSITIVE; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringRenderer.java index 1532041d8..fac2c18ec 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/filtering/FilteringRenderer.java @@ -26,6 +26,9 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.IFormattableTextComponent; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.StringTextComponent; public class FilteringRenderer { @@ -60,7 +63,7 @@ public class FilteringRenderer { ItemStack filter = behaviour.getFilter(); boolean isFilterSlotted = filter.getItem() instanceof FilterItem; boolean showCount = behaviour.isCountVisible(); - String label = isFilterSlotted ? "" + ITextComponent label = isFilterSlotted ? StringTextComponent.EMPTY : Lang.translate(behaviour.recipeFilter ? "logistics.recipe_filter" : "logistics.filter"); boolean hit = behaviour.slotPositioning.testHit(state, target.getHitVec() .subtract(Vector3d.of(pos))); @@ -73,7 +76,7 @@ public class FilteringRenderer { box.offsetLabel(behaviour.textShift) .withColors(0x7A6A2C, 0xB79D64) - .scrollTooltip(showCount ? "[" + Lang.translate("action.scroll") + "]" : "") + .scrollTooltip(ITextComponent.of(showCount ? "[" + Lang.translate("action.scroll").getUnformattedComponentText() + "]" : "")) .passive(!hit); CreateClient.outliner.showValueBox(Pair.of("filter", pos), box.transform(behaviour.slotPositioning)) diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java index e8ca01bb1..703f8f608 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/inventory/InvManipulationBehaviour.java @@ -12,6 +12,7 @@ import com.simibubi.create.foundation.tileEntity.behaviour.BehaviourType; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.utility.BlockFace; +import com.simibubi.create.foundation.utility.BlockHelper; import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.state.properties.BlockStateProperties; @@ -173,13 +174,13 @@ public class InvManipulationBehaviour extends TileEntityBehaviour { public interface InterfaceProvider { public static InterfaceProvider towardBlockFacing() { - return (w, p, s) -> new BlockFace(p, s.has(BlockStateProperties.FACING) ? s.get(BlockStateProperties.FACING) + return (w, p, s) -> new BlockFace(p, BlockHelper.hasBlockStateProperty(s, BlockStateProperties.FACING) ? s.get(BlockStateProperties.FACING) : s.get(BlockStateProperties.HORIZONTAL_FACING)); } public static InterfaceProvider oppositeOfBlockFacing() { return (w, p, s) -> new BlockFace(p, - (s.has(BlockStateProperties.FACING) ? s.get(BlockStateProperties.FACING) + (BlockHelper.hasBlockStateProperty(s, BlockStateProperties.FACING) ? s.get(BlockStateProperties.FACING) : s.get(BlockStateProperties.HORIZONTAL_FACING)).getOpposite()); } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkRenderer.java index 8a0a52664..6ebd59da6 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/linked/LinkRenderer.java @@ -21,6 +21,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.vector.Vector3d; +import net.minecraft.util.text.ITextComponent; public class LinkRenderer { @@ -38,12 +39,12 @@ public class LinkRenderer { if (behaviour == null) return; - String freq1 = Lang.translate("logistics.firstFrequency"); - String freq2 = Lang.translate("logistics.secondFrequency"); + ITextComponent freq1 = Lang.translate("logistics.firstFrequency"); + ITextComponent freq2 = Lang.translate("logistics.secondFrequency"); for (boolean first : Iterate.trueAndFalse) { AxisAlignedBB bb = new AxisAlignedBB(Vector3d.ZERO, Vector3d.ZERO).grow(.25f); - String label = first ? freq2 : freq1; + ITextComponent label = first ? freq2 : freq1; boolean hit = behaviour.testHit(first, target.getHitVec()); ValueBoxTransform transform = first ? behaviour.firstSlot : behaviour.secondSlot; diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/BulkScrollValueBehaviour.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/BulkScrollValueBehaviour.java index 70cca31c8..7a4dc7936 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/BulkScrollValueBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/BulkScrollValueBehaviour.java @@ -5,13 +5,14 @@ import java.util.function.Function; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBoxTransform; +import net.minecraft.util.text.ITextComponent; public class BulkScrollValueBehaviour extends ScrollValueBehaviour { Function> groupGetter; - public BulkScrollValueBehaviour(String label, SmartTileEntity te, ValueBoxTransform slot, - Function> groupGetter) { + public BulkScrollValueBehaviour(ITextComponent label, SmartTileEntity te, ValueBoxTransform slot, + Function> groupGetter) { super(label, te, slot); this.groupGetter = groupGetter; } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java index 116b4aee4..cd3079937 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java @@ -64,10 +64,10 @@ public class ScrollValueRenderer { } else { box = new TextValueBox(label, bb, pos, behaviour.formatValue()); if (behaviour.unit != null) - box.subLabel("(" + behaviour.unit.apply(behaviour.scrollableValue) + ")"); + box.subLabel(ITextComponent.of("(" + behaviour.unit.apply(behaviour.scrollableValue) + ")")); } - box.scrollTooltip("[" + Lang.translate("action.scroll") + "]"); + box.scrollTooltip(ITextComponent.of("[" + Lang.translate("action.scroll").getUnformattedComponentText() + "]")); box.offsetLabel(behaviour.textShift.add(20, -10, 0)) .withColors(0x5A5D5A, 0xB5B7B6) .passive(!highlight); diff --git a/src/main/java/com/simibubi/create/foundation/utility/DyeHelper.java b/src/main/java/com/simibubi/create/foundation/utility/DyeHelper.java index c64ab8f68..9378a2bbd 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/DyeHelper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/DyeHelper.java @@ -47,7 +47,7 @@ public class DyeHelper { } } - public static Tag getTagOfDye(DyeColor color) { + public static Tags.IOptionalNamedTag getTagOfDye(DyeColor color) { switch (color) { case BLACK: return Tags.Items.DYES_BLACK; diff --git a/src/main/java/com/simibubi/create/foundation/utility/TreeCutter.java b/src/main/java/com/simibubi/create/foundation/utility/TreeCutter.java index 5849c8625..de338f851 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/TreeCutter.java +++ b/src/main/java/com/simibubi/create/foundation/utility/TreeCutter.java @@ -208,7 +208,7 @@ public class TreeCutter { } private static boolean isLeaf(BlockState state) { - return state.has(LeavesBlock.DISTANCE); + return BlockHelper.hasBlockStateProperty(state, LeavesBlock.DISTANCE); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/VoxelShaper.java b/src/main/java/com/simibubi/create/foundation/utility/VoxelShaper.java index f673f5d1b..588e62adf 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/VoxelShaper.java +++ b/src/main/java/com/simibubi/create/foundation/utility/VoxelShaper.java @@ -7,8 +7,6 @@ import java.util.function.Function; import org.apache.commons.lang3.mutable.MutableObject; -import com.simibubi.create.content.contraptions.relays.belt.Vector3i; - import net.minecraft.block.Block; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java b/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java index 994d58a02..089fca8c5 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/AllWorldFeatures.java @@ -54,7 +54,7 @@ public enum AllWorldFeatures { for (AllWorldFeatures entry : AllWorldFeatures.values()) { for (Biome biome : ForgeRegistries.BIOMES) { - if (biome == Biomes.THE_VOID) + if (biome.getRegistryName() == Biomes.THE_VOID.getRegistryName()) continue; if (biome == Biomes.NETHER) continue; diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/OreFeature.java b/src/main/java/com/simibubi/create/foundation/worldgen/OreFeature.java index 77064a594..30ee3f7da 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/OreFeature.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/OreFeature.java @@ -66,7 +66,7 @@ public abstract class OreFeature extends ConfigBase Pair, T> placement = getPlacement(); ConfiguredFeature createdFeature = Feature.ORE - .configure(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, block.get() + .configure(new OreFeatureConfig(OreFeatureConfig.FillerBlockType.BASE_STONE_OVERWORLD, block.get() .getDefaultState(), clusterSize.get())) .createDecoratedFeature(placement.getKey() .configure(placement.getValue())); diff --git a/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java b/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java index bf3594f7e..e46e8f609 100644 --- a/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java +++ b/src/main/java/com/simibubi/create/foundation/worldgen/OxidizingBlock.java @@ -54,7 +54,7 @@ public class OxidizingBlock extends Block { if (!worldIn.isBlockPresent(neighbourPos)) continue; BlockState neighborState = worldIn.getBlockState(neighbourPos); - if (neighborState.func_235903_d_(OXIDIZATION).map(ox -> ox != 0).orElse(false)) { + if (BlockHelper.hasBlockStateProperty(neighborState, OXIDIZATION) && neighborState.get(OXIDIZATION) != 0) { neighbors.add(neighborState.get(OXIDIZATION)); } if (BlockHelper.hasBlockSolidSide(neighborState, worldIn, neighbourPos, facing.getOpposite())) {