CLASS net/minecraft/class_5561 net/minecraft/block/entity/ViewerCountManager COMMENT Handles the viewer count for container block entities, like chests, COMMENT ender chests, and barrels. FIELD field_27215 viewerCount I FIELD field_31339 SCHEDULE_TICK_DELAY I METHOD method_31678 getViewerCount ()I METHOD method_31679 isPlayerViewing (Lnet/minecraft/class_1657;)Z COMMENT Determines whether the given player is currently viewing this container. ARG 1 player METHOD method_31680 getInRangeViewerCount (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I ARG 1 world ARG 2 pos METHOD method_31681 onContainerOpen (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V COMMENT Run when this container is opened (when the viewer count becomes nonzero). ARG 1 world ARG 2 pos ARG 3 state METHOD method_31682 onViewerCountUpdate (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;II)V COMMENT Called when the viewer count updates, such as when a player interact with this container COMMENT or when {@linkplain #updateViewerCount distance-based checks} are run. ARG 1 world ARG 2 pos ARG 3 state ARG 4 oldViewerCount ARG 5 newViewerCount METHOD method_31683 onContainerClose (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V COMMENT Run when this container closes (when the viewer count reaches zero). ARG 1 world ARG 2 pos ARG 3 state METHOD method_31684 openContainer (Lnet/minecraft/class_1657;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V ARG 1 player ARG 2 world ARG 3 pos ARG 4 state METHOD method_31685 closeContainer (Lnet/minecraft/class_1657;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V ARG 1 player ARG 2 world ARG 3 pos ARG 4 state METHOD method_31686 updateViewerCount (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V ARG 1 world ARG 2 pos ARG 3 state METHOD method_31687 scheduleBlockTick (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V ARG 0 world ARG 1 pos ARG 2 state