Skip to content

Commit

Permalink
check spyglasses and goat horns in noslow
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Jun 13, 2024
1 parent 4f70f57 commit 2d8e14e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ public static void handleUseItem(GrimPlayer player, ItemStack item, InteractionH
player.packetStateData.slowedByUsingItem = false;
}

if (material == ItemTypes.SPYGLASS && player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_17)) {
player.packetStateData.slowedByUsingItem = true;
player.packetStateData.eatingHand = hand;
}

if (material == ItemTypes.GOAT_HORN && player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_19)) {
player.packetStateData.slowedByUsingItem = true;
player.packetStateData.eatingHand = hand;
}

// Only 1.8 and below players can block with swords
if (material.hasAttribute(ItemTypes.ItemAttribute.SWORD)) {
if (player.getClientVersion().isOlderThanOrEquals(ClientVersion.V_1_8))
Expand Down

0 comments on commit 2d8e14e

Please sign in to comment.