Class GhostItemContainer<T>

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.simibubi.create.foundation.gui.container.ContainerBase<T>
com.simibubi.create.foundation.gui.container.GhostItemContainer<T>
All Implemented Interfaces:
IClearableContainer
Direct Known Subclasses:
AbstractFilterContainer, BlueprintContainer, LinkedControllerContainer

public abstract class GhostItemContainer<T> extends ContainerBase<T> implements IClearableContainer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    net.minecraftforge.items.ItemStackHandler
     

    Fields inherited from class com.simibubi.create.foundation.gui.container.ContainerBase

    contentHolder, player, playerInventory

    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
    Modifier
    Constructor
    Description
    protected
    GhostItemContainer(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf extraData)
     
    protected
    GhostItemContainer(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inv, T contentHolder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract boolean
     
    boolean
    canDragTo(net.minecraft.world.inventory.Slot slotIn)
     
    boolean
    canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn)
     
    void
     
    void
    clicked(int slotId, int dragType, net.minecraft.world.inventory.ClickType clickTypeIn, net.minecraft.world.entity.player.Player player)
     
    protected abstract net.minecraftforge.items.ItemStackHandler
     
    protected void
    initAndReadInventory(T contentHolder)
     
    net.minecraft.world.item.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index)
     

    Methods inherited from class com.simibubi.create.foundation.gui.container.ContainerBase

    addPlayerSlots, addSlots, createOnClient, init, removed, saveData, stillValid

    Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftSlotCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, 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

    Methods inherited from interface com.simibubi.create.foundation.gui.container.IClearableContainer

    sendClearPacket
  • Field Details

    • ghostInventory

      public net.minecraftforge.items.ItemStackHandler ghostInventory
  • Constructor Details

    • GhostItemContainer

      protected GhostItemContainer(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf extraData)
    • GhostItemContainer

      protected GhostItemContainer(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inv, T contentHolder)
  • Method Details

    • createGhostInventory

      protected abstract net.minecraftforge.items.ItemStackHandler createGhostInventory()
    • allowRepeats

      protected abstract boolean allowRepeats()
    • initAndReadInventory

      protected void initAndReadInventory(T contentHolder)
      Specified by:
      initAndReadInventory in class ContainerBase<T>
    • clearContents

      public void clearContents()
      Specified by:
      clearContents in interface IClearableContainer
    • canTakeItemForPickAll

      public boolean canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn)
      Overrides:
      canTakeItemForPickAll in class net.minecraft.world.inventory.AbstractContainerMenu
    • canDragTo

      public boolean canDragTo(net.minecraft.world.inventory.Slot slotIn)
      Overrides:
      canDragTo in class net.minecraft.world.inventory.AbstractContainerMenu
    • clicked

      public void clicked(int slotId, int dragType, net.minecraft.world.inventory.ClickType clickTypeIn, net.minecraft.world.entity.player.Player player)
      Overrides:
      clicked in class net.minecraft.world.inventory.AbstractContainerMenu
    • quickMoveStack

      public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index)
      Overrides:
      quickMoveStack in class net.minecraft.world.inventory.AbstractContainerMenu