mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Option for slimes not pushable
This commit is contained in:
@@ -80,6 +80,11 @@ update-perms-on-world-change
|
||||
* **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
|
||||
|
||||
slimes-not-pushable
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: false
|
||||
* **description:** Prevent slimes from being pushable by pistons
|
||||
|
||||
grindstone
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
* disallow-placement
|
||||
|
||||
43
patches/server/0058-Option-for-slimes-not-pushable.patch
Normal file
43
patches/server/0058-Option-for-slimes-not-pushable.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From d25594a77210498e5ed54e81dba90809df4d3f5a 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(+)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSlime.java b/src/main/java/net/minecraft/server/BlockSlime.java
|
||||
index fd54958f6..1d3ab9703 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 {
|
||||
|
||||
super.stepOn(world, blockposition, entity);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public EnumPistonReaction getPushReaction(IBlockData iblockdata) {
|
||||
+ return net.pl3x.purpur.PurpurConfig.slimesNotPushable ? 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 0022211be..6827da6a6 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -275,6 +275,11 @@ public class PurpurConfig {
|
||||
enderDragonDeathAlwaysPlacesEggBlock = getBoolean("ender-dragon-death-always-places-egg-block", enderDragonDeathAlwaysPlacesEggBlock);
|
||||
}
|
||||
|
||||
+ public static boolean slimesNotPushable = false;
|
||||
+ private static void slimesNotPushable() {
|
||||
+ slimesNotPushable = getBoolean("slimes-not-pushable", slimesNotPushable);
|
||||
+ }
|
||||
+
|
||||
public static boolean ridableBat = true;
|
||||
public static boolean ridableBlaze = true;
|
||||
public static boolean ridableCat = true;
|
||||
--
|
||||
2.23.0.rc1
|
||||
|
||||
Reference in New Issue
Block a user