Class ContainerMultipartAspects<P extends IPartType<P,S>,S extends IPartState<P>,A extends IAspect>
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<A>
org.cyclops.integrateddynamics.core.inventory.container.ContainerMultipartAspects<P,S,A>
- 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:
ContainerPartReader,ContainerPartWriter
public abstract class ContainerMultipartAspects<P extends IPartType<P,S>,S extends IPartState<P>,A extends IAspect>
extends org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer<A>
implements org.cyclops.cyclopscore.persist.IDirtyMarkListener
Container for parts.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer
org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer.IItemPredicate<E extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringprotected final net.minecraft.world.ContainerFields inherited from class org.cyclops.cyclopscore.inventory.container.InventoryContainer
inventoryFields inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended
ITEMBOX, offsetX, offsetY, playerFields 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
ConstructorsConstructorDescriptionContainerMultipartAspects(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.Container inventory, PartTarget target, Optional<IPartContainer> partContainer, P partType, List<A> items) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected net.minecraft.world.Containerprotected voiddisableSlot(int slotIndex) protected voidenableElementAt(int row, int elementIndex, A element) protected abstract voidenableSlot(int slotIndex, int row) abstract intprotected List<net.minecraft.network.chat.MutableComponent>Determine the values of all properties of the given aspect that deviate from their default value.List<net.minecraft.network.chat.MutableComponent>Get the modified property values of the given aspect, as synced from the server.intvoidonScroll(int firstRow) voidremoved(net.minecraft.world.entity.player.Player player) booleanstillValid(net.minecraft.world.entity.player.Player player) net.minecraft.world.item.ItemStackwriteAspectInfo(boolean generateId, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level level, IAspect aspect) Methods inherited from class org.cyclops.cyclopscore.inventory.container.ScrollingInventoryContainer
additionalApplies, filter, getColumns, getFilteredItemCount, getFilteredItems, getFirstElement, getScrollStepSize, getUnfilteredItemCount, getUnfilteredItems, getVisibleElement, isElementVisible, refreshFilter, updateFilterMethods inherited from class org.cyclops.cyclopscore.inventory.container.InventoryContainer
getContainerInventory, getSizeInventory, isAssertInventorySizeMethods inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended
addInventory, addPlayerArmorInventory, addPlayerInventory, addSlot, addSlotListener, adjustPhantomSlot, clicked, createNewSlot, fillPhantomSlot, getNextValueId, getPlayerIInventory, getSlotRange, getSlotStart, getValue, getValueIds, getValueNotifiableType, initializeValues, moveItemStackTo, onButtonClick, onUpdate, putButtonAction, quickMoveStack, registerSyncedVariable, resetQuickCraft, setGuiValueListener, setSlotPosX, setSlotPosY, setValueMethods 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, transferStateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.cyclopscore.persist.IDirtyMarkListener
onDirty
-
Field Details
-
BUTTON_SETTINGS
-
BUTTON_OFFSETS
-
inputSlots
protected final net.minecraft.world.Container inputSlots
-
-
Constructor Details
-
ContainerMultipartAspects
public ContainerMultipartAspects(@Nullable net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory playerInventory, net.minecraft.world.Container inventory, PartTarget target, Optional<IPartContainer> partContainer, P partType, List<A> items)
-
-
Method Details
-
getPartType
-
getTarget
-
getPartContainer
-
getPartState
-
getAspectPropertyButtons
-
broadcastChanges
public void broadcastChanges()- Overrides:
broadcastChangesin classorg.cyclops.cyclopscore.inventory.container.ContainerExtended
-
getModifiedAspectPropertyValues
protected List<net.minecraft.network.chat.MutableComponent> getModifiedAspectPropertyValues(IAspect aspect) Determine the values of all properties of the given aspect that deviate from their default value. The returned list has one entry for each of the aspect's property types, in the order ofIAspect.getPropertyTypes(). Properties that still have their default value are represented by an empty component.- Parameters:
aspect- An aspect that has properties.- Returns:
- The modified property values, in the order of the aspect's property types.
-
getModifiedAspectPropertyValuesSynced
@Nullable public List<net.minecraft.network.chat.MutableComponent> getModifiedAspectPropertyValuesSynced(IAspect aspect) Get the modified property values of the given aspect, as synced from the server.- Parameters:
aspect- An aspect.- Returns:
- The modified property values, in the order of
IAspect.getPropertyTypes(), or null if they are unknown.
-
getAspectBoxHeight
public abstract int getAspectBoxHeight() -
constructInputSlotsInventory
protected net.minecraft.world.Container constructInputSlotsInventory() -
removed
public void removed(net.minecraft.world.entity.player.Player player) - Overrides:
removedin classorg.cyclops.cyclopscore.inventory.container.InventoryContainer
-
disableSlot
protected void disableSlot(int slotIndex) -
enableSlot
protected abstract void enableSlot(int slotIndex, int row) -
getPageSize
public int getPageSize() -
onScroll
public void onScroll(int firstRow) -
enableElementAt
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Overrides:
stillValidin classorg.cyclops.cyclopscore.inventory.container.InventoryContainer
-
writeAspectInfo
public net.minecraft.world.item.ItemStack writeAspectInfo(boolean generateId, net.minecraft.world.item.ItemStack itemStack, net.minecraft.world.level.Level level, IAspect aspect)
-