mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Clarify the latest slimes option
This commit is contained in:
@@ -80,10 +80,10 @@ update-perms-on-world-change
|
|||||||
* **default**: false
|
* **default**: false
|
||||||
* **description:** When a player changes worlds the server recalculates their permissions and resends their available commands. This can be laggy, so the option is disabled by default
|
* **description:** When a player changes worlds the server recalculates their permissions and resends their available commands. This can be laggy, so the option is disabled by default
|
||||||
|
|
||||||
slimes-not-pushable
|
slime-blocks-not-pushable
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
* **default**: false
|
* **default**: false
|
||||||
* **description:** Prevent slimes from being pushable by pistons
|
* **description:** Prevent slime blocks from being pushable by pistons. Useful for preventing multiple types of duplication machines.
|
||||||
|
|
||||||
grindstone
|
grindstone
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
From 85bef7b02eb3f2ee7239564473acf22a45bebec8 Mon Sep 17 00:00:00 2001
|
From 95a99311f4b9e531e4308604b51b1a7c0e47578f Mon Sep 17 00:00:00 2001
|
||||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Date: Fri, 23 Aug 2019 21:56:31 -0500
|
Date: Fri, 23 Aug 2019 21:56:31 -0500
|
||||||
Subject: [PATCH] Option for slimes not pushable
|
Subject: [PATCH] Option for slimes not pushable
|
||||||
|
|
||||||
---
|
---
|
||||||
src/main/java/net/minecraft/server/BlockSlime.java | 5 +++++
|
src/main/java/net/minecraft/server/BlockSlime.java | 5 +++++
|
||||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
src/main/java/net/pl3x/purpur/PurpurConfig.java | 14 ++++++++++++++
|
||||||
2 files changed, 10 insertions(+)
|
2 files changed, 19 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockSlime.java b/src/main/java/net/minecraft/server/BlockSlime.java
|
diff --git a/src/main/java/net/minecraft/server/BlockSlime.java b/src/main/java/net/minecraft/server/BlockSlime.java
|
||||||
index fd54958f6..1d3ab9703 100644
|
index fd54958f6..0f4cdd5ed 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockSlime.java
|
--- a/src/main/java/net/minecraft/server/BlockSlime.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockSlime.java
|
+++ b/src/main/java/net/minecraft/server/BlockSlime.java
|
||||||
@@ -49,4 +49,9 @@ public class BlockSlime extends BlockHalfTransparent {
|
@@ -49,4 +49,9 @@ public class BlockSlime extends BlockHalfTransparent {
|
||||||
@@ -19,20 +19,29 @@ index fd54958f6..1d3ab9703 100644
|
|||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public EnumPistonReaction getPushReaction(IBlockData iblockdata) {
|
+ public EnumPistonReaction getPushReaction(IBlockData iblockdata) {
|
||||||
+ return net.pl3x.purpur.PurpurConfig.slimesNotPushable ? EnumPistonReaction.BLOCK : super.getPushReaction(iblockdata);
|
+ return net.pl3x.purpur.PurpurConfig.slimeBlocksNotPushable ? EnumPistonReaction.BLOCK : super.getPushReaction(iblockdata);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
index 9532bf349..0d1ee157b 100644
|
index 9532bf349..808a5bb8a 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||||
@@ -284,6 +284,11 @@ public class PurpurConfig {
|
@@ -284,6 +284,20 @@ public class PurpurConfig {
|
||||||
InventoryType.BARREL.setDefaultSize(packedBarrels ? 54 : 27);
|
InventoryType.BARREL.setDefaultSize(packedBarrels ? 54 : 27);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static boolean slimesNotPushable = false;
|
+ public static boolean slimeBlocksNotPushable = false;
|
||||||
+ private static void slimesNotPushable() {
|
+ private static void slimeBlocksNotPushable() {
|
||||||
+ slimesNotPushable = getBoolean("settings.slimes-not-pushable", slimesNotPushable);
|
+ if (version < 2) {
|
||||||
|
+ boolean oldValue = getBoolean("slimes-not-pushable", slimeBlocksNotPushable);
|
||||||
|
+ oldValue = getBoolean("settings.slimes-not-pushable", oldValue);
|
||||||
|
+
|
||||||
|
+ set("slimes-not-pushable", null);
|
||||||
|
+ set("settings.slimes-not-pushable", null);
|
||||||
|
+
|
||||||
|
+ set("settings.slime-blocks-not-pushable", oldValue);
|
||||||
|
+ }
|
||||||
|
+ slimeBlocksNotPushable = getBoolean("settings.slime-blocks-not-pushable", slimeBlocksNotPushable);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public static boolean ridableBat = true;
|
public static boolean ridableBat = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user