Paper/patches/server/0015-Configurable-fishing-time-ranges.patch

39 Zeilen
1.9 KiB
Diff

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:14:11 -0600
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
2021-11-24 18:58:26 +01:00
index ec3fb557fa31b153de20c4990066182a774dd489..5896b4e4646d722db5622a424fa26f42d3f8d9ff 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
2021-11-24 18:58:26 +01:00
@@ -114,4 +114,12 @@ public class PaperWorldConfig {
2021-06-11 14:02:28 +02:00
log("Baby zombies will move at the speed of " + babyZombieMovementModifier);
}
+
+ public int fishingMinTicks;
+ public int fishingMaxTicks;
+ private void fishingTickRange() {
+ fishingMinTicks = getInt("fishing-time-range.MinimumTicks", 100);
+ fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 600);
+ log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks");
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
2021-11-23 12:27:39 +01:00
index 7a44f701c94878618963868bf63f4d6391842851..eaa3ed52a57b56fc0f260aadfd23c2fd6dfc0f51 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
2021-11-23 12:27:39 +01:00
@@ -82,6 +82,10 @@ public class FishingHook extends Projectile {
2021-06-12 00:37:16 +02:00
this.noCulling = true;
2021-06-11 14:02:28 +02:00
this.luck = Math.max(0, lureLevel);
this.lureSpeed = Math.max(0, luckOfTheSeaLevel);
+ // Paper start
+ minWaitTime = world.paperConfig.fishingMinTicks;
+ maxWaitTime = world.paperConfig.fishingMaxTicks;
+ // Paper end
2021-06-11 14:02:28 +02:00
}
2021-06-12 00:37:16 +02:00
public FishingHook(EntityType<? extends FishingHook> type, Level world) {