Class ContainerWrenchConfig

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
org.cyclops.cyclopscore.inventory.container.ContainerExtended
org.cyclops.cyclopscore.inventory.container.InventoryContainer
org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<PartConfigEntry>
org.cyclops.integrateddynamics.inventory.container.ContainerWrenchConfig
All Implemented Interfaces:
org.cyclops.cyclopscore.client.gui.component.WidgetScrollBar.IScrollCallback, org.cyclops.cyclopscore.inventory.container.button.IContainerButtonClickAcceptorServer<org.cyclops.cyclopscore.inventory.container.ContainerExtended>, org.cyclops.cyclopscore.inventory.IValueNotifiable, org.cyclops.cyclopscore.inventory.IValueNotifier

public class ContainerWrenchConfig extends org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<PartConfigEntry>
Container for looking at the configuration inside a Wrench, and switching off the parts of it that should not be pasted.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer

    org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer.IItemPredicate<E>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final int
     

    Fields inherited from class org.cyclops.cyclopscore.inventory.container.InventoryContainer

    inventory

    Fields inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended

    ITEMBOX, offsetX, offsetY, player

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

    CARRIED_SLOT_SIZE, containerId, lastSlots, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, remoteSlots, SLOT_CLICKED_OUTSIDE, SLOT_SIZE, slots, SLOTS_PER_ROW
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContainerWrenchConfig(int id, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.FriendlyByteBuf packetBuffer)
     
    ContainerWrenchConfig(int id, net.minecraft.world.entity.player.Inventory inventory, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    protected static List<PartConfigEntry>
    getEntries(net.minecraft.world.entity.player.Player player, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation)
     
    net.minecraft.world.item.ItemStack
     
    int
     
    protected static String
     
     
    boolean
     
    protected void
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    protected void
     
    protected void
     

    Methods inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer

    additionalApplies, enableElementAt, filter, getColumns, getFilteredItemCount, getFilteredItems, getFirstElement, getScrollStepSize, getUnfilteredItemCount, getUnfilteredItems, getVisibleElement, isElementVisible, onScroll, refreshFilter, updateFilter

    Methods inherited from class org.cyclops.cyclopscore.inventory.container.InventoryContainer

    getContainerInventory, getSizeInventory, isAssertInventorySize, removed

    Methods inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended

    addInventory, addPlayerArmorInventory, addPlayerInventory, addSlot, addSlotListener, adjustPhantomSlot, broadcastChanges, clicked, createNewSlot, fillPhantomSlot, getHolderLookupProvider, getNextValueId, getPlayerIInventory, getSlotRange, getSlotStart, getValue, getValueIds, getValueNotifiableType, initializeValues, moveItemStackTo, onButtonClick, onUpdate, putButtonAction, quickMoveStack, registerSyncedVariable, resetQuickCraft, setGuiValueListener, setSlotPosX, setSlotPosY, setValue

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

    addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addStandardInventorySlots, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, removeSlotListener, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ContainerWrenchConfig

      public ContainerWrenchConfig(int id, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.FriendlyByteBuf packetBuffer)
    • ContainerWrenchConfig

      public ContainerWrenchConfig(int id, net.minecraft.world.entity.player.Inventory inventory, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation)
  • Method Details

    • getSearchableText

      protected static String getSearchableText(PartConfigEntry entry)
      Parameters:
      entry - An entry that the Wrench holds.
      Returns:
      Everything about that entry that a player can search for, including its section, as the gui itself has no room to show that.
    • getEntries

      protected static List<PartConfigEntry> getEntries(net.minecraft.world.entity.player.Player player, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation)
    • getEntries

      public List<PartConfigEntry> getEntries()
      Returns:
      Everything that the Wrench holds, whether it is switched on or not.
    • getItemStack

      public net.minecraft.world.item.ItemStack getItemStack()
    • getWrenchSnapshot

      public Optional<PartConfigSnapshot> getWrenchSnapshot()
      Returns:
      The configuration that the Wrench holds, if it still holds one.
    • isEntryEnabled

      public boolean isEntryEnabled(String id)
      Parameters:
      id - The identifier of an entry.
      Returns:
      If that entry is going to be pasted.
    • toggleEntry

      protected void toggleEntry(String id)
    • toggleAll

      protected void toggleAll()
    • setSnapshot

      protected void setSnapshot(PartConfigSnapshot snapshot)
    • getPageSize

      public int getPageSize()
      Specified by:
      getPageSize in class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<PartConfigEntry>
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Overrides:
      stillValid in class org.cyclops.cyclopscore.inventory.container.InventoryContainer