mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Clarify the latest slimes option
This commit is contained in:
@@ -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>
|
||||
Date: Fri, 23 Aug 2019 21:56:31 -0500
|
||||
Subject: [PATCH] Option for slimes not pushable
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/BlockSlime.java | 5 +++++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
2 files changed, 10 insertions(+)
|
||||
src/main/java/net/minecraft/server/BlockSlime.java | 5 +++++
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 14 ++++++++++++++
|
||||
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
|
||||
index fd54958f6..1d3ab9703 100644
|
||||
index fd54958f6..0f4cdd5ed 100644
|
||||
--- a/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 {
|
||||
@@ -19,20 +19,29 @@ index fd54958f6..1d3ab9703 100644
|
||||
+
|
||||
+ @Override
|
||||
+ 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
|
||||
index 9532bf349..0d1ee157b 100644
|
||||
index 9532bf349..808a5bb8a 100644
|
||||
--- a/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);
|
||||
}
|
||||
|
||||
+ public static boolean slimesNotPushable = false;
|
||||
+ private static void slimesNotPushable() {
|
||||
+ slimesNotPushable = getBoolean("settings.slimes-not-pushable", slimesNotPushable);
|
||||
+ public static boolean slimeBlocksNotPushable = false;
|
||||
+ private static void slimeBlocksNotPushable() {
|
||||
+ 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;
|
||||
|
||||
Reference in New Issue
Block a user