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

    Constructors
    Constructor
    Description
    ContainerCitizenInventory(int windowId, net.minecraft.world.entity.player.Inventory inv, int colonyId, int citizenId)
    Creating the citizen inventory container.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf 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.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index)
    Handle when the stack in slot index is shift-clicked.
    boolean
    stillValid(@NotNull net.minecraft.world.entity.player.Player playerIn)
    Determines whether supplied player can use this container

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 id
      citizenId - citizen id
  • Method Details

    • fromFriendlyByteBuf

      public static ContainerCitizenInventory fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf 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 slot index is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).
      Specified by:
      quickMoveStack in class net.minecraft.world.inventory.AbstractContainerMenu
      Parameters:
      playerIn - Player that interacted with this Container.
      index - Index of the Slot. This index is relative to the list of slots in this Container, 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:
      stillValid in class net.minecraft.world.inventory.AbstractContainerMenu
    • getDisplayName

      public String getDisplayName()
      Getter for the display name.
      Returns:
      the display name.
    • getEntity

      public Optional<? extends net.minecraft.world.entity.Entity> getEntity()
      Get the entity of this container.
      Returns:
      the entity.
    • getCitizenData

      public ICitizen getCitizenData()
      Returns: