Caster Tomes
Remove a Caster Tome
server_scriptsThe id
of a Caster Tome can be found using the /ars-tome
command and copying the auto-completed name.
ServerEvents.recipes((event) => { event.remove({ mod: "ars_nouveau", id: "ars_nouveau:tomes/takeoff_tome", type: "ars_nouveau:caster_tome", });});
Add a new Caster Tome
server_scriptsThe spell is not affected by glyph limits. The .id
provided at the end controls the name of the tome in the /ars-tome
command.
const version = Platform.mods.minecraft.getVersion();const rgb = (r, g, b) => { if (version == "1.20.1") { return { "type": "ars_nouveau:constant", "red": r, "green": g, "blue": b, }; } return 256*256*r+256*g+b;}
ServerEvents.recipes(event => { event.custom({ type: "ars_nouveau:caster_tome", color: rgb(255, 0, 0), flavour_text: "Vault without all those safety precautions.", name: "Danger Vault", sound: { family: "ars_nouveau:fire_family", pitch: 1, volume: 1, }, spell: [ "ars_nouveau:glyph_self", "ars_nouveau:glyph_leap", "ars_nouveau:glyph_amplify", "ars_nouveau:glyph_amplify", ], tome_type: "ars_nouveau:caster_tome", }).id("ars_nouveau:tomes/danger_vault")});
Add crafting recipe for Caster Tome
server_scriptsThe highlighted line shows how to retrieve a tome from the id provided by /ars-tome
.
This can be used in any recipe that supports NBT output.
The example below is a shapeless recipe for the Vault tome.
ServerEvents.recipes((event) => { const [tome] = event.findRecipes({ id: "ars_nouveau:tomes/vault_tome" });
event.shapeless(tome.getOriginalRecipeResult(), [ "ars_nouveau:novice_spell_book", "ars_nouveau:air_essence", "minecraft:feather", "ars_nouveau:wilden_wing", ]);});
Prev
Budding Conversion Next
Crush