Skip to content
totemo edited this page Sep 9, 2022 · 16 revisions

Start: Home ⬩ Previous: Command Interface ⬩ Next: Mobs
See also: Item Command Reference


Minecraft items, also called item stacks, can be quite complicated. All items have a material, like dirt or cooked_beef or diamond_sword. Items can also have a custom name, lore, enchantments and sometimes a damage value indicating wear and tear.

BeastMaster separates the description of an item from the things that use it, like mobs and loot tables. If an item is not exactly the same as a vanilla Minecraft material, then you must define a custom item. You define an item by creating an example of it, and then while holding it, you tell BeastMaster the identifier (ID) used to refer to identical items.

However, BeastMaster also accepts case insensitive, vanilla material names in contexts where an item ID is expected, without first requiring you to define a custom item. For example, you can say diamond_sword to signify a full durability diamond sword in a loot table or mob property, as the following commands illustrate:

/beast-mob set witherskeleton main-hand diamond_sword
/beast-loot add-drop witherskeleton-drops item diamond_sword 5

If a custom item is defined with the same name as the vanilla material, then the custom definition shadows or hides the vanilla item.

Defining a Custom Item

As an example, we'll define a "scimitar" as a type of gold sword.

Firstly let's get an unenchanted golden sword:

/i gold_sword

Then let's use commands to set a custom name, lore and enchantments:

/beast-item name &eScimitar
/beast-item lore A formidable weapon.
/enchant unbreaking 3
/enchant sharpness 5

Finally, we tell BeastMaster that the item we are holding should be referred to by the ID scimitar:

/beast-item define scimitar

Using Items

Now that BeastMaster knows what a scimitar is, we can use commands to make them appear in the world.

For example, we can specify that all zombified piglins spawn holding them in both hands:

/beast-mob set zombifiedpiglin main-hand scimitar
/beast-mob set zombifiedpiglin off-hand scimitar

BeastMaster uses the EntityType name of entities from the Bukkit API, omitting underscores, to signify the type of vanilla Minecraft mobs.

Redefining Items

If, on reflection, we decide that having every zombified piglin armed with a sharpness 5 gold sword is a bit much, we can redefine the scimitar.

Let's imagine that some time has passed and we no longer have our original item. We can get one straight out of BeastMaster using the following command:

/beast-item get scimitar

Then we can change the item and redefine scimitar:

/enchant sharpness 3
/beast-item redefine scimitar

Note that we are using /beast-item redefine instead of /beast-item define. Once an item ID has been defined, BeastMaster won't allow us to define the same ID again. This is a simple precaution to prevent us from accidentally redefining an item by mistake.

And that's it. All zombified piglins that spawn from then on will hold the new, slightly less sharp scimitar.

Note that because the item definition is separate from the thing using it (in this case zombifiedpiglin), the latter changed automatically when we changed the former. We didn't have to redefine zombifiedpiglin.


Start: Home ⬩ Previous: Command Interface ⬩ Next: Mobs