Package net.minecraft.block.entity
Class SculkSensorBlockEntity
java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.SculkSensorBlockEntity
- All Implemented Interfaces:
SculkSensorListener.class_5719
public class SculkSensorBlockEntity extends BlockEntity implements SculkSensorListener.class_5719
-
Field Summary
Fields Modifier and Type Field Description private int
lastVibrationFrequency
private SculkSensorListener
listener
Fields inherited from class net.minecraft.block.entity.BlockEntity
pos, removed, world
-
Constructor Summary
Constructors Constructor Description SculkSensorBlockEntity(BlockPos pos, BlockState state)
-
Method Summary
Modifier and Type Method Description void
fromTag(CompoundTag tag)
SculkSensorListener
getEventListener()
int
getLastVibrationFrequency()
void
listen(World world, GameEventListener listener, GameEvent event, int int2)
static int
method_32910(int int2, int range)
boolean
shouldListen(World world, GameEventListener listener, BlockPos pos, GameEvent event, Entity entity)
CompoundTag
toTag(CompoundTag tag)
Methods inherited from class net.minecraft.block.entity.BlockEntity
cancelRemoval, copyItemDataRequiresOperator, createFromTag, getCachedState, getPos, getSquaredRenderDistance, getType, getWorld, hasWorld, isRemoved, markDirty, markDirty, markRemoved, onSyncedBlockEvent, populateCrashReport, setCachedState, setWorld, toInitialChunkDataTag, toUpdatePacket
-
Field Details
-
listener
-
lastVibrationFrequency
private int lastVibrationFrequency
-
-
Constructor Details
-
SculkSensorBlockEntity
-
-
Method Details
-
fromTag
- Overrides:
fromTag
in classBlockEntity
-
toTag
- Overrides:
toTag
in classBlockEntity
-
getEventListener
-
getLastVibrationFrequency
public int getLastVibrationFrequency() -
shouldListen
public boolean shouldListen(World world, GameEventListener listener, BlockPos pos, GameEvent event, @Nullable Entity entity)- Specified by:
shouldListen
in interfaceSculkSensorListener.class_5719
-
listen
- Specified by:
listen
in interfaceSculkSensorListener.class_5719
-
method_32910
public static int method_32910(int int2, int range)
-