Fix wrench rotation handling

This commit is contained in:
mezz committed 2016-06-15 16:26:57 -07:00
1 parent bedb7ffe85
commit 6a62024dd4
2 files changed
+5 -5

No files matched your search

@@ -27,10 +27,10 @@ public class ItemWrench extends ItemForestry {//implements IToolWrench {
}
@Override
public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand) {
Block block = world.getBlockState(pos).getBlock();
if (block.rotateBlock(world, pos, side)) {
player.swingArm(hand);
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
Block block = worldIn.getBlockState(pos).getBlock();
if (block.rotateBlock(worldIn, pos, facing)) {
playerIn.swingArm(hand);
return EnumActionResult.SUCCESS;
}
return EnumActionResult.FAIL;