mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 03:43:30 +01:00
fixed pipes connecting too late
This commit is contained in:
parent
046637a1b5
commit
23462bbe00
1 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,7 @@ import net.minecraft.util.math.shapes.ISelectionContext;
|
|||
import net.minecraft.util.math.shapes.VoxelShape;
|
||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.network.NetworkHooks;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
@ -88,6 +89,14 @@ public class PipeBlock extends ContainerBlock {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) {
|
||||
ConnectionType type = getConnectionType((World) worldIn, currentPos, facing, stateIn);
|
||||
if (type != stateIn.get(DIRECTIONS.get(facing)))
|
||||
stateIn = stateIn.with(DIRECTIONS.get(facing), type);
|
||||
return stateIn;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||
|
|
Loading…
Reference in a new issue