Class ContainerRack
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.minecolonies.api.inventory.container.ContainerRack
public class ContainerRack
extends net.minecraft.world.inventory.AbstractContainerMenu
The container class for the rack.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AbstractTileEntityRackThe tileEntity.final AbstractTileEntityRackThe tileEntity.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
ConstructorsConstructorDescriptionContainerRack(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.core.BlockPos rack, net.minecraft.core.BlockPos neighbor) The container constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclicked(int slotId, int dragType, @NotNull net.minecraft.world.inventory.ClickType clickTypeIn, net.minecraft.world.entity.player.Player player) static ContainerRackfromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf packetBuffer) Deserialize packet buffer to container instance.protected booleanmoveItemStackTo(net.minecraft.world.item.ItemStack stack, int startIndex, int endIndex, boolean reverseDirection) @NotNull net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) booleanstillValid(net.minecraft.world.entity.player.Player playerIn) Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
rack
The tileEntity. -
neighborRack
The tileEntity.
-
-
Constructor Details
-
ContainerRack
public ContainerRack(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.core.BlockPos rack, net.minecraft.core.BlockPos neighbor) The container constructor.- Parameters:
windowId- the window id.inv- the inventory.rack- te world pos.neighbor- neighbor te world pos
-
-
Method Details
-
fromFriendlyByteBuf
public static ContainerRack fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf packetBuffer) Deserialize packet buffer to container instance.- Parameters:
windowId- the id of the window.inv- the player inventory.packetBuffer- network buffer- Returns:
- new instance
-
clicked
public void clicked(int slotId, int dragType, @NotNull @NotNull net.minecraft.world.inventory.ClickType clickTypeIn, net.minecraft.world.entity.player.Player player) - Overrides:
clickedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
quickMoveStack
@NotNull public @NotNull net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) - Specified by:
quickMoveStackin classnet.minecraft.world.inventory.AbstractContainerMenu
-
moveItemStackTo
protected boolean moveItemStackTo(net.minecraft.world.item.ItemStack stack, int startIndex, int endIndex, boolean reverseDirection) - Overrides:
moveItemStackToin classnet.minecraft.world.inventory.AbstractContainerMenu
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player playerIn) - Specified by:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-