Class UnionMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu
net.minecraft.world.inventory.AbstractCraftingMenu
com.stereowalker.unionlib.world.inventory.UnionMenu
public class UnionMenu
extends net.minecraft.world.inventory.AbstractCraftingMenu
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.inventory.RecipeBookMenu
net.minecraft.world.inventory.RecipeBookMenu.PostPlaceAction -
Field Summary
FieldsFields inherited from class net.minecraft.world.inventory.AbstractCraftingMenu
craftSlots, resultSlotsFields 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, SLOT_SIZE, slots, SLOTS_PER_ROW -
Constructor Summary
ConstructorsConstructorDescriptionUnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory) UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, UnionInventory unionInventory, boolean localWorld, net.minecraft.world.entity.player.Player playerIn) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slot) Called to determine if the current slot is valid for the stack merging (double-click) code.net.minecraft.world.inventory.CraftingContainerList<net.minecraft.world.inventory.Slot> net.minecraft.world.inventory.RecipeBookTypenet.minecraft.world.inventory.Slotprotected net.minecraft.world.entity.player.Playerowner()net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) Handle when the stack in slotindexis shift-clicked.voidremoved(net.minecraft.world.entity.player.Player playerIn) Called when the container is closed.protected static voidslotChangedCraftingGrid(net.minecraft.world.inventory.AbstractContainerMenu pMenu, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer pResult, net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> p_345124_) voidslotsChanged(net.minecraft.world.Container inventoryIn) Callback for when the crafting matrix is changed.booleanstillValid(net.minecraft.world.entity.player.Player playerIn) Determines whether supplied player can use this containerMethods inherited from class net.minecraft.world.inventory.AbstractCraftingMenu
addCraftingGridSlots, addResultSlot, beginPlacingRecipe, fillCraftSlotsStackedContents, finishPlacingRecipe, getGridHeight, getGridWidth, handlePlacementMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
isLocalWorld
public final boolean isLocalWorld
-
-
Constructor Details
-
UnionMenu
public UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory) -
UnionMenu
public UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, UnionInventory unionInventory, boolean localWorld, net.minecraft.world.entity.player.Player playerIn)
-
-
Method Details
-
slotsChanged
public void slotsChanged(net.minecraft.world.Container inventoryIn) Callback for when the crafting matrix is changed.- Overrides:
slotsChangedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
slotChangedCraftingGrid
protected static void slotChangedCraftingGrid(net.minecraft.world.inventory.AbstractContainerMenu pMenu, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer pResult, @Nullable net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> p_345124_) -
removed
public void removed(net.minecraft.world.entity.player.Player playerIn) Called when the container is closed.- Overrides:
removedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player playerIn) Determines whether supplied player can use this container- Specified by:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-
quickMoveStack
public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) Handle when the stack in slotindexis shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStackin classnet.minecraft.world.inventory.AbstractContainerMenu
-
canTakeItemForPickAll
public boolean canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slot) Called to determine if the current slot is valid for the stack merging (double-click) code. The stack passed in is null for the initial slot that was double-clicked.- Overrides:
canTakeItemForPickAllin classnet.minecraft.world.inventory.AbstractContainerMenu
-
getResultSlot
public net.minecraft.world.inventory.Slot getResultSlot()- Specified by:
getResultSlotin classnet.minecraft.world.inventory.AbstractCraftingMenu
-
getInputGridSlots
- Specified by:
getInputGridSlotsin classnet.minecraft.world.inventory.AbstractCraftingMenu
-
getCraftSlots
public net.minecraft.world.inventory.CraftingContainer getCraftSlots() -
getRecipeBookType
public net.minecraft.world.inventory.RecipeBookType getRecipeBookType()- Specified by:
getRecipeBookTypein classnet.minecraft.world.inventory.RecipeBookMenu
-
owner
protected net.minecraft.world.entity.player.Player owner()- Specified by:
ownerin classnet.minecraft.world.inventory.AbstractCraftingMenu
-