Class UnionMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
com.stereowalker.unionlib.world.inventory.UnionMenu
public class UnionMenu
extends net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
Field Summary
FieldsFields 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
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 slotIn) Called to determine if the current slot is valid for the stack merging (double-click) code.voidvoidfillCraftSlotsStackedContents(net.minecraft.world.entity.player.StackedContents itemHelperIn) net.minecraft.world.inventory.CraftingContainerintintnet.minecraft.world.inventory.RecipeBookTypeintintgetSize()net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) Handle when the stack in slotindexis shift-clicked.booleanrecipeMatches(net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> pRecipe) voidremoved(net.minecraft.world.entity.player.Player playerIn) Called when the container is closed.booleanshouldMoveToInventory(int p_150591_) 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, @Nullable 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.RecipeBookMenu
beginPlacingRecipe, finishPlacingRecipe, getRecipeBookCategories, handlePlacementMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, 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, setRemoteSlotNoCopy, 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
-
fillCraftSlotsStackedContents
public void fillCraftSlotsStackedContents(net.minecraft.world.entity.player.StackedContents itemHelperIn) - Specified by:
fillCraftSlotsStackedContentsin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
clearCraftingContent
public void clearCraftingContent()- Specified by:
clearCraftingContentin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
recipeMatches
public boolean recipeMatches(net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> pRecipe) - Specified by:
recipeMatchesin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
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 @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 slotIn) 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
-
getResultSlotIndex
public int getResultSlotIndex()- Specified by:
getResultSlotIndexin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
getGridWidth
public int getGridWidth()- Specified by:
getGridWidthin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
getGridHeight
public int getGridHeight()- Specified by:
getGridHeightin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
getSize
public int getSize()- Specified by:
getSizein classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
getCraftSlots
public net.minecraft.world.inventory.CraftingContainer getCraftSlots() -
getRecipeBookType
public net.minecraft.world.inventory.RecipeBookType getRecipeBookType()- Specified by:
getRecipeBookTypein classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-
shouldMoveToInventory
public boolean shouldMoveToInventory(int p_150591_) - Specified by:
shouldMoveToInventoryin classnet.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.item.crafting.CraftingInput,net.minecraft.world.item.crafting.CraftingRecipe>
-