Fixed pipes being openable with a non-empty hand

Closes #23
This commit is contained in:
Ellpeck 2020-05-28 14:47:25 +02:00
parent 6de652761a
commit 8a7388ab57

View file

@ -83,10 +83,12 @@ public class PipeBlock extends ContainerBlock implements IPipeConnectable {
stack.shrink(1);
return ActionResultType.SUCCESS;
}
} else if (handIn == Hand.MAIN_HAND && stack.isEmpty()) {
if (!worldIn.isRemote)
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
return ActionResultType.SUCCESS;
}
if (!worldIn.isRemote)
NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos);
return ActionResultType.SUCCESS;
return ActionResultType.PASS;
}
@Override