Package hiiragi283.core.common.gui.menu
Class HTContainerMenu
-
- All Implemented Interfaces:
-
hiiragi283.core.api.gui.sync.HTSyncableMenu
public abstract class HTContainerMenu<C extends Object> extends AbstractContainerMenu implements HTSyncableMenu
Hiiragi Coreとそれを前提とするmodで使用されるAbstractContainerMenuの拡張クラスです。
- Since:
0.4.0
Hiiragi Tsubasa
-
-
Field Summary
Fields Modifier and Type Field Description private final Inventoryinventoryprivate final Ccontextprivate final List<Pair<HTSyncableSlot, HTSyncType>>trackedSlotsprivate ItemStackcarriedprivate final MenuType<?>typeprivate final IntegerstateIdprivate final NonNullList<ItemStack>itemspublic final NonNullList<Slot>slotspublic final IntegercontainerId
-
Constructor Summary
Constructors Constructor Description HTContainerMenu(MenuType<?> menuType, Integer containerId, Inventory inventory, C context)
-
Method Summary
Modifier and Type Method Description final InventorygetInventory()final CgetContext()final List<Pair<HTSyncableSlot, HTSyncType>>getTrackedSlots()final ItemStackquickMoveStack(Player player, Integer index)final UnitaddTrackedSlot(HTSyncableSlot slot, HTSyncType type)HTSyncableSlotgetTrackedSlot(Integer index)指定したindexからHTSyncableSlotを取得します。 UnitbroadcastChanges()UnitsendAllDataToRemote()-
Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addSlotListener, broadcastFullState, canDragTo, canTakeItemForPickAll, clickMenuButton, clicked, findSlot, getCarried, getItems, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidSlotIndex, removeSlotListener, removed, resumeRemoteUpdates, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getInventory
final Inventory getInventory()
-
getContext
final C getContext()
-
getTrackedSlots
final List<Pair<HTSyncableSlot, HTSyncType>> getTrackedSlots()
-
quickMoveStack
final ItemStack quickMoveStack(Player player, Integer index)
-
addTrackedSlot
final Unit addTrackedSlot(HTSyncableSlot slot, HTSyncType type)
-
getTrackedSlot
HTSyncableSlot getTrackedSlot(Integer index)
指定したindexからHTSyncableSlotを取得します。
- Returns:
取得できない場合は
null
-
broadcastChanges
Unit broadcastChanges()
-
sendAllDataToRemote
Unit sendAllDataToRemote()
-
-
-
-