fix being unable to place or pick up water buckets

This commit is contained in:
Leijurv 2019-03-15 14:25:59 -07:00
parent 610fe6439f
commit ee83471bf6
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
3 changed files with 10 additions and 0 deletions

View File

@ -50,4 +50,6 @@ public interface IPlayerController {
}
EnumActionResult processRightClickBlock(EntityPlayerSP player, World world, BlockPos pos, EnumFacing direction, Vec3d vec, EnumHand hand);
EnumActionResult processRightClick(EntityPlayerSP player, World world, EnumHand hand);
}

View File

@ -46,6 +46,9 @@ public class BlockPlaceHelper implements Helper {
ctx.player().swingArm(hand);
return;
}
if (!ctx.player().getHeldItem(hand).isEmpty() && ctx.playerController().processRightClick(ctx.player(), ctx.world(), hand) == EnumActionResult.SUCCESS) {
return;
}
}
}
}

View File

@ -72,4 +72,9 @@ public enum PrimaryPlayerController implements IPlayerController, Helper {
// primaryplayercontroller is always in a WorldClient so this is ok
return mc.playerController.processRightClickBlock(player, (WorldClient) world, pos, direction, vec, hand);
}
@Override
public EnumActionResult processRightClick(EntityPlayerSP player, World world, EnumHand hand) {
return mc.playerController.processRightClick(player, world, hand);
}
}