diff options
author | Nassim Jahnke <[email protected]> | 2024-08-07 14:34:12 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-08-07 14:34:12 +0200 |
commit | 4e6a2a13a3e1f6fa1067a7821d2f018339395533 (patch) | |
tree | cd37e295b0a9e826fcb88acf5e8da7353952166d | |
parent | 042f15ffbd7598c5b7beaf87d4ede45f8efc0aa3 (diff) | |
download | Paper-4e6a2a13a3e1f6fa1067a7821d2f018339395533.tar.gz Paper-4e6a2a13a3e1f6fa1067a7821d2f018339395533.zip |
Check for block type in SculkSensorBlock#canActivate
-rw-r--r-- | patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch b/patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch new file mode 100644 index 0000000000..f060e79368 --- /dev/null +++ b/patches/server/1046-Check-for-block-type-in-SculkSensorBlock-canActivate.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke <[email protected]> +Date: Wed, 7 Aug 2024 14:33:25 +0200 +Subject: [PATCH] Check for block type in SculkSensorBlock#canActivate + + +diff --git a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java +index 9e928302817ee8e1cc8c7f3f1b351a0d5f3a7c2c..1db261f63aaf083b4d38f519f77abecbd942e999 100644 +--- a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java +@@ -218,7 +218,7 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg + } + + public static boolean canActivate(BlockState state) { +- return SculkSensorBlock.getPhase(state) == SculkSensorPhase.INACTIVE; ++ return state.getBlock() instanceof SculkSensorBlock && SculkSensorBlock.getPhase(state) == SculkSensorPhase.INACTIVE; // Paper - Check for a valid type + } + + public static void deactivate(Level world, BlockPos pos, BlockState state) { |