rotatorBlock can rotate hoppers, fixes #238
This commit is contained in:
1 parent
434dedc57d
commit
94ffd5b990
1 file changed
+9
-2
@@ -263,6 +263,15 @@ public class BlockRotator
|
|||||||
}
|
}
|
||||||
world.setBlockState(blockpos, iblockstate.with(HorizontalFacingBlock.FACING, face), 3);
|
world.setBlockState(blockpos, iblockstate.with(HorizontalFacingBlock.FACING, face), 3);
|
||||||
}
|
}
|
||||||
|
else if(block == Blocks.HOPPER )
|
||||||
|
{
|
||||||
|
Direction face = iblockstate.get(HopperBlock.FACING);
|
||||||
|
if (face != Direction.DOWN)
|
||||||
|
{
|
||||||
|
face = rotateClockwise(face, Direction.Axis.Y);
|
||||||
|
world.setBlockState(blockpos, iblockstate.with(HopperBlock.FACING, face), 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Send block update to the block that just have been rotated.
|
// Send block update to the block that just have been rotated.
|
||||||
world.updateNeighbor(blockpos, block, source.getBlockPos());
|
world.updateNeighbor(blockpos, block, source.getBlockPos());
|
||||||
|
|
||||||
@@ -270,8 +279,6 @@ public class BlockRotator
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static boolean flip_block(BlockState state, World world, PlayerEntity player, Hand hand, BlockHitResult hit)
|
public static boolean flip_block(BlockState state, World world, PlayerEntity player, Hand hand, BlockHitResult hit)
|
||||||
{
|
{
|
||||||
Block block = state.getBlock();
|
Block block = state.getBlock();
|
||||||
|
|||||||
Reference in new issue
Block a user