Class ContainerCraftingBrewingstand
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.minecolonies.api.inventory.container.ContainerCraftingBrewingstand
public class ContainerCraftingBrewingstand
extends net.minecraft.world.inventory.AbstractContainerMenu
Crafting container for the recipe teaching of furnace recipes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal net.minecraft.core.BlockPosThe colony building.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
ConstructorsConstructorDescriptionContainerCraftingBrewingstand(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.core.BlockPos pos, int moduleId) Constructs the GUI with the player. -
Method Summary
Modifier and TypeMethodDescriptionvoidclicked(int slotId, int clickedButton, net.minecraft.world.inventory.ClickType mode, net.minecraft.world.entity.player.Player playerIn) fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.RegistryFriendlyByteBuf packetBuffer) Deserialize packet buffer to container instance.intGet the module if of the container.net.minecraft.world.entity.player.PlayerGetter for the player.net.minecraft.core.BlockPosgetPos()Get the position of the container.net.minecraft.world.level.LevelGetter for the world obj.@NotNull net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index) voidsetContainer(net.minecraft.world.item.ItemStack stack) Sets the container (input potion, intended mostly for crafting teaching).voidsetInput(net.minecraft.world.item.ItemStack stack) Sets the input item (intended mainly for crafting teaching).booleanstillValid(@NotNull 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, moveItemStackTo, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, slotsChanged, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
buildingPos
public final net.minecraft.core.BlockPos buildingPosThe colony building.
-
-
Constructor Details
-
ContainerCraftingBrewingstand
public ContainerCraftingBrewingstand(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.core.BlockPos pos, int moduleId) Constructs the GUI with the player.- Parameters:
windowId- the window id.inv- the player inventory.pos- te world pos
-
-
Method Details
-
fromFriendlyByteBuf
public static ContainerCraftingBrewingstand fromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.RegistryFriendlyByteBuf 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 clickedButton, net.minecraft.world.inventory.ClickType mode, net.minecraft.world.entity.player.Player playerIn) - Overrides:
clickedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
setInput
public void setInput(net.minecraft.world.item.ItemStack stack) Sets the input item (intended mainly for crafting teaching).- Parameters:
stack- The input stack.
-
setContainer
public void setContainer(net.minecraft.world.item.ItemStack stack) Sets the container (input potion, intended mostly for crafting teaching).- Parameters:
stack- The container stack.
-
stillValid
public boolean stillValid(@NotNull @NotNull net.minecraft.world.entity.player.Player playerIn) - Specified by:
stillValidin 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
-
getPlayer
public net.minecraft.world.entity.player.Player getPlayer()Getter for the player.- Returns:
- the player.
-
getWorldObj
public net.minecraft.world.level.Level getWorldObj()Getter for the world obj.- Returns:
- the world obj.
-
getPos
public net.minecraft.core.BlockPos getPos()Get the position of the container.- Returns:
- the position.
-
getModuleId
public int getModuleId()Get the module if of the container.- Returns:
- the module id.
-