Class ContainerCitizenInventory
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.minecolonies.api.inventory.container.ContainerCitizenInventory
public class ContainerCitizenInventory
extends net.minecraft.world.inventory.AbstractContainerMenu
Container for Mie
-
Field Summary
Fields inherited from class net.minecraft.world.inventory.AbstractContainerMenu
CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots -
Constructor Summary
ConstructorsConstructorDescriptionContainerCitizenInventory(int windowId, net.minecraft.world.entity.player.Inventory inv, int colonyId, int citizenId) Creating the citizen inventory container. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContainerCitizenInventoryfromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.RegistryFriendlyByteBuf packetBuffer) Deserialize packet buffer to container instance.Getter for the display name.Optional<? extends net.minecraft.world.entity.Entity> Get the entity of this container.@NotNull net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) Handle when the stack in slotindexis shift-clicked.booleanstillValid(@NotNull net.minecraft.world.entity.player.Player playerIn) Determines whether supplied player can use this containerMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Constructor Details
-
ContainerCitizenInventory
public ContainerCitizenInventory(int windowId, net.minecraft.world.entity.player.Inventory inv, int colonyId, int citizenId) Creating the citizen inventory container.- Parameters:
windowId- the window id.inv- the inventory.colonyId- colony idcitizenId- citizen id
-
-
Method Details
-
fromFriendlyByteBuf
public static ContainerCitizenInventory fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.RegistryFriendlyByteBuf packetBuffer) Deserialize packet buffer to container instance.- Parameters:
windowId- the id of the window.inv- the player inventory.packetBuffer- network buffer- Returns:
- new instance
-
quickMoveStack
@NotNull public @NotNull net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) Handle when the stack in slotindexis shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStackin classnet.minecraft.world.inventory.AbstractContainerMenu- Parameters:
playerIn- Player that interacted with thisContainer.index- Index of theSlot. This index is relative to the list of slots in thisContainer,AbstractContainerMenu.slots.
-
stillValid
public boolean stillValid(@NotNull @NotNull net.minecraft.world.entity.player.Player playerIn) Determines whether supplied player can use this container- Specified by:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-
getDisplayName
Getter for the display name.- Returns:
- the display name.
-
getEntity
Get the entity of this container.- Returns:
- the entity.
-
getCitizenData
- Returns:
-