mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fixed a small crash
This commit is contained in:
1 parent
1945ce44ee
commit
f0013da56d
1 file changed
+13
-8
@@ -197,15 +197,20 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
||||
}
|
||||
else if(getState(stack) == ConfiguratorMode.ROTATE) //Rotate
|
||||
{
|
||||
List<EnumFacing> l = Arrays.asList(block.getValidRotations(world, pos));
|
||||
|
||||
if(!player.isSneaking() && l.contains(side))
|
||||
EnumFacing[] rotations = block.getValidRotations(world, pos);
|
||||
|
||||
if(rotations != null && rotations.length > 0)
|
||||
{
|
||||
block.rotateBlock(world, pos, side);
|
||||
}
|
||||
else if(player.isSneaking() && l.contains(side.getOpposite()))
|
||||
{
|
||||
block.rotateBlock(world, pos, side.getOpposite());
|
||||
List<EnumFacing> l = Arrays.asList(block.getValidRotations(world, pos));
|
||||
|
||||
if(!player.isSneaking() && l.contains(side))
|
||||
{
|
||||
block.rotateBlock(world, pos, side);
|
||||
}
|
||||
else if(player.isSneaking() && l.contains(side.getOpposite()))
|
||||
{
|
||||
block.rotateBlock(world, pos, side.getOpposite());
|
||||
}
|
||||
}
|
||||
|
||||
return EnumActionResult.SUCCESS;
|
||||
|
||||
Reference in new issue
Block a user