Class ContainerBuildingInventory

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.minecolonies.api.inventory.container.ContainerBuildingInventory

public class ContainerBuildingInventory 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
    ContainerBuildingInventory(int windowId, net.minecraft.world.entity.player.Inventory inv, int colonyId, net.minecraft.core.BlockPos pos)
    Constructor to create an instance of this container.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.RegistryFriendlyByteBuf packetBuffer)
    Deserialize packet buffer to container instance.
    int
    Get the size of the inventory.
    protected boolean
    moveItemStackTo(net.minecraft.world.item.ItemStack stack, int startIndex, int endIndex, boolean reverseDirection)
     
    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.
    void
    removed(net.minecraft.world.entity.player.Player playerIn)
    Called when the container is closed.
    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, 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

    • ContainerBuildingInventory

      public ContainerBuildingInventory(int windowId, net.minecraft.world.entity.player.Inventory inv, int colonyId, net.minecraft.core.BlockPos pos)
      Constructor to create an instance of this container.
      Parameters:
      windowId - the id of the window.
      inv - the player inventory.
      colonyId - colony id
      pos - te world pos
  • Method Details

    • fromFriendlyByteBuf

      public static ContainerBuildingInventory 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

      public 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 AbstractContainerMenu, AbstractContainerMenu.slots.
    • moveItemStackTo

      protected boolean moveItemStackTo(net.minecraft.world.item.ItemStack stack, int startIndex, int endIndex, boolean reverseDirection)
      Overrides:
      moveItemStackTo in class net.minecraft.world.inventory.AbstractContainerMenu
    • removed

      public void removed(net.minecraft.world.entity.player.Player playerIn)
      Called when the container is closed.
      Overrides:
      removed in class net.minecraft.world.inventory.AbstractContainerMenu
    • 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
    • getSize

      public int getSize()
      Get the size of the inventory.
      Returns:
      the size.