Small improvements to the cables

This commit is contained in:
modmuss50 2017-06-29 17:19:34 +01:00
parent 5203ad5b01
commit 3e5f02ab4e
No known key found for this signature in database
GPG key ID: 203A5ED4D3E48BEA
3 changed files with 49 additions and 18 deletions

View file

@ -72,7 +72,7 @@ public class ItemWrench extends ItemTR {
public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos,
EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (!PermissionAPI.hasPermission(player.getGameProfile(), RebornPermissions.WRENCH_BLOCK, new BlockPosContext(player, pos, world.getBlockState(pos), facing))) {
return EnumActionResult.FAIL;
return EnumActionResult.PASS;
}
if (CompatManager.isIC2Loaded) {
EnumActionResult result = IC2WrenchHelper.onItemUse(player.getHeldItem(hand), player, world, pos, hand, facing, hitX, hitY, hitZ);
@ -81,11 +81,11 @@ public class ItemWrench extends ItemTR {
}
}
if (world.isAirBlock(pos)) {
return EnumActionResult.FAIL;
return EnumActionResult.PASS;
}
TileEntity tile = world.getTileEntity(pos);
if (tile == null) {
return EnumActionResult.FAIL;
return EnumActionResult.PASS;
}
if (!world.isRemote) {
if (player.isSneaking()) {
@ -151,9 +151,9 @@ public class ItemWrench extends ItemTR {
}
}
return EnumActionResult.FAIL;
return EnumActionResult.PASS;
} else {
return EnumActionResult.FAIL;
return EnumActionResult.PASS;
}
}