From 35fd8fb960a8a1206ae7ac0891cd1e1dd183c443 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Aug 2024 14:34:12 +0200 Subject: [PATCH] Check for block type in SculkSensorBlock#canActivate --- ...type-in-SculkSensorBlock-canActivate.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/Check-for-block-type-in-SculkSensorBlock-canActivate.patch diff --git a/patches/server/Check-for-block-type-in-SculkSensorBlock-canActivate.patch b/patches/server/Check-for-block-type-in-SculkSensorBlock-canActivate.patch new file mode 100644 index 0000000000..395fb1645a --- /dev/null +++ b/patches/server/Check-for-block-type-in-SculkSensorBlock-canActivate.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java +@@ -0,0 +0,0 @@ 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) {