mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes:b33b63908eSupport complex components in written book builder (#6337)bfb3d42b44Optimize entity tracker passenger checks (#6361)399710ff79Add reobf mappings patch for MinecraftServer#getLootTables (#6368)25cd8aba9fConfig option for Piglins guarding chests (#4829)80650e8936Added EntityItemDamageEvent (#4928) Tuinity Changes:8e7cc4dc96Do not submit profile lookups to worldgen threads
This commit is contained in:
52
patches/server/0232-Big-dripleaf-tilt-delay.patch
Normal file
52
patches/server/0232-Big-dripleaf-tilt-delay.patch
Normal file
@@ -0,0 +1,52 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 16 Jul 2021 22:47:29 -0500
|
||||
Subject: [PATCH] Big dripleaf tilt delay
|
||||
|
||||
Makes the tilt delays configurable. There are only 3 types of tilts used by this setting. When an entity steps on a
|
||||
big_dripleaf with no tilt it will immediately change to an UNSTABLE tilt. Each change after that is on a tick timer:
|
||||
|
||||
UNSTABLE: big_dripleaf with UNSTABLE tilt will change to PARTIAL tilt after 10 ticks
|
||||
PARTIAL: big_dripleaf with PARTIAL tilt will change to FULL tilt after 10 ticks
|
||||
UNSTABLE: big_dripleaf with FULL tilt will change back to no tilt after 100 ticks
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
index 5bfb60258018c8beda1fc2ac29e8ffc5c9377064..24e80e4d3ebbfd5f72e00ad7610efa12dc648ef6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java
|
||||
@@ -234,7 +234,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone
|
||||
BigDripleafBlock.playTiltSound(world, blockposition, soundeffect);
|
||||
}
|
||||
|
||||
- int i = BigDripleafBlock.DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt);
|
||||
+ int i = world.purpurConfig.bigDripleafTiltDelay.getOrDefault(tilt, -1); // Purpur
|
||||
|
||||
if (i != -1) {
|
||||
world.getBlockTicks().scheduleTick(blockposition, this, i);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 3f31fbb2363ddd6e6e39fbf2805b9e6a36a92ad2..83a042dacf5c2746406dda579d4d4b8230717aa6 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -707,6 +707,22 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
+ public Map<Tilt, Integer> bigDripleafTiltDelay = new HashMap<>();
|
||||
+ private void bigDripleafSettings() {
|
||||
+ bigDripleafTiltDelay.clear();
|
||||
+ getMap("blocks.big_dripleaf.tilt-delay", Map.ofEntries(
|
||||
+ Map.entry("UNSTABLE", 10),
|
||||
+ Map.entry("PARTIAL", 10),
|
||||
+ Map.entry("FULL", 100))
|
||||
+ ).forEach((tilt, delay) -> {
|
||||
+ try {
|
||||
+ bigDripleafTiltDelay.put(Tilt.valueOf(tilt), (int) delay);
|
||||
+ } catch (IllegalArgumentException e) {
|
||||
+ PurpurConfig.log(Level.SEVERE, "Invalid big_dripleaf tilt key: " + tilt);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
public boolean buddingAmethystSilkTouch = false;
|
||||
private void buddingAmethystSettings() {
|
||||
buddingAmethystSilkTouch = getBoolean("blocks.budding_amethyst.silk-touch", buddingAmethystSilkTouch);
|
||||
Reference in New Issue
Block a user