From ea26ed8a010eb8c478c6accc4452c982e7c47eaf Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 19 Dec 2020 13:25:54 +0100 Subject: [PATCH] Port recent Changes --- .../create/blockstates/radial_chassis.json | 24 +++++++++---------- .../java/com/simibubi/create/AllTags.java | 6 ++--- .../fluids/pipes/GlassFluidPipeBlock.java | 10 ++++---- .../fluids/pipes/StraightPipeTileEntity.java | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/generated/resources/assets/create/blockstates/radial_chassis.json b/src/generated/resources/assets/create/blockstates/radial_chassis.json index 49576633e..410cb13c7 100644 --- a/src/generated/resources/assets/create/blockstates/radial_chassis.json +++ b/src/generated/resources/assets/create/blockstates/radial_chassis.json @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/radial_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/radial_chassis_side_z" diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java index 86e431bac..b71b7dcf7 100644 --- a/src/main/java/com/simibubi/create/AllTags.java +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -118,7 +118,7 @@ public class AllTags { NO_INFINITE_DRAINING ; - public Tag tag; + public ITag.INamedTag tag; private AllFluidTags() { this(MOD, ""); @@ -129,8 +129,8 @@ public class AllTags { } private AllFluidTags(NameSpace namespace, String path) { - tag = new FluidTags.Wrapper( - new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name()))); + tag = FluidTags.makeWrapperTag( + new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())).toString()); } public boolean matches(Fluid fluid) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java index 2dbe5debb..4f297285a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/GlassFluidPipeBlock.java @@ -1,13 +1,15 @@ package com.simibubi.create.content.contraptions.fluids.pipes; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllTileEntities; import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.IWaterLoggable; +import net.minecraft.fluid.FluidState; import net.minecraft.fluid.Fluids; -import net.minecraft.fluid.IFluidState; import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemUseContext; import net.minecraft.state.BooleanProperty; @@ -19,8 +21,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -import javax.annotation.ParametersAreNonnullByDefault; - @MethodsReturnNonnullByDefault @ParametersAreNonnullByDefault @@ -62,7 +62,7 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable @Override public BlockState getStateForPlacement(BlockItemUseContext context) { - IFluidState ifluidstate = context.getWorld() + FluidState ifluidstate = context.getWorld() .getFluidState(context.getPos()); BlockState state = super.getStateForPlacement(context); return state == null ? null : state.with(BlockStateProperties.WATERLOGGED, @@ -70,7 +70,7 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable } @Override - public IFluidState getFluidState(BlockState state) { + public FluidState getFluidState(BlockState state) { return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) : Fluids.EMPTY.getDefaultState(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java index f846fc6a9..6b886ede3 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/StraightPipeTileEntity.java @@ -35,7 +35,7 @@ public class StraightPipeTileEntity extends SmartTileEntity { @Override public boolean canHaveFlowToward(BlockState state, Direction direction) { - return state.has(AxisPipeBlock.AXIS) && state.get(AxisPipeBlock.AXIS) == direction.getAxis(); + return state.contains(AxisPipeBlock.AXIS) && state.get(AxisPipeBlock.AXIS) == direction.getAxis(); } @Override