mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-21 07:49:35 +00:00
39 lines
1.9 KiB
Diff
39 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Sun, 3 Apr 2022 11:31:04 +0800
|
|
Subject: [PATCH] Budding Amethyst can push by piston
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
|
index 02fc3ede12eadbf72e26e31b1c475c7f5b2ad73a..55bd00dca1553b5762e1d4f79cdfe6a3e610b6f8 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
|
@@ -20,6 +20,11 @@ public class BuddingAmethystBlock extends AmethystBlock {
|
|
|
|
@Override
|
|
public PushReaction getPistonPushReaction(BlockState state) {
|
|
+ // Leaves start - budding amethyst can push by piston
|
|
+ if (top.leavesmc.leaves.LeavesConfig.buddingAmethystCanPushByPiston) {
|
|
+ return PushReaction.PUSH_ONLY;
|
|
+ }
|
|
+ // Leaves end - budding amethyst can push by piston
|
|
return PushReaction.DESTROY;
|
|
}
|
|
|
|
diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
index ac1dbdab5e7c3cdbacf50c640ccd59eb9eaa530c..af924f19ca0c77484ae3cdeb2994547b63213767 100644
|
|
--- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
@@ -171,6 +171,11 @@ public final class LeavesConfig {
|
|
redstoneShearsWrench = getBoolean("settings.redstone-shears-wrench", redstoneShearsWrench);
|
|
}
|
|
|
|
+ public static boolean buddingAmethystCanPushByPiston = false;
|
|
+ private static void buddingAmethystCanPushByPiston() {
|
|
+ buddingAmethystCanPushByPiston = getBoolean("settings.budding-amethyst-can-push-by-piston", buddingAmethystCanPushByPiston);
|
|
+ }
|
|
+
|
|
public static final class WorldConfig {
|
|
|
|
public final String worldName;
|