mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
38 lines
1.9 KiB
Diff
38 lines
1.9 KiB
Diff
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
|
|
index d5a93adafc9e897b78f83102ea101d96c5bf2744..3b35d45881a041aaa7adea0ffc92379208a138b7 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -109,4 +109,12 @@ public class PaperWorldConfig {
|
|
|
|
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
|
|
index 7a44f701c94878618963868bf63f4d6391842851..eaa3ed52a57b56fc0f260aadfd23c2fd6dfc0f51 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
|
@@ -82,6 +82,10 @@ public class FishingHook extends Projectile {
|
|
this.noCulling = true;
|
|
this.luck = Math.max(0, lureLevel);
|
|
this.lureSpeed = Math.max(0, luckOfTheSeaLevel);
|
|
+ // Paper start
|
|
+ minWaitTime = world.paperConfig.fishingMinTicks;
|
|
+ maxWaitTime = world.paperConfig.fishingMaxTicks;
|
|
+ // Paper end
|
|
}
|
|
|
|
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|