mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
Prevent negative in lure times - Fixes GH-1583
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable fishing time ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index a3c0d9159..cacf58607 100644
|
||||
index 55d8e74f8..a55163a45 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@@ -22,7 +22,7 @@ index a3c0d9159..cacf58607 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index a9bd59418..7c119282b 100644
|
||||
index 83cfbd218..fd6ada184 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
@@ -32,6 +32,8 @@ index a9bd59418..7c119282b 100644
|
||||
- this.h = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.h -= this.aA * 20 * 5;
|
||||
+ this.h = Math.max(0, this.h); // Paper - Don't allow negative values
|
||||
}
|
||||
}
|
||||
|
||||
--
|
Reference in New Issue
Block a user