mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07:00
Fix Lure infinite loop (#6850)
This commit is contained in:
@@ -36,3 +36,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user