mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix Lure infinite loop (#6850)
This commit is contained in:
parent
756c3377ea
commit
a0fb5ba052
@ -36,3 +36,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
||||
@@ -0,0 +0,0 @@ public class FishingHook extends Projectile {
|
||||
} else {
|
||||
// CraftBukkit start - logic to modify fishing wait time
|
||||
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
|
||||
- this.timeUntilLured -= (this.applyLure) ? this.lureSpeed * 20 * 5 : 0;
|
||||
+ this.timeUntilLured -= (this.applyLure) ? (this.lureSpeed * 20 * 5 >= this.maxWaitTime ? this.timeUntilLured - 1 : this.lureSpeed * 20 * 5) : 0; // Paper - Fix Lure infinite loop
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user