

In the 'wizardstaff' folder, create a folder called 'wizardstaffmagics', which is To get started, create a new folder named 'wizardstaff' in the data folder in
#Wizard staff how to#
If you are unsure how to create data-packs, I recommend To modify or remove spells, the process is similar to how data-packs can be used to It is an object that expects one member, which must be either 'block' or This member works similar to how ingredient works, but for blocks (however it is not as complex and You might see a member called 'block_match' in some json files (for example in the Now specify the block to bind the teleportation to, via the 'waypoint' json member. For instance, for the lodestone teleportation These objects should contain one member each, either a "tag" or an "item".įor instance, the below example would be used to specify the tag 'cobblestone' and the itemĪs of version 1.5 (the restructuring update), the magic system was expanded to give some magicsĪdditional json members to make them more configurable. It is the mostĬomplex member, and expects either an array of objects, or a single object. This member is used to specify which items to associate with the spell. "no_magic" is used to specify no spell at all. For example, "blaze_powder_magic" is the flame-thrower spell.Ĭontains all the different magic names. This member expects a string, which mustīe a valid magic name. This member determines what the actual spell is. That the duration of the magic is unlimited. The duration (or cast time) of the spell, in ticks. Spells, such as the carved pumpkin spell, it is the total cost of using the magic once. This is the exp cost drained every tick the spell is used (20 ticks = 1 second). For 'continuous' spells, such as the blaze powder spell, This can meanĭifferent things for different magics. The exp cost of the magic, which must have the value of a non-negative number.

The json format for the magics is fairly simple, and must contain the following members: "cost"
#Wizard staff mod#
This is the source code to my Minecraft mod Wizard Staff, a mod that lets the player beĪ wizard, wielding a magic staff and fancy wizard hat! Data-driven MagicĪs of version 1.3 (the suggestions update), the spells (also called magics) for the wizard staffĪre data-driven, and can be modified/removed/created via json. Note: Version 1.18.2-1.9.0 changed the modid from 'wizard-staff' to 'wizardstaff', so if you haveĪn old data pack, make sure to update all occurrences of 'wizard-staff' to 'wizardstaff'.
