mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
44 lines
1.8 KiB
Diff
44 lines
1.8 KiB
Diff
From 8ea6f7d2290cdb598399443c849f39385c601a07 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 e8aba4ec9..d96adabe2 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("settings.ender-dragon-death-always-places-egg-block", enderDragonDeathAlwaysPlacesEggBlock);
|
|
}
|
|
|
|
+ public static boolean slimesNotPushable = false;
|
|
+ private static void slimesNotPushable() {
|
|
+ slimesNotPushable = getBoolean("settings.slimes-not-pushable", slimesNotPushable);
|
|
+ }
|
|
+
|
|
public static boolean ridableBat = true;
|
|
public static boolean ridableBlaze = true;
|
|
public static boolean ridableCat = true;
|
|
--
|
|
2.23.0.rc1
|
|
|