mirror of https://github.com/FabricMC/yarn.git
ChestStateManager -> ViewerCountManager (#2602)
* Bring back containers * Update mappings/net/minecraft/block/entity/ContainerStateManager.mapping Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * rename to ViewerCountManager * Update mappings/net/minecraft/block/entity/ViewerCountManager.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Update mappings/net/minecraft/block/entity/ViewerCountManager.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com>
This commit is contained in:
parent
e87883ace1
commit
fe859258e3
|
@ -1,45 +0,0 @@
|
||||||
CLASS net/minecraft/class_5561 net/minecraft/block/entity/ChestStateManager
|
|
||||||
COMMENT Handles the viewer count for chest-like block entities.
|
|
||||||
FIELD field_27215 viewerCount 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 chest.
|
|
||||||
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 onChestOpened (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
|
|
||||||
COMMENT Run when this chest is opened (when the viewer count becomes nonzero).
|
|
||||||
ARG 1 world
|
|
||||||
ARG 2 pos
|
|
||||||
ARG 3 state
|
|
||||||
METHOD method_31682 onInteracted (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;II)V
|
|
||||||
COMMENT Run when a player interacts with this chest.
|
|
||||||
ARG 1 world
|
|
||||||
ARG 2 pos
|
|
||||||
ARG 3 state
|
|
||||||
ARG 4 oldViewerCount
|
|
||||||
ARG 5 newViewerCount
|
|
||||||
METHOD method_31683 onChestClosed (Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
|
|
||||||
COMMENT Run when this chest closes (when the viewer count reaches zero).
|
|
||||||
ARG 1 world
|
|
||||||
ARG 2 pos
|
|
||||||
ARG 3 state
|
|
||||||
METHOD method_31684 openChest (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 closeChest (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
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
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
|
Loading…
Reference in New Issue