Port recent Changes

This commit is contained in:
simibubi 2020-12-19 13:25:54 +01:00
parent 164dae700d
commit ea26ed8a01
4 changed files with 21 additions and 21 deletions

View file

@ -207,8 +207,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "true", "axis": "x",
"axis": "x" "sticky_east": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -217,8 +217,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "true", "axis": "y",
"axis": "y" "sticky_east": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky", "model": "create:block/radial_chassis_side_y_sticky",
@ -227,8 +227,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "true", "axis": "z",
"axis": "z" "sticky_east": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_z_sticky" "model": "create:block/radial_chassis_side_z_sticky"
@ -236,8 +236,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "false", "axis": "x",
"axis": "x" "sticky_east": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -246,8 +246,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "false", "axis": "y",
"axis": "y" "sticky_east": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y", "model": "create:block/radial_chassis_side_y",
@ -256,8 +256,8 @@
}, },
{ {
"when": { "when": {
"sticky_east": "false", "axis": "z",
"axis": "z" "sticky_east": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_z" "model": "create:block/radial_chassis_side_z"

View file

@ -118,7 +118,7 @@ public class AllTags {
NO_INFINITE_DRAINING NO_INFINITE_DRAINING
; ;
public Tag<Fluid> tag; public ITag.INamedTag<Fluid> tag;
private AllFluidTags() { private AllFluidTags() {
this(MOD, ""); this(MOD, "");
@ -129,8 +129,8 @@ public class AllTags {
} }
private AllFluidTags(NameSpace namespace, String path) { private AllFluidTags(NameSpace namespace, String path) {
tag = new FluidTags.Wrapper( tag = FluidTags.makeWrapperTag(
new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name()))); new ResourceLocation(namespace.id, (path.isEmpty() ? "" : path + "/") + Lang.asId(name())).toString());
} }
public boolean matches(Fluid fluid) { public boolean matches(Fluid fluid) {

View file

@ -1,13 +1,15 @@
package com.simibubi.create.content.contraptions.fluids.pipes; package com.simibubi.create.content.contraptions.fluids.pipes;
import javax.annotation.ParametersAreNonnullByDefault;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import mcp.MethodsReturnNonnullByDefault; import mcp.MethodsReturnNonnullByDefault;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.IWaterLoggable; import net.minecraft.block.IWaterLoggable;
import net.minecraft.fluid.FluidState;
import net.minecraft.fluid.Fluids; import net.minecraft.fluid.Fluids;
import net.minecraft.fluid.IFluidState;
import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemUseContext; import net.minecraft.item.ItemUseContext;
import net.minecraft.state.BooleanProperty; import net.minecraft.state.BooleanProperty;
@ -19,8 +21,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.ParametersAreNonnullByDefault;
@MethodsReturnNonnullByDefault @MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault @ParametersAreNonnullByDefault
@ -62,7 +62,7 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable
@Override @Override
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
IFluidState ifluidstate = context.getWorld() FluidState ifluidstate = context.getWorld()
.getFluidState(context.getPos()); .getFluidState(context.getPos());
BlockState state = super.getStateForPlacement(context); BlockState state = super.getStateForPlacement(context);
return state == null ? null : state.with(BlockStateProperties.WATERLOGGED, return state == null ? null : state.with(BlockStateProperties.WATERLOGGED,
@ -70,7 +70,7 @@ public class GlassFluidPipeBlock extends AxisPipeBlock implements IWaterLoggable
} }
@Override @Override
public IFluidState getFluidState(BlockState state) { public FluidState getFluidState(BlockState state) {
return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) return state.get(BlockStateProperties.WATERLOGGED) ? Fluids.WATER.getStillFluidState(false)
: Fluids.EMPTY.getDefaultState(); : Fluids.EMPTY.getDefaultState();
} }

View file

@ -35,7 +35,7 @@ public class StraightPipeTileEntity extends SmartTileEntity {
@Override @Override
public boolean canHaveFlowToward(BlockState state, Direction direction) { 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 @Override