Skip to content

Commit

Permalink
Cap maximum lureSpeed to prevent infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaelzan authored and GirafiStudios committed Oct 13, 2019
1 parent 3316b2d commit bee8192
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player
if (!isAdminRod && !bait.isEmpty()) {
lureSpeed += ((BaitItem) bait.getItem()).getLureSpeedModifier();
}
lureSpeed = Math.min(5, lureSpeed);
//Luck
int luck = EnchantmentHelper.getFishingLuckBonus(heldStack);
if (hook != Hooks.EMPTY && hook.getLuckModifier() > 0) luck += hook.getLuckModifier();
Expand Down Expand Up @@ -207,4 +208,4 @@ public ItemStackHandler getItems() {
return items;
}
}
}
}

0 comments on commit bee8192

Please sign in to comment.