How to Make an Attribute in Minecraft (Mod Maker guide)
Learn how to create a custom Attribute in 9Minecraft Mod Maker right in your browser. Attributes let you add customizable values that alter traits of players or entities.
Open the Studio and Workspace
Open 9Minecraft Mod Maker in your web browser. Since it runs online, there is nothing to install.
Open your workspace and make sure your project is set to a supported version, which is NeoForge 26.1.2 or NeoForge 1.21.1.
Add the Attribute Element
Click the green plus button to add a new mod element to your workspace.
Look inside the Mobs & entities group, select Attribute, and give your new element a name.
Set the Default Base Value
Locate the Attribute default base value field. This is the starting number your attribute will have until a procedure, command, or modifier in the game changes it.
The final value of an attribute is calculated after modifiers and minimum or maximum restrictions are applied to this base value.
Set the Value Range
Find the Attribute value range parameter.
Enter the minimum and maximum numbers that your attribute's value is allowed to reach.
Choose the Attribute Sentiment
Look for the Attribute sentiment field.
Choose whether your attribute is considered positive, negative, or neutral. This choice also changes the color of attribute modifiers for this attribute.
Assign to Players or All Living Entities
Decide who gets this attribute automatically. Enable Add to players if you want all players to have this attribute set at its default value when joining the world.
Enable Add to all living entities if you want all entities in the world that can have attributes to receive it at its default value when spawned.
Select Specific Entities
If you only want certain creatures to have this trait, find the Entities with the attribute field.
Select the specific entities you want. The entities selected here will have this attribute present and set at its default value when spawned.
Test and Export Your Mod
Save your mod element. Click Build & run to test your new attribute directly and see how it works.
When everything works the way you want, export your finished mod from the studio.
Tips
- Check that your workspace uses NeoForge 26.1.2 or NeoForge 1.21.1, as these are the supported versions for the Attribute element.
- Make sure your Attribute default base value sits comfortably inside the minimum and maximum limits you set in the Attribute value range.
- You do not need to pick every single creature in Entities with the attribute if you already enabled Add to all living entities.
- Use Attribute sentiment to make it clear to players if a modifier for this trait is helpful (positive), harmful (negative), or neutral.