Class ContainerLogicProgrammerBase
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<ILogicProgrammerElement>
org.cyclops.integrateddynamics.inventory.container.ContainerLogicProgrammerBase
- 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
,org.cyclops.cyclopscore.persist.IDirtyMarkListener
- Direct Known Subclasses:
ContainerLogicProgrammer
,ContainerLogicProgrammerPortable
public abstract class ContainerLogicProgrammerBase
extends org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<ILogicProgrammerElement>
implements org.cyclops.cyclopscore.persist.IDirtyMarkListener
Base container for the logic programmer.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Filter LP elements based on the filter value types.protected class
Load existing operator data when a variable card is inserted into the write slotNested classes/interfaces inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer
org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer.IItemPredicate<E extends Object>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer.IItemPredicate<ILogicProgrammerElement>
static final int
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, slots
-
Constructor Summary
ConstructorDescriptionContainerLogicProgrammerBase
(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory playerInventory) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
boolean
void
clicked
(int slotId, int mouseButton, net.minecraft.world.inventory.ClickType clickType, net.minecraft.world.entity.player.Player player) protected static List<ILogicProgrammerElement>
getGui()
net.minecraft.network.chat.Component
int
protected int
net.minecraft.world.Container
boolean
protected void
protected void
protected boolean
protected void
protected void
loadConfigFrom
(net.minecraft.world.item.ItemStack itemStack) void
onDirty()
void
onLabelPacket
(String label) void
removed
(net.minecraft.world.entity.player.Player player) void
setActiveElement
(ILogicProgrammerElement activeElement, int baseX, int baseY) Set the new active element.void
setActiveElementById
(net.minecraft.resources.ResourceLocation typeId, net.minecraft.resources.ResourceLocation elementId) void
setElementInventory
(ILogicProgrammerElement element, int baseX, int baseY) Set the new active element.void
protected net.minecraft.world.item.ItemStack
Methods inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer
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, stillValid
Methods inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended
addInventory, addPlayerArmorInventory, addPlayerInventory, addSlot, addSlotListener, adjustPhantomSlot, broadcastChanges, createNewSlot, fillPhantomSlot, 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, 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, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
OUTPUT_X
public static final int OUTPUT_X- See Also:
-
OUTPUT_Y
public static final int OUTPUT_Y- See Also:
-
FILTERER
protected static final org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer.IItemPredicate<ILogicProgrammerElement> FILTERER
-
-
Constructor Details
-
ContainerLogicProgrammerBase
public ContainerLogicProgrammerBase(@Nullable net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory playerInventory)
-
-
Method Details
-
getElements
-
setGui
-
getGui
-
initializeSlotsPre
protected void initializeSlotsPre() -
initializeSlotsPost
protected void initializeSlotsPost() -
getPageSize
public int getPageSize()- Specified by:
getPageSize
in classorg.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<ILogicProgrammerElement>
-
isAssertInventorySize
protected boolean isAssertInventorySize()- Overrides:
isAssertInventorySize
in classorg.cyclops.cyclopscore.inventory.container.InventoryContainer
-
getSizeInventory
protected int getSizeInventory()- Overrides:
getSizeInventory
in classorg.cyclops.cyclopscore.inventory.container.InventoryContainer
-
setActiveElementById
public void setActiveElementById(net.minecraft.resources.ResourceLocation typeId, net.minecraft.resources.ResourceLocation elementId) -
setActiveElement
Set the new active element.- Parameters:
activeElement
- The new element.baseX
- The slots X coordinatebaseY
- The slots Y coordinate
-
setElementInventory
Set the new active element.- Parameters:
element
- The new element.baseX
- The slots X coordinatebaseY
- The slots Y coordinate
-
canWriteActiveElementPre
public boolean canWriteActiveElementPre() -
canWriteActiveElement
public boolean canWriteActiveElement() -
getActiveElement
-
removed
public void removed(net.minecraft.world.entity.player.Player player) - Overrides:
removed
in classorg.cyclops.cyclopscore.inventory.container.InventoryContainer
-
onLabelPacket
-
labelCurrent
protected void labelCurrent() -
writeElementInfo
protected net.minecraft.world.item.ItemStack writeElementInfo() -
onDirty
public void onDirty()- Specified by:
onDirty
in interfaceorg.cyclops.cyclopscore.persist.IDirtyMarkListener
-
loadConfigFrom
protected void loadConfigFrom(net.minecraft.world.item.ItemStack itemStack) -
getLastError
public net.minecraft.network.chat.Component getLastError() -
getTemporaryInputSlots
public net.minecraft.world.Container getTemporaryInputSlots() -
hasWriteItemInSlot
public boolean hasWriteItemInSlot() -
additionalApplies
- Overrides:
additionalApplies
in classorg.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<ILogicProgrammerElement>
-
clicked
public void clicked(int slotId, int mouseButton, net.minecraft.world.inventory.ClickType clickType, net.minecraft.world.entity.player.Player player) - Overrides:
clicked
in classorg.cyclops.cyclopscore.inventory.container.ContainerExtended
-