Код:
case "Grim (RW)" -> {
if (mc.gameSettings.keyBindUseItem.isKeyDown()) {
MovingObjectPosition movingObjectPosition = mc.player.rayTrace(999, 1);
if (movingObjectPosition == null) return;
final BlockPos pos = movingObjectPosition.getBlockPos();
final BlockPos tpPos = pos.offset(movingObjectPosition.sideHit, 4);
Vector2f rotations = RotationHelper.calculate(
new Vector3d(tpPos.getX(), tpPos.getY(), tpPos.getZ()),
new Vector3d(pos.getX(), pos.getY(), pos.getZ()));
mc.getConnection().sendPacket(new CPacketPlayer.CPacketPlayerPosLook(tpPos.getX(), tpPos.getY() - 1, tpPos.getZ(), rotation.x, rotation.y, false));
mc.playerController.onPlayerRightClick(mc.player, mc.world, SlotComponent.getItemStack(),
movingObjectPosition.getBlockPos(), movingObjectPosition.sideHit, movingObjectPosition.hitVec);
if (mc.gameSettings.keyBindUseItem.isKeyDown()) event.setCancelled(true);