Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
39 Zeilen
1.9 KiB
Diff
39 Zeilen
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 ec3fb557fa31b153de20c4990066182a774dd489..5896b4e4646d722db5622a424fa26f42d3f8d9ff 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -114,4 +114,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) {
|