Skip to content

Commit

Permalink
Merge pull request #1438 from ManInMyVan/noslow-spyglass&goathorn
Browse files Browse the repository at this point in the history
check spyglasses and goat horns in noslow
  • Loading branch information
SamB440 authored Jun 14, 2024
2 parents 7d0ce52 + 2d8e14e commit 7d2cd5a
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 7d2cd5a

Please sign in to comment.