FTB Unearthed is a resource generation mod for NeoForge which adds a multiblock structure, the Unearther, to allow villager workers to produce resources from raw materials, using a brush tool (although in theory any item can be used as the tool).
Only test recipes are provided by default, which only appear if running the mod in a development environment, or if include_dev_recipes is set to true in config/ftbunearthed-startup.snbt.
The Unearther is a 3x3x3 multiblock which is auto-created when the item is placed in world. Breaking any block of the Unearther drops itself as a single item again (also dropping any items in the machine).
The Unearther is an unsided block for hopper/pipe purposes - input blocks, food and brushes can be inserted on any side and will go to the right slot, and output items can be extracted from any side. Worker tokens cannot be piped in, but must be inserted manually.
An example recipe:
{
// remove this condition for "production" recipes
"neoforge:conditions": [
{
"type": "ftbunearthed:dev_environment"
}
],
"type": "ftbunearthed:unearther",
"input_block": "minecraft:sand",
"output_items": [
{
"chance": 0.1,
"item": {
"count": 2,
"id": "minecraft:diamond"
}
},
{
"chance": 0.3,
"item": {
"count": 1,
"id": "minecraft:amethyst_shard"
}
},
{
"chance": 0.5,
"item": {
"count": 1,
"id": "minecraft:emerald"
}
},
{
"chance": 1.5,
"item": {
"count": 1,
"id": "minecraft:lapis_lazuli"
}
}
],
"processing_time": 40,
"tool_item": {
"tag": "c:tools/brush"
},
"worker": {
"profession": "minecraft:mason"
}
}An example KubeJS recipe, using the in-built recipe schema:
ServerEvents.recipes((event) => {
// outputs, input-block, worker, brush, time-taken
event.recipes.ftbunearthed.unearther([ { item: "stick", count: 2, chance: 0.5 } ], "minecraft:oak_log", { profession: "minecraft:farmer", level: 1}, "#c:tools/brush", 40)
})typemust always beftbunearthed:uneartherinput_blockis a blockstate string or block tag (use a#prefix for block tags).- This is a block, not an item, since these resources are "brushed" in block form, both by the Unearther machine and manually by a player.
processing_timeis the time in ticks for each work cycle. Optional; defaults to 200 ticksworkerrepresents the villager data needed for this recipe, which is matched against a Worker Token item (see next section). This has three fields:professionis a villager profession, from the villager profession registry (any vanilla or modded profession is accepted here). This field is mandatory.typeis a villager type from the villager type registry, e.g.plains,desert,taiga... Optional; is a "don't care" value if omittedlevelis a villager trade level in the range 1..5. Optional; defaults to 1 if omitted.- Any worker token used in the machine must have a
levelof at least this level for the recipe to be usable.
- Any worker token used in the machine must have a
tool_itemis the tool item (typically a vanilla Brush) which must be inserted into the machine and used by the workerdamage_chanceis the chance (range 0.0..1.0) that the inserted tool item will take a point of durability damage each time a work cycle is done.- Undamageable items are permitted in recipes, and will never be damaged, regardless of the value of this field
- If the item accepts the Unbreaking enchantment, this will further reduce the chance of the item taking durability damage
- This mod also adds an unbreakable Reinforced Brush item (which has no recipe by default; define a recipe in your modpack if you want to allow it to be used)
output_items- a list of records, each of which has anitemitemstack, and achanceto be dropped.- A chance of 1.0 indicates the output is always produced
- A chance of >1.0 indicates that extra output may be produced (e.g. 1.5 means produce one item, and a 50% chance of a second item)
The mod registers a KubeJS schema to allow for easy recipe creation via KubeJS. Example:
ServerEvents.recipes(event => {
const ftbunearthed = event.recipes.ftbunearthed;
// red sand -> 1 lapis, using an armorer worker token (any village type & level), and any brush as a tool
ftbunearthed.unearther([ { "item": "lapis_lazuli", "chance": 1.0 } ], "minecraft:red_sand", { "profession": "armorer" }, "#c:tools/brush")
})Any inserted worker token item also has villager data in the same form as the worker field above, encoded in the ftbunearthed:worker_data item data component.
Worker Tokens may be obtained with the /give command, e.g.
# Get a level 1 Mason token in the (default) Plains biome
/give @s ftbunearthed:worker_token[ftbunearthed:worker_data={profession:"mason"}]
# Get a level 5 Fletcher token in the Desert biome
/give @s ftbunearthed:worker_token[ftbunearthed:worker_data={type:"desert",profession:"fletcher",level:5}]
Note that the level and type fields are optional and default to 1 and Plains, respectively.
When placed into the Unearther machine, a villager worker appears, based on the token's data.
- FTB Library is a required dependency
- For Modpack issues, please go here: https://go.ftb.team/support-modpack
- For Mod issues, please go here: https://go.ftb.team/support-mod-issues
- Just got a question? Check out our Discord: https://go.ftb.team/discord
All Rights Reserved to Feed The Beast Ltd. Source code is visible source, please see our LICENSE.md for more information. Any Pull Requests made to this mod must have the CLA (Contributor Licence Agreement) signed and agreed to before the request will be considered.