Machine
Overview
Machine turns machine design into configuration. One Machine Definition entry describes a type of machine: how many input, output, fuel and upgrade slots it has, what it processes, what it costs in fuel and energy, how it looks, what its hologram says and how many copies a player or an island may place. The extension reads the definition and runs every placed copy. A furnace, a grinder, a cobblestone generator or a mob grinder is an entry, not code.
Machines belong to BTC Sky islands. A machine can only be placed on the player's own island, is bounded by per-player and per-island limits, and its tier is unlocked by the island's research tree. Energy and liquids are shared across a dimension of the island: generators and cells build a pool, and every linked machine of that dimension draws from it.
This is a private extension of the BTC build of TypeWriter (BTC Core, Paper or Folia), documented for reference. The runtime is Folia-safe: slots are cached in memory and saved asynchronously.
Features
- One entry per machine — slots, recipes, fuel, energy, visuals, hologram, limits and automation live in a single Machine Definition.
- 27 processing types — recipe machines (smelting, grinding, sawing, mixing, brewing…), storage, logistics, area machines, energy machines, spawners, grinders and more.
- Multi-input and random recipes — extra inputs and outputs, chance-based outputs, liquid inputs and outputs, catalogue items and vanilla potions.
- Shared energy grid and liquid tanks — cells, generators and tanks pool per island dimension; a machine can be unlinked from the grid.
- Tiers and upgrade modules — permanent tiers unlocked by BTC Sky research, plus removable modules (speed, yield, fortune, range, filter, capacity, liquid fuel) that stack with them.
- Island protection and limits — own-island placement, build flag, per-player, per-island and per-dimension caps.
- Redstone and hoppers — redstone mode, ejection, comparator output and completion pulses, hopper transfers.
- Holograms — a status text with progress bar above each machine, fully MiniMessage-formatted.
- Dashboard menu — a menu that lists every machine of the dimension with its state, energy and link status.
- Persistence — placed machines, inventories, energy and progress are saved in a Machine Data Artifact.
Installation
- Install TypeWriter with the BTC build (BTC Core on Paper or Folia).
- Install the extensions Machine depends on: Quest, RPGBundle (RPG Core), BTC Sky, BTCMobs and GuiAndDialogs (the shared GUI layer).
- Optional: install CraftEngine if a definition uses the
FURNITUREorCUSTOM_BLOCKvisual, and MiniPlaceholders to use the placeholders. - Put the Machine JAR in
plugins/Typewriter/extensions/and restart the server. - Redstone comparator output and completion pulses only work when BTC Core provides redstone emission.
Getting started
Create a furnace that smelts iron ore into ingots:
- In the TypeWriter web panel, open a static page and add a Machine Data Artifact. It stores every placed machine. Do not change its
artifactIdafterwards, or the saved machines are lost. - On the same page, add a Machine Definition. Give it a
name, keepprocessingTypeonSMELTING. - Set
storageRefto the artifact from step 1. - In
recipes, add one recipe:inputMaterialIRON_ORE,outputMaterialIRON_INGOT,outputAmount1,cookTime200(ticks, so 10 seconds). LeavefuelCostat1or more if the machine must burn fuel. - In
fuelTypes, addCOALwith aburnTimeand afuelValue. - Set
spawnItemto the item players place to create the machine. A definition needs aspawnItemor avanillaBlock, otherwise it is rejected at publication. - Optionally set
perIslandLimitto cap the number of copies per island. - Publish. Place the item on your own island: the machine appears with its hologram, and a right-click opens its menu.
vanillaBlock (for example BREWING_STAND) makes the definition take over that vanilla block: placing it creates the machine instead. Vanilla conversions are not capped by the placement limit warning, because a cap would also cap the vanilla block.
How it works
A machine is a definition (the entry) plus instances (the copies placed in the world). The definition never changes at runtime; each instance keeps its own inventory, energy charge and progress.
The definition model
Every field of Machine Definition belongs to one of these groups:
| Group | Fields | What it controls |
|---|---|---|
| Type | processingType, behaviors | What the machine does. behaviors is optional and derived from the type when empty. |
| Slots | inputSlots, outputSlots, hasFuelSlot, upgradeSlots, essenceSlots, filterSlots, shearsSlots, maxPerSlot | The inventory layout. A machine layout is limited to 54 slots. |
| Recipes and fuel | recipes, fuelTypes | What goes in and what comes out, how long it takes and what it costs. |
| Energy and liquids | energyCapacity, energyGenerationPerTick, liquidTankCapacity, liquidFuelName | Pool contribution and liquid handling. |
| Progression | tiers, allowedUpgrades, upgradeSpecs | Permanent tiers and removable modules. |
| Look | spawnItem, visualType, furnitureId, customBlockId, alignWithPlayerYaw, hologram* | Item, model and hologram. |
| Placement | machineLimit, perIslandLimit, islandLimitUpgradeKey, dimensionScope, vanillaBlock | Who can place it, where and how many. |
| Automation | hopperInterval, hopperTransferAmount, redstoneMode, ejectWhenPowered, redstoneComparatorOutput, redstonePulseOnComplete, redstonePulseTicks | Hoppers and redstone. |
| Persistence | storageRef, guiStorageRef | Where instances and STORAGE contents are saved. |
Processing types
| Family | Types |
|---|---|
Recipe machines, driven by recipes | SMELTING, LIQUID_SMELTING, MULTI_SMELTING, GRINDING, SAWING, MIXING, COMPACTING, ENRICHING, RECYCLING, BREWING, AUTO_CRAFTING, INDUSTRIAL, GENERIC |
| Production | GENERATOR (no input: produces the recipe outputs over time, optional energy cost) |
| Storage and logistics | STORAGE, SORTING (each filter slot claims a side), CONVEYOR (directional belt) |
| Area machines | VACUUM (vacuumRange), SHEARING (shearRange, shearInterval, shearsSlots) |
| Energy | ENERGY_CELL, ENERGY_GENERATOR, CHARGING (chargeables, chargeRatePerSecond) |
| Entities | ASSEMBLER (assemblerMode SPAWN or COLLECT, assemblerEntityType, assemblerMobId, assemblerIngredients, assemblerEnergyCost, assemblerInterval, assemblerRange, spawnerUpgrades), MOB_GRINDING (grinder* fields), EXPERIENCE_TANK (experienceCapacity) |
| Special | CONTROL_PANEL (runs panelOpenCommand / panelAltCommand, cannot be picked up), TRANSMUTATION (moves the highest enchantment of an item onto a book for experience bottles) |
SMELTING and AUTO_CRAFTING fall back to vanilla recipes when no recipe is declared. All other recipe machines with zero recipes accept items and stay idle forever; the extension logs a warning at publication.
Energy and liquids
Energy is stored in ENERGY_CELL machines. The island dimension's pool is the sum of its linked cells. ENERGY_GENERATOR machines feed it, and consumers draw from it. A machine joins the grid of its dimension as soon as it is placed; the Machine Link button (or the dashboard) takes it off and back on. A cell in the Overworld never feeds a machine in the Nether.
Liquid tanks work the same way: a linked machine reaches every tank of its dimension, an unlinked one sees only its own. A recipe consumes or produces liquids with liquidInputName/liquidInputAmount and liquidOutputName/liquidOutputAmount.
Tiers and upgrade modules
- A tier (
tiers) is permanent. Each tier names the BTC Sky research node (researchNode) that unlocks it and sets speed, yield and energy multipliers, a fortune chance and extra slots. List tiers in ascending order: the highest unlocked one applies to every copy of the machine on the island. A tier with a blankresearchNodeis rejected. - An upgrade module (
upgradeSpecs) is an item put in an upgrade slot.itemIdis the BTC item id (recommended),materialis a fallback. Itstype(SPEED,YIELD,ENERGY_EFFICIENCY,FORTUNE,RANGE,FILTER,CAPACITY,LIQUID_FUEL) only counts if it is listed inallowedUpgrades. - Tier and modules multiply together.
Menus
Machine Menu is a GUI built from layouts of the shared GUI extension (layoutPool, mainLayoutId, inventoryRows). Items of the layout whose buttonType is a Machine button are filled with live data:
| Button type | Effect |
|---|---|
MACHINE_OPEN, MACHINE_SMELT, MACHINE_COLLECT, MACHINE_STATUS, MACHINE_FUEL | Standard machine actions and status display. |
MACHINE_LINK | Links the machine to its dimension grid, or unlinks it. |
MACHINE_PICKUP | Removes the open machine and gives it back as an item. |
NAV_BACK, NAV_CLOSE | Go back or close. |
MACHINE_GRID_INFO | Summary of the dimension: machine counts, energy stored, capacity, produced, consumed and balance. |
MACHINE_ENTRY | One machine of the dimension per tagged slot. Left-click toggles its hologram, right-click toggles its grid link. |
MACHINE_LIST_ARROW | Scroll arrow of the machine list, with the page counter. |
Two more entries complete the set. Open Machine GUI links a definition to a menu title and size, but its action does nothing when triggered in the current code: machines open their menu on right-click. Machine Position Variable returns the position of the viewer's own machine of a given definition in their dimension, so one NPC entry can follow each island's machine.
The labels shown by the dashboard (states, link, hologram) come from Machine Dashboard Wording. The scrolling and the open command come from Machine Dashboard Command.
Commands
| Command | Description |
|---|---|
/typewriter machine give | List every registered machine. |
/typewriter machine give <machine> | Give yourself the item of a machine, by id or by part of its name (accents and case are ignored). |
/typewriter machine liquide | Show the liquids held by the machine you are looking at (within 6 blocks). |
/typewriter machine liquide <liquid> <millibuckets> | Pour a liquid into the targeted machine. A test tool: no player gesture fills a tank. |
The /machine tree is registered under the TypeWriter command, so it is typed /typewriter machine … (alias /tw machine …). All of it requires machine.admin. Entries can register more commands, as top-level commands:
| Command | Description |
|---|---|
/<commandName> scroll <delta>, reset | Scroll the dashboard list, or rewind it. Default name machines. |
/<commandName> dashboard | Open the menu named in dashboardMenuId. |
/<commandName> link <instanceId>, hologram <instanceId> | Switch the grid link or the hologram of a machine. Used by the dashboard slots. |
/<commandName> of Machine Test Command | Fires its triggers, if criteria match. Default name machine-test. |
/<commandName>, clear, bench of Machine Test Platform Command | Build a showcase of machines where you stand, remove it, or provision loadbench_* worlds. Default name machine-test-platform. |
Permissions
| Permission | Grants |
|---|---|
machine.admin | The /typewriter machine commands. |
machine.protection.bypass | Place, break and interact with machines anywhere, ignoring island ownership, build flag and limits. |
Placeholders
MiniPlaceholders tags of the machine expansion, provided through TypeWriter. <instance> is the id of a placed machine, <slot> the logical slot index (default 0).
| Placeholder | Returns |
|---|---|
<machine_input:instance:slot> | true if the input slot holds an item. |
<machine_input_name:instance:slot> | Material name of the input item. |
<machine_input_amount:instance:slot> | Amount in the input slot. |
<machine_output:instance:slot> | true if the output slot holds an item. |
<machine_output_name:instance:slot> | Material name of the output item. |
<machine_output_amount:instance:slot> | Amount in the output slot. |
<machine_tier:instance> | Name of the active tier. |
<machine_dimension> | Readable name of the dimension the player stands in. |
<machine_grid_count>, <machine_grid_active>, <machine_grid_stalled> | Machines in the dimension, active, and stalled. |
<machine_energy_stored>, <machine_energy_capacity> | Energy stored and total capacity of the dimension. |
<machine_energy_produced>, <machine_energy_consumed>, <machine_energy_balance> | Energy per second produced, consumed and net. |
The player placeholders return an empty value without a player (console).
Hologram messages accept %machine%, %tier%, %energy%, %bar%, %percent% and %time_left%.
Entries
10 entries, generated from the extension source.
Actions2
- Machine MenuMachine Menu
- Open Machine GUIOpen Machine GUI
Commands3
- Machine Dashboard CommandMachine dashboard commands
- Machine Test CommandRegister a Machine test command
- Machine Test Platform CommandProvision the Machine BTC test platform
Variables1
- Machine Position VariablePosition of the viewer's machine of a given definition
Artifacts1
- Machine Data ArtifactStores machine runtime state (placed instances, energy, progress) as JSON data
Manifests2
- Machine Dashboard ConfigMachine Dashboard Wording
- Machine Protection ConfigMachines : messages de protection
Other entries1
- Machine DefinitionMachine Definition
Troubleshooting
The definition is rejected at publication. Check the server log: no way to obtain this machine means neither spawnItem nor vanillaBlock is set; tier[n].researchNode is blank means a tier has no research node; the machine layout needs N slots, maximum is 54 means too many slots.
A machine accepts items and never works. A recipe machine (for example MIXING, GRINDING, BREWING) with an empty recipes list has no vanilla fallback. Only SMELTING and AUTO_CRAFTING use vanilla recipes.
Placement is refused. The messages come from Machine Protection Config: the machine must be on your own BTC Sky island, you need the build flag, and the player, island and dimension limits and dimensionScope apply. A CONTROL_PANEL needs a stabilisation crystal in the dimension. Staff with machine.protection.bypass skip all checks.
The machine says it is not linked or has no energy. It needs ENERGY_CELL and ENERGY_GENERATOR machines in the same dimension, and it must be linked (use the link button). The pool never crosses dimensions.
An upgrade module changes nothing. Its type must be in allowedUpgrades, and CAPACITY only works on STORAGE, EXPERIENCE_TANK and ENERGY_CELL. LIQUID_FUEL needs a liquidFuelName.
A tier is never applied. The researchNode must match a research node id of BTC Sky, and the island must have unlocked it.
The menu opens empty or does not open. Check mainLayoutId against the ids in layoutPool; the log names the pool ids when it does not match.
Furniture or custom block visuals fail. FURNITURE and CUSTOM_BLOCK need CraftEngine and an existing furnitureId or customBlockId.
Related extensions
- BTC Sky — islands, ownership, research and dimensions that machines rely on.