Closed Void7327 closed 3 years ago
yes, heldstack is the lure/luck bonus of the held item (notice the enchantmenthelper call), bonusLuck
and bonusLure
are calculated earlier from items in the inventory:
https://github.com/Draylar/go-fish/blob/35b33e381ca7ae40b2c27eb1e004c6060653d14b/src/main/java/draylar/gofish/mixin/FishingRodPropertyMixin.java#L59-L77
yes, heldstack is the lure/luck bonus of the held item (notice the enchantmenthelper call),
bonusLuck
andbonusLure
are calculated earlier from items in the inventory: https://github.com/Draylar/go-fish/blob/35b33e381ca7ae40b2c27eb1e004c6060653d14b/src/main/java/draylar/gofish/mixin/FishingRodPropertyMixin.java#L59-L77
Oh, GAD. Dank u... I wazn't even aware of dat... Now the table was turned and I'm like an idiot.
I'll make clear if there's a need to report issues or not after more research. Closed it.
How to use lure? There isn't a correct description in CurseForge or in-game item tooltip. "+1 Lure(or Luck if Soul Lure) When kept in inventory" is completely MISLEADING. I saw your source code. It should be like the following:
int lure = EnchantmentHelper.getLure(heldStack) + bonusLuck + bonusLure; int lots = EnchantmentHelper.getLuckOfTheSea(heldStack) + bonusLuck + bonusLuck;
and the "heldStack" is:
ItemStack heldStack = user.getStackInHand(hand);
Therefore, you must hold it in off-hand or main-hand to let this function realize because "inventory" includes armor slots, Hotbar slots, and off-hand slot.