Class ItemInventoryContainer<I extends net.minecraft.world.item.Item>
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
org.cyclops.cyclopscore.inventory.container.ContainerExtended
org.cyclops.cyclopscore.inventory.container.ItemInventoryContainer<I>
- Type Parameters:
I- The item instance.
- All Implemented Interfaces:
IContainerButtonClickAcceptorServer<ContainerExtended>,IValueNotifiable,IValueNotifier
@Deprecated
public abstract class ItemInventoryContainer<I extends net.minecraft.world.item.Item>
extends ContainerExtended
Deprecated.
A container for an item.
Implementations of this class will typically have two constructors,
which will look something like this:
// Called by the client-side screen factory
public MyContainer(int id, PlayerInventory inventory, FriendlyByteBuf packetBuffer) {
this(id, inventory, readItemIndex(packetBuffer), readHand(packetBuffer));
}
// Called by the server-side container provider
public MyContainer(int id, PlayerInventory inventory, int itemIndex, Hand hand) {
super(RegistryEntries.CONTAINER_MY, id, inventory, itemIndex, hand);
}
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IDeprecated.protected org.cyclops.cyclopscore.inventory.ItemLocationDeprecated.Fields 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, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots -
Constructor Summary
ConstructorsConstructorDescriptionItemInventoryContainer(net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inventory, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation) Deprecated.Make a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclicked(int slotId, int arg, net.minecraft.world.inventory.ClickType clickType, net.minecraft.world.entity.player.Player player) Deprecated.protected net.minecraft.world.inventory.SlotcreateNewSlot(net.minecraft.world.Container inventory, int index, int x, int y) Deprecated.getItem()Deprecated.Get the item instance.net.minecraft.world.item.ItemStackgetItemStack(net.minecraft.world.entity.player.Player player) Deprecated.static net.minecraft.world.InteractionHandreadHand(net.minecraft.network.FriendlyByteBuf packetBuffer) Deprecated.static intreadItemIndex(net.minecraft.network.FriendlyByteBuf packetBuffer) Deprecated.booleanstillValid(net.minecraft.world.entity.player.Player player) Deprecated.Methods inherited from class org.cyclops.cyclopscore.inventory.container.ContainerExtended
addInventory, addPlayerArmorInventory, addPlayerInventory, addSlot, addSlotListener, adjustPhantomSlot, broadcastChanges, fillPhantomSlot, getHolderLookupProvider, getNextValueId, getPlayerIInventory, getSizeInventory, 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, createCarriedSlotAccess, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, removed, removeSlotListener, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
item
Deprecated. -
itemLocation
protected org.cyclops.cyclopscore.inventory.ItemLocation itemLocationDeprecated.
-
-
Constructor Details
-
ItemInventoryContainer
public ItemInventoryContainer(@Nullable net.minecraft.world.inventory.MenuType<?> type, int id, net.minecraft.world.entity.player.Inventory inventory, org.cyclops.cyclopscore.inventory.ItemLocation itemLocation) Deprecated.Make a new instance.- Parameters:
type- The container type.id- The container id.inventory- The player inventory.itemLocation- The item location.
-
-
Method Details
-
readItemIndex
public static int readItemIndex(net.minecraft.network.FriendlyByteBuf packetBuffer) Deprecated. -
readHand
public static net.minecraft.world.InteractionHand readHand(net.minecraft.network.FriendlyByteBuf packetBuffer) Deprecated. -
getItem
Deprecated.Get the item instance.- Returns:
- The item.
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) Deprecated.- Specified by:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-
getItemStack
public net.minecraft.world.item.ItemStack getItemStack(net.minecraft.world.entity.player.Player player) Deprecated. -
createNewSlot
protected net.minecraft.world.inventory.Slot createNewSlot(net.minecraft.world.Container inventory, int index, int x, int y) Deprecated.- Overrides:
createNewSlotin classContainerExtended
-
clicked
public void clicked(int slotId, int arg, net.minecraft.world.inventory.ClickType clickType, net.minecraft.world.entity.player.Player player) Deprecated.- Overrides:
clickedin classContainerExtended
-