Skip to content

Commit

Permalink
Fixed stupid
Browse files Browse the repository at this point in the history
  • Loading branch information
Minenash committed Apr 23, 2024
1 parent 1cd6c33 commit 4b554db
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ else if (action == GLFW.GLFW_RELEASE)

@Redirect(method = "onMouseScroll", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/PlayerInventory;scrollInHotbar(D)V"))
public void blockHotbarScroll(PlayerInventory playerInventory, double scrollAmount) {
if (scrollAmount < 0 && HOTBAR_NEXT.isUnbound()
|| scrollAmount > 0 && HOTBAR_PREVIOUS.isUnbound())
if (scrollAmount < 0 && HOTBAR_NEXT_OVERRIDE.isUnbound()
|| scrollAmount > 0 && HOTBAR_PREVIOUS_OVERRIDE.isUnbound())
playerInventory.scrollInHotbar(scrollAmount);
}

@Redirect(method = "onMouseScroll", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/SpectatorHud;cycleSlot(I)V"))
public void blockSpectatorHotbarScroll(SpectatorHud instance, int offset) {
if (offset > 0 && HOTBAR_NEXT.isUnbound()
|| offset < 0 && HOTBAR_PREVIOUS.isUnbound())
if (offset > 0 && HOTBAR_NEXT_OVERRIDE.isUnbound()
|| offset < 0 && HOTBAR_PREVIOUS_OVERRIDE.isUnbound())
MinecraftClient.getInstance().inGameHud.getSpectatorHud().cycleSlot(-offset);
}

Expand Down

0 comments on commit 4b554db

Please sign in to comment.