FurnaceInventory
com.jsmacrosce.jsmacros.client.api.classes.inventory.FurnaceInventory
Inventory wrapper for a furnace screen, exposing its input, fuel, result, and smelting state.
js
const inv = Player.openInventory();
if (inv instanceof Inventories.Furnace) {
Chat.log(`${inv.getSmeltedItem().getItemId()} -> ${inv.getOutput().getItemId()}, `
+ `${inv.getRemainingSmeltingTime()} ticks left`);
}Available in scripts as Inventories.Furnace.
Constructors
new FurnaceInventory
new FurnaceInventory(AbstractFurnaceScreen<?> inventory)#Wraps a furnace screen without opening or creating it; use FPlayer.openInventory() to obtain the current inventory wrapper.
Parameters:
inventory: the furnace screen to wrap
Methods
canUseAsFuel
Parameters:
stack: the item to check
Returns:
true if the item is a valid fuel, false otherwise.getCraftingHeight
Returns the fixed height of the furnace input grid.
Returns: 1
getCraftingSlotCount
Returns the number of input slots, excluding the fuel and result slots.
Returns: 1
getCraftingWidth
Returns the fixed width of the furnace input grid.
Returns: 1
getFuel
Returns: the fuel item.
getFuelValues
Returns item registry IDs mapped to their burn times in ticks. On Minecraft 26.3 and later, uses the open furnace's integrated-server context when available; remote servers use local vanilla ordinary-furnace defaults, which do not reflect remote datapack providers. Items referencing providers unknown to the local defaults are omitted on remote servers.
Returns: the fuel-value map
getInput
Returns the furnace's sole input item; the coordinates are ignored.
Parameters:
x: ignoredy: ignored
Returns: the item in the input slot
Returns input cells in an array indexed by column, then row. Its dimensions are the reported width and height, so it is empty when either dimension is zero.
Returns: the grid as
[column][row]getOutput
Returns the item currently in the furnace menu's result slot.
Returns: the item in the result slot
getRemainingFuelTime
Returns the furnace menu's remaining fuel time in ticks.
Returns: the remaining fuel time
getRemainingSmeltingTime
Returns the total smelting time minus the current progress, in ticks.
Returns: the calculated remaining time
getSmeltedItem
Returns: the currently smelting item.
getSmeltingProgress
Returns the furnace menu's current smelting progress in ticks.
Returns: the current progress
getTotalFuelTime
Returns the furnace menu's total fuel time in ticks.
Returns: the total fuel time
getTotalSmeltingTime
Returns the total smelting time reported by the furnace menu, in ticks.
Returns: the total smelting time
isBurning
Returns:
true if the furnace menu is lit, false otherwiseisSmeltable
Parameters:
stack: the item to check
Returns:
true if the item can be smelted, false otherwise.