Class WoodcutterMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.zebatek.simple_woodcutter.menu.WoodcutterMenu
public class WoodcutterMenu
extends net.minecraft.world.inventory.AbstractContainerMenu
-
Field Summary
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
ConstructorsConstructorDescriptionWoodcutterMenu(int id, net.minecraft.world.entity.player.Inventory playerInv) WoodcutterMenu(int id, net.minecraft.world.entity.player.Inventory playerInv, net.minecraft.world.inventory.ContainerLevelAccess access) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclickMenuButton(net.minecraft.world.entity.player.Player player, int id) Handles the given Button-click on the server, currently only used by enchanting.intList<net.minecraft.world.item.crafting.RecipeHolder<WoodcutterRecipe>> intbooleannet.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player player, int index) Handle when the stack in slotindexis shift-clicked.voidregisterUpdateListener(Runnable runnable) voidremoved(net.minecraft.world.entity.player.Player player) Called when the container is closed.voidslotsChanged(net.minecraft.world.Container container) Callback for when the crafting matrix is changed.booleanstillValid(net.minecraft.world.entity.player.Player player) Determines whether supplied player can use this containerMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, 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
-
Constructor Details
-
WoodcutterMenu
public WoodcutterMenu(int id, net.minecraft.world.entity.player.Inventory playerInv) -
WoodcutterMenu
public WoodcutterMenu(int id, net.minecraft.world.entity.player.Inventory playerInv, net.minecraft.world.inventory.ContainerLevelAccess access)
-
-
Method Details
-
registerUpdateListener
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) Description copied from class:net.minecraft.world.inventory.AbstractContainerMenuDetermines 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 player, int index) Description copied from class:net.minecraft.world.inventory.AbstractContainerMenuHandle 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
-
slotsChanged
public void slotsChanged(net.minecraft.world.Container container) Description copied from class:net.minecraft.world.inventory.AbstractContainerMenuCallback for when the crafting matrix is changed.- Overrides:
slotsChangedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
clickMenuButton
public boolean clickMenuButton(net.minecraft.world.entity.player.Player player, int id) Description copied from class:net.minecraft.world.inventory.AbstractContainerMenuHandles the given Button-click on the server, currently only used by enchanting. Name is for legacy.- Overrides:
clickMenuButtonin classnet.minecraft.world.inventory.AbstractContainerMenu
-
removed
public void removed(net.minecraft.world.entity.player.Player player) Description copied from class:net.minecraft.world.inventory.AbstractContainerMenuCalled when the container is closed.- Overrides:
removedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
getSelectedRecipeIndex
public int getSelectedRecipeIndex() -
getRecipes
-
getNumRecipes
public int getNumRecipes() -
hasInputItem
public boolean hasInputItem()
-