Replcraft is a plugin that allows you to automate the areas inside special Structures using code. Refer to the Automating Minecraft on Replit blog post for basic usage.
Note: Fuel rates, concurrent connection limits, and structure materials are subject to balance changes.
Language | Feature set compatibility | Source |
---|---|---|
NodeJS | v2.0.0 | Official |
NodeJS | v1.5.0 | Official |
(potentially broken) |
v1.2.0 | Community |
Python (@rexjohannes) | v1.5.0 (no v1.3.0 (/transact ) support) |
Community |
Java (@SirLennox) | v2.0.0 | Community |
Python (@HarperframeInc) | v1.5.0 | Community |
Typescript (@ItzDerock) | v1.5.0 | Community |
Notable API additions by version:
v2.0.0
: Breaking protocol changes, replized tools,
setFuelLimit
and close
APIs, fuelInfo
expansions.
v1.5.0
: Added fuelInfo
APIv1.4.0
: Added target index support to moveItem
v1.3.0
: Added /transact
Contact @eelflute#3494
on Discord to get your client libraries added here!
Material | Notes | Block limit (frame) |
---|---|---|
Iron | No special effects | 1000 |
Copper | 2x fuel cost | 50 |
Glass | Limited to "read-only" APIs | 1000 |
The following fuel strategies are enabled in Any mode:
This means you get a small amount of fuel for free, and can provide gold nuggets to make more requests faster.
API | Description | Fuel cost | Valid Materials |
---|---|---|---|
getBlock | Retrieves a block at the given structure-local coordinates | 0.1 | iron, copper, glass |
getEntities | Gets all entities inside the region | 0.5 | iron, copper, glass |
getInventory | Gets all items from a container such as a chest or hopper | 0.5 | iron, copper, glass |
location | Retrieves the world coordinate location of the (0,0,0) inner coordinate | 0.1 | iron, copper, glass |
getPowerLevel | Gets a block's redstone power level | 0.1 | iron, copper, glass |
getSignText | Retrieves the text of a sign at the given coordinates. | 0.1 | iron, copper, glass |
getSize | Retrieves the inner size of the structure | 0.1 | iron, copper, glass |
fuelInfo | Retrieves detailed information about fuel use, fuel sources, and active connections. | 0.0 | iron, copper, glass |
setFuelLimit | Limits the amount of fuel that will be consumed from a given strategy. | 0.0 | iron, copper, glass |
close | Closes the current context. This prevents any further time-based fuel drain for item contexts. | 0.0 | iron, copper, glass |
moveItem | Moves an item between containers | 0.5 | iron, copper |
craft | Crafts an item | 0.5 | iron, copper |
setBlock | Sets a block at the given structure-local coordinates. The block must be available in the specified source chest or the structure inventory. Any block replaced by this call is stored in the specified target chest or the structure inventory, or dropped in the world if there's no space. | 1.0 | iron, copper |
setSignText | Sets the text of a sign at the given coordinates. Note: Due to this server's configuration, this API call requires you to be online. | 1.0 | iron, copper |
pay | Sends money to a player | 0.5 | iron, copper |
tell | Sends a chat message to a player inside your structure | 0.5 | iron, copper |
poll | Begins polling a block for updates. Note that this catches all possible block updates, but only one block is polled per tick. The more blocks you poll, the slower each individual block will be checked. Additionally, if a block changes multiple times between polls, only the latest change will be reported. | 0.1 | iron, copper, glass |
unpoll | Stops watching a block for updates | 0.1 | iron, copper, glass |
pollAll | Begins polling all blocks in the structure for updates. Updates will be very slow! | 0.5 | iron, copper, glass |
unpollAll | Stops polling all blocks in the structure | 0.5 | iron, copper, glass |
watch | Begins watching a block for updates. Note that this isn't perfectly reliable and doesn't catch all possible updates | 0.1 | iron, copper, glass |
unwatch | Stops watching a block for updates | 0.1 | iron, copper, glass |
watchAll | Begins watching all blocks in the structure for updates. Note that this isn't perfectly reliable and doesn't catch all possible updates. | 0.5 | iron, copper, glass |
unwatchAll | Stops watching all blocks for updates | 0.5 | iron, copper, glass |
Event | Description |
---|---|
block update | Fired when a watched or polled block changes |
transact | Fired when a player uses the /transact command |
contextOpened | Fired when a new context is created as a result of using a replized tool or logging in to a structure. |
contextClosed | Fired when a context is closed and no longer usable. |