Go Fish

Go Fish

11M Downloads

Need to correct the description in CurseForge, about Lure.

Void7327 opened this issue ยท 2 comments

commented

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.

commented

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:

// Find buffing items in player inventory
List<FishingBonus> found = new ArrayList<>();
for (ItemStack stack : user.inventory.main) {
Item item = stack.getItem();
if (item instanceof FishingBonus) {
FishingBonus bonus = (FishingBonus) item;
if (!found.contains(bonus)) {
if(bonus.shouldApply(world, user)) {
found.add(bonus);
smeltBuff = bonus.providesAutosmelt() || smeltBuff;
bonusLure += bonus.getLure();
bonusLuck += bonus.getLuckOfTheSea();
bonusExperience += bonus.getBaseExperience();
}
}
}
}

commented

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:

// Find buffing items in player inventory
List<FishingBonus> found = new ArrayList<>();
for (ItemStack stack : user.inventory.main) {
Item item = stack.getItem();
if (item instanceof FishingBonus) {
FishingBonus bonus = (FishingBonus) item;
if (!found.contains(bonus)) {
if(bonus.shouldApply(world, user)) {
found.add(bonus);
smeltBuff = bonus.providesAutosmelt() || smeltBuff;
bonusLure += bonus.getLure();
bonusLuck += bonus.getLuckOfTheSea();
bonusExperience += bonus.getBaseExperience();
}
}
}
}

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.