net.minecraft.block.entity

public abstract class ViewerCountManager

net.minecraft.world.level.block.entity.ContainerOpenersCounter
net.minecraft.world.level.block.entity.ContainerOpenersCounter
net.minecraft.class_5561
net.minecraft.block.entity.ViewerCountManager

Field summary

Modifier and TypeField
private static final int
CHECK_TICK_DELAY
CHECK_TICK_DELAY
field_31339
SCHEDULE_TICK_DELAY
private int
openCount
openCount
field_27215
viewerCount
private double
maxInteractionRange
maxInteractionRange
field_48376
maxBlockInteractionRange

Constructor summary

ModifierConstructor
public ()

Method summary

Modifier and TypeMethod
protected abstract void
onOpen(Level level, BlockPos pos, BlockState blockState)
onOpen(Level level, BlockPos pos, BlockState blockState)
method_31681(class_1937 arg0, class_2338 arg1, class_2680 arg2)
onContainerOpen(World world, BlockPos pos, BlockState state)
protected abstract void
onClose(Level level, BlockPos pos, BlockState blockState)
onClose(Level level, BlockPos pos, BlockState blockState)
method_31683(class_1937 arg0, class_2338 arg1, class_2680 arg2)
onContainerClose(World world, BlockPos pos, BlockState state)
protected abstract void
openerCountChanged(Level level, BlockPos pos, BlockState blockState, int previous, int current)
openerCountChanged(Level level, BlockPos pos, BlockState blockState, int previous, int current)
method_31682(class_1937 arg0, class_2338 arg1, class_2680 arg2, int arg3, int arg4)
onViewerCountUpdate(World world, BlockPos pos, BlockState state, int oldViewerCount, int newViewerCount)
public abstract boolean
isOwnContainer(Player player)
isOwnContainer(Player player)
method_31679(class_1657 arg0)
isPlayerViewing(PlayerEntity player)
public void
incrementOpeners(LivingEntity entity, Level level, BlockPos pos, BlockState blockState, double maxInteractionRange)
incrementOpeners(LivingEntity entity, Level level, BlockPos pos, BlockState blockState, double maxInteractionRange)
method_31684(class_1309 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3, double arg4)
openContainer(LivingEntity user, World world, BlockPos pos, BlockState state, double userInteractionRange)
public void
decrementOpeners(LivingEntity entity, Level level, BlockPos pos, BlockState blockState)
decrementOpeners(LivingEntity entity, Level level, BlockPos pos, BlockState blockState)
method_31685(class_1309 arg0, class_1937 arg1, class_2338 arg2, class_2680 arg3)
closeContainer(LivingEntity user, World world, BlockPos pos, BlockState state)
public List<ContainerUser>
getEntitiesWithContainerOpen(Level level, BlockPos pos)
getEntitiesWithContainerOpen(Level level, BlockPos pos)
method_56121(class_1937 arg0, class_2338 arg1)
getViewingUsers(World world, BlockPos pos)
private boolean
hasContainerOpen(Entity entity, BlockPos blockPos)
hasContainerOpen(Entity entity, BlockPos blockPos)
method_72654(class_1297 arg0, class_2338 arg1)
hasViewingUsers(Entity entity, BlockPos blockPos)
public void
recheckOpeners(Level level, BlockPos pos, BlockState blockState)
recheckOpeners(Level level, BlockPos pos, BlockState blockState)
method_31686(class_1937 arg0, class_2338 arg1, class_2680 arg2)
updateViewerCount(World world, BlockPos pos, BlockState state)
public int
getOpenerCount()
getOpenerCount()
method_31678()
getViewerCount()
private static void
scheduleRecheck(Level level, BlockPos blockPos, BlockState blockState)
scheduleRecheck(Level level, BlockPos blockPos, BlockState blockState)
method_31687(class_1937 arg0, class_2338 arg1, class_2680 arg2)
scheduleBlockTick(World world, BlockPos pos, BlockState state)