Provides a framework to build tools that allow triggering arbitrary effects
Items:
| item | loot table |
|---|---|
Ticket |
magic:ticket |
Wand |
magic:wand |
Bauble |
magic:bauble |
Spell |
magic:spell |
Grimoire |
magic:book |
Advancements:
| title | description |
|---|---|
Bound Pages and Spells |
bind at least one item in a Grimoire |
There are five special items provided by the datapack:
magic:bauble loot table,magic:bauble recipe that uses string, iron nugget, and ender pearl.The effect triggered by the
Bauble can be changed by dropping it
alongside a
Ticket or
Wand; the second item will be destroyed
and the effect will be copied, overwriting any previous effects it may have
had.
This is a magic as a service provided by a villager trader; the item triggers
instantly the moment that you buy it. It will not trigger by itself any other
way, but it could technically be bound into a
Grimoire.
magic:book loot table.The
Grimoire can be edited by dropping it on a double chest; by
doing so the Grimoire's and chest's inventories will be swapped. any
Tickets,
Wands, and
Baubles bound to the Grimoire will then
appear in its first six pages, and they can be used by clicking on their
names.
Tickets and
Baubles bound into a Grimoire will not break
when used.
Checks every player every frame to see if they used a carrot on a stick
Checks every player every frame to see if they have been hurt while carrying a bauble.
Checks every item in a 4-block distance of every player every second to see if it is a book that should be updated
Any magic item that replaces the held tool when cast should either have a safety check in the called function or it will destroy the book being held by the player.
When triggering any book slot, the datapack will check in order the player maihand, the player offhand, and finally raycast in search of a lectern, and trigger the magic from the first book it finds, regardless of the one the player actually used.