aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1010-Configure-sniffer-egg-hatch-time.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-11-04 14:11:55 -0700
committerGitHub <[email protected]>2023-11-04 14:11:55 -0700
commit0cdce89d595a2c1c097c9e2a5ff96687977b3b25 (patch)
treede63d6aa8112811f93b5d6afebbb069b9980870f /patches/server/1010-Configure-sniffer-egg-hatch-time.patch
parent15a0de2eefb70ea8162cbb31056920adf80265fa (diff)
downloadPaper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.tar.gz
Paper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.zip
Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
Diffstat (limited to 'patches/server/1010-Configure-sniffer-egg-hatch-time.patch')
-rw-r--r--patches/server/1010-Configure-sniffer-egg-hatch-time.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/server/1010-Configure-sniffer-egg-hatch-time.patch b/patches/server/1010-Configure-sniffer-egg-hatch-time.patch
new file mode 100644
index 0000000000..6c035ed11f
--- /dev/null
+++ b/patches/server/1010-Configure-sniffer-egg-hatch-time.patch
@@ -0,0 +1,28 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Lulu13022002 <[email protected]>
+Date: Tue, 27 Jun 2023 13:26:06 +0200
+Subject: [PATCH] Configure sniffer egg hatch time
+
+
+diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+index fab44502b3e22eb8d1311068f88290ce31adb437..16c5be04658a66ff94f2aad8782e34f450e9a729 100644
+--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
+@@ -56,7 +56,7 @@ public class SnifferEggBlock extends Block {
+
+ // Paper start
+ private void rescheduleTick(ServerLevel world, BlockPos pos) {
+- int baseDelay = hatchBoost(world, pos) ? BOOSTED_HATCH_TIME_TICKS : REGULAR_HATCH_TIME_TICKS;
++ int baseDelay = hatchBoost(world, pos) ? world.paperConfig().entities.sniffer.boostedHatchTime.or(BOOSTED_HATCH_TIME_TICKS) : world.paperConfig().entities.sniffer.hatchTime.or(REGULAR_HATCH_TIME_TICKS);
+ world.scheduleTick(pos, this, (baseDelay / 3) + world.random.nextInt(RANDOM_HATCH_OFFSET_TICKS));
+ // reschedule to avoid being stuck here and behave like the other calls (see #onPlace)
+ }
+@@ -99,7 +99,7 @@ public class SnifferEggBlock extends Block {
+ world.levelEvent(3009, pos, 0);
+ }
+
+- int i = bl ? 12000 : 24000;
++ int i = bl ? world.paperConfig().entities.sniffer.boostedHatchTime.or(BOOSTED_HATCH_TIME_TICKS) : world.paperConfig().entities.sniffer.hatchTime.or(REGULAR_HATCH_TIME_TICKS); // Paper
+ int j = i / 3;
+ world.gameEvent(GameEvent.BLOCK_PLACE, pos, GameEvent.Context.of(state));
+ world.scheduleTick(pos, this, j + world.random.nextInt(300));