mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 01:29:32 +01:00
526795bacd
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
28 lines
1.9 KiB
Diff
28 lines
1.9 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 4f1ff12df44756b63e3c3f9fc43e7ea485df6f57..e225595bbf044ff126797f44b233221c358ef641 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java
|
|
@@ -62,7 +62,7 @@ public class SnifferEggBlock extends Block {
|
|
|
|
// Paper start - Call BlockFadeEvent
|
|
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); // Paper - Configure sniffer egg hatch time
|
|
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)
|
|
}
|
|
@@ -104,7 +104,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));
|