mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
Check for block type in SculkSensorBlock#canActivate
This commit is contained in:
parent
92fa922afd
commit
334058fa69
@ -30,7 +30,12 @@
|
||||
BlockEntity tileentity = world.getBlockEntity(pos);
|
||||
|
||||
if (tileentity instanceof SculkSensorBlockEntity) {
|
||||
@@ -202,6 +218,15 @@
|
||||
@@ -198,10 +214,19 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user