3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0013-Configurable-fishing-time-ranges.patch

41 Zeilen
2.0 KiB
Diff

From 2cd548a4147654425d101a8a112cc59fe6f9314d Mon Sep 17 00:00:00 2001
2015-01-29 22:25:50 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
2014-11-28 02:17:45 +01:00
Date: Fri, 28 Nov 2014 01:29:35 -0600
2014-06-29 20:33:49 +02:00
Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
2014-11-28 02:17:45 +01:00
index b1a6daf..e94c4c7 100644
2014-06-29 20:33:49 +02:00
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
2014-11-28 02:17:45 +01:00
@@ -324,7 +324,8 @@ public class EntityFishingHook extends Entity {
this.av = MathHelper.nextInt(this.random, 20, 80);
2014-06-29 20:33:49 +02:00
}
} else {
2014-11-28 02:17:45 +01:00
- this.au = MathHelper.nextInt(this.random, 100, 900);
2014-08-06 01:45:22 +02:00
+ // PaperSpigot - Configurable fishing tick range
2014-11-28 02:17:45 +01:00
+ this.au = MathHelper.nextInt(this.random, this.world.paperSpigotConfig.fishingMinTicks, this.world.paperSpigotConfig.fishingMaxTicks);
this.au -= EnchantmentManager.h(this.owner) * 20 * 5;
2014-06-29 20:33:49 +02:00
}
}
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-11-28 02:17:45 +01:00
index 0878ea7..b67b856 100644
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
2014-11-28 02:17:45 +01:00
@@ -106,4 +106,12 @@ public class PaperSpigotWorldConfig
reedMaxHeight = getInt( "max-growth-height.reeds", 3 );
log( "Max height for cactus growth " + cactusMaxHeight + ". Max height for reed growth " + reedMaxHeight);
2014-06-29 20:33:49 +02:00
}
+
2014-08-06 01:45:22 +02:00
+ public int fishingMinTicks;
+ public int fishingMaxTicks;
+ private void fishingTickRange()
2014-06-29 20:33:49 +02:00
+ {
2014-08-06 01:45:22 +02:00
+ fishingMinTicks = getInt( "fishing-time-range.MinimumTicks", 100 );
+ fishingMaxTicks = getInt( "fishing-time-range.MaximumTicks", 900 );
2014-06-29 20:33:49 +02:00
+ }
}
2014-06-29 20:33:49 +02:00
--
1.9.5.msysgit.0
2014-06-29 20:33:49 +02:00