mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
90fe0d58a5
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 897a0a23 SPIGOT-5753: Back PotionType by a minecraft registry 255b2aa1 SPIGOT-7080: Add World#locateNearestBiome ff984826 Remove javadoc.io doc links CraftBukkit Changes: 71b0135cc SPIGOT-5753: Back PotionType by a minecraft registry a6bcb8489 SPIGOT-7080: Add World#locateNearestBiome ad0e57434 SPIGOT-7502: CraftMetaItem - cannot deserialize BlockStateTag b3efca57a SPIGOT-6400: Use Mockito instead of InvocationHandler 38c599f9d PR-1272: Only allow one entity in CraftItem instead of two f065271ac SPIGOT-7498: ChunkSnapshot.getBlockEmittedLight() gets 64 blocks upper in Overworld Spigot Changes: e0e223fe Remove javadoc.io doc links
28 lines
1.8 KiB
Diff
28 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
|
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));
|