Class ContainerCraftingFurnace
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.minecolonies.api.inventory.container.ContainerCraftingFurnace
public class ContainerCraftingFurnace
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
ConstructorsConstructorDescriptionContainerCraftingFurnace(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 TypeMethodDescriptionbooleancanTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn) voidclicked(int slotId, int clickedButton, net.minecraft.world.inventory.ClickType mode, net.minecraft.world.entity.player.Player playerIn) static ContainerCraftingFurnacefromFriendlyByteBuf(int windowId, net.minecraft.world.entity.player.Inventory inv, net.minecraft.network.FriendlyByteBuf 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) voidsetFurnaceInput(net.minecraft.world.item.ItemStack stack) Sets the furnace 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, 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
-
ContainerCraftingFurnace
public ContainerCraftingFurnace(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 ContainerCraftingFurnace 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 clickedButton, net.minecraft.world.inventory.ClickType mode, net.minecraft.world.entity.player.Player playerIn) - Overrides:
clickedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
setFurnaceInput
public void setFurnaceInput(net.minecraft.world.item.ItemStack stack) Sets the furnace input item (intended mainly for crafting teaching).- Parameters:
stack- The input 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
-
canTakeItemForPickAll
public boolean canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn) - Overrides:
canTakeItemForPickAllin 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.
-