mojira.dev
MC-32172

Lure Levels 9 or Greater Prevent Fishing

Fishing rods with the lure enchantment level 9 or greater never start the fishing countdown.

Steps to reproduce:
1. Give a Fishing Rod with Lure level 9 using the command:

/give [playername] 346 1 0 {ench:[{id:62,lvl:9}]}

2. Attempt to fish.

3. The fishing particles will never appear and the bobber will never trigger.

Detailed Description of the Problem:
There are two counters that are used for fishing which get updated each tick.

If neither counter is greater than zero (i.e. the fishing line has been newly cast and fishing hasn't started yet), then the first gets set to an integer value between 100 and 900 which then has the level of Lure * 100 subtracted from it.

This counter will then count down until it is less than zero or equal to zero at which point it will start the other counter, which when counted down to less than or equal to zero will allow the fish to be caught.

The problem occurs due to the fact that with a Lure level of 9, both counters will always be less than or equal to zero, which will result in the game attempting, on the next tick, to set the first counter to a value less than or equal to zero ad infinitum or until the fishing is canceled.

Proposed Solutions:
If there is a desire to have levels greater than 9 continue to be useful as the level increases, the affect on the counter could be changed to a multiplier. Something like this...

Pseudocode

counter1 = randomInt(100,900);
counter1 = counter1 * Math.pow(constantLessThanZero, LureLevel);

Another solultion would be to simply set the counter to 1 if it is less than or equal to zero, but this would prevent Lure from having an effect past level 9.

Linked issues

Comments 15

Does lure work for levels > 3 ? According MC-32291 it does not.

It should work properly for lure levels 1 through 8. I have checked this by experimentation and by examining the code.

Is there any reason Mojang should be concerned about the results of [using values outside the intended range|MC-10755]?

Torabi - Yes. It is only reasonable to be concerned with it if they add a method to acquire values outside of the intended range; it is poor practice to ignore things that break game mechanics.

The problem here is that fishing is completely broken above level 8; this is unlike the potion effects, which may have limited levels of effect, interesting interactions with other effects, or which invert at level 128. In the case of Lure, it's not that the effect does not become stronger, it is not interacting with any other effects which slow down fishing, nor is it even slowing down fishing (as an inverted potion effect would) - it just completely breaks fishing.

So, the question we have to ask in this case is, "Is the design of the Lure enchantment such that fishing should no longer work after level 8?" If it is not designed this way, then we can say that this is a bug.

After that, we could argue about the approaches that could be taken to fix bugs that are caused by users doing things that were not intended, that is, whether they get corrected (and, if they are corrected, then how do they get corrected), whether they are treated as features (e.g. BUDs), or if the users are just prevented from doing the unintended action - but I think we can probably agree that just showing no concern and ignoring it is an approach that Mojang should not take.

I feel like this is invalid, as it is only possible to gain a fishing rod with Lure 9 or higher through an external editor or the /give command.

5 more comments

Ah... so it's a result of mixed signals coming from the developers. I see where our disagreement on whether or not this should be treated as a bug is coming from. Jeb was the one who implemented this, so I guess we should assume then that the fact that enchantment levels are not being limited by the give command is a bug that should be fixed before the 1.7 release? https://twitter.com/jeb_/status/374924741267951617 😉

Or they may simply decide that they're not responsible for the consequences of the things they allow you to do with commands. The stuff they want to work works. Anything else might or might not. The give command lets you create items with whatever data you want. That data may cause the game to perform incorrectly, or even crash. It is entirely up to Mojang what is a bug and what is working as intended, by the very definition of the terms bug and intended.

The purpose of the bug tracker is to bring issues to their attention so that they can make this decision. If their decision is to be irresponsible like you are suggesting, that is, as I said their decision even if I disagree with it.

I made a sarcastic comment there to highlight the point that what the developers have been doing and saying seems to indicate that they have not made a clear decision on what is intended (e.g. Jeb doesn't want unlimited effects and enchantment commands and has implemented limits in the past, but he implements the give command to be able to provide unlimited enchantment levels; although this would be a different issue that the fishing one, that brings up the question of if this intended).

Reopened. Now it's up to Mojang...

Any effect outside of those provided in vanilla circumstances should be considered unsupported officially and may or may not work as you'd expect.

Kabo

(Unassigned)

Unconfirmed

/give, enchanting, fishing

Minecraft 13w38c

Retrieved