mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-22 16:39:30 +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 2252014963e42b0bd38771f30e68135b3ef18d1d..5b1b3627b195f25a1c1daa509e58186bcff1c498 100644
|
|
--- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
+++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java
|
|
@@ -155,6 +155,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;
|