diff --git a/src/main/java/ac/grim/grimac/predictionengine/MovementCheckRunner.java b/src/main/java/ac/grim/grimac/predictionengine/MovementCheckRunner.java index cec5d76d5d..5d53c9e4f7 100644 --- a/src/main/java/ac/grim/grimac/predictionengine/MovementCheckRunner.java +++ b/src/main/java/ac/grim/grimac/predictionengine/MovementCheckRunner.java @@ -607,8 +607,10 @@ private void check(PositionUpdate update) { player.vehicleData.vehicleForward = (float) Math.min(0.98, Math.max(-0.98, player.vehicleData.nextVehicleForward)); player.vehicleData.vehicleHorizontal = (float) Math.min(0.98, Math.max(-0.98, player.vehicleData.nextVehicleHorizontal)); - player.vehicleData.horseJump = player.vehicleData.nextHorseJump; - player.vehicleData.nextHorseJump = 0; + if (player.onGround) { // if vehicle is on ground, this gets set + player.vehicleData.horseJump = player.vehicleData.nextHorseJump; + player.vehicleData.nextHorseJump = 0; + } player.minPlayerAttackSlow = 0; player.maxPlayerAttackSlow = 0; diff --git a/src/main/java/ac/grim/grimac/utils/latency/CompensatedInventory.java b/src/main/java/ac/grim/grimac/utils/latency/CompensatedInventory.java index de30aa0ff1..7adb2310c2 100644 --- a/src/main/java/ac/grim/grimac/utils/latency/CompensatedInventory.java +++ b/src/main/java/ac/grim/grimac/utils/latency/CompensatedInventory.java @@ -456,10 +456,13 @@ public void onPacketSend(final PacketSendEvent event) { if (inventory.getInventoryStorage().getSize() > slot.getSlot() && slot.getSlot() >= 0) { inventory.getInventoryStorage().setItem(slot.getSlot(), slot.getItem()); } - } else if (slot.getWindowId() == 0) { // Player hotbar (ONLY!) - if (slot.getSlot() >= 36 && slot.getSlot() <= 45) { + } else if (slot.getWindowId() == 0) { // Player inventory + // This packet can only be used to edit the hotbar and offhand of the player's inventory if + // window ID is set to 0 (slots 36 through 45) if the player is in creative, with their inventory open, + // and not in their survival inventory tab. Otherwise, when window ID is 0, it can edit any slot in the player's inventory. +// if (slot.getSlot() >= 36 && slot.getSlot() <= 45) { inventory.getSlot(slot.getSlot()).set(slot.getItem()); - } +// } } else if (slot.getWindowId() == openWindowID) { // Opened inventory (if not valid, client crashes) menu.getSlot(slot.getSlot()).set(slot.getItem()); }