Currently active fork:
https://mcreator.net/plugin/103319/attributes-nerdy-edition
The plugin enables the modification of attributes, including Vanilla, Forge, Custom Attributes, and those from other mods. It also allows for the addition of attribute modifiers to items and the creation of custom attributes.
Forge 1.20.1, 1.19.4, 1.19.2, 1.18.2
NeoForge 1.20.1
Important Information
- Ensure that you are utilizing MCreator 2022.2 (including snapshots) or a more recent release.
- To use this plugin, it is essential to have the Java Plugins enabled.
- Prior to updating the plugin, create a backup of your workspace.
- Read changes :>.
- Full changelog available on github.
- Make sure you use attribute blocks with an entity that is a (sub) type of an Entity Living
Features:
- Create custom attributes and add them to any entity you want.
- Now Custom Attribute can be Persistent (only for Players)
- Set/get value of attribute from entity.
- Set/get value of custom attribute from entity.
- Has attribute ...
- Add modifier ... of an attribute .. to an item .. on slot ..
- Create new modifier with UUID ... named ... with value ... and operation ...
- Modifier variable for Attribute Modifiers
- Add/Remove modifier ... of an attribute ... of an entity ... (optionally as permanent)
- Remove modifier with UUID ... of an attribute ... of an entity ... (optionally as permanent)
- Has modifier ... of an attribute ... entity ...
- Has modifier with UUID ... of an attribute ... entity ...
NOTE:
Please ensure that each new modifier for the game is assigned a unique UUID to maintain consistency in their addition and removal. To generate a random UUID, you can utilize resources such as uuidtools.com/minecraft or any other suitable method. Additionally, it is important to verify that the entity has the desired attribute before setting or retrieving.
License
- Licensed under the GNU Lesser General Public License, version 3.0
- Mods created with this tool may be closed-source and/or distributed with a different license.
- Appropriate credit must be provided to the creators and maintainers of this software.
- Forked versions of this software must be distributed under the same license as this with attribution if distributed.
- Changes must be stated if any modified works are to be distributed.
- Under no circumstances can you state that the original creator endorses modified works.
Last changes:
V2.3.8:
- Added two new Forge attributes to lists for 1.20.1: EntityReach and BlockReach
- Removed forge attribute ReachDistance from 1.20.1
V2.3.7:
- Added procedure to add modifier to an item, old system for adding attribute modifiers to items is now deprecated (will be deleted later)
V2.3.6:
- Added Forge 1.20.1 support
- Added NeoForge 1.20.1 support
- Localisation changes
- Procedures code cleanup
V2.3.5:
- Limited the available entities in the gui to being LivingEntites
- Added possibility do add attribute to all Monsters, Animals, Water Animals, Golem Mobs, Ambient Creatures
- Added entity attribute modifiers
- Removed dependency from create new modifier
- Localisation changes
Comments
I seem to be having an issue with custom attributes. I have set up the workspace similarly to how it is presented in your provided screenshots, however the console throws an exception and closes the game. This appears to be caused by a null value of the attribute.
My workspace is set up as shown: https://prnt.sc/ShsICqgLHy-A
And the console dump here: https://pastebin.com/a0cnG6VH
I have attempted to both regenerate base code and restart MCreator to no success. The default attributes seem to be working as expected.
Thanks for the quick response! Interesting how it works like that, I assumed it would have worked given EntityPlayer extends EntityLiving - I wonder if thats something you will have to look into? And not to add onto the many requests im sure you've recieved, but support for custom entity tags would be excellent for this type of application!
Also just to add onto this discussion - changing the "Entry for adding attribute" to EntityPlayer works like you describe, however if I leave that as EntityLiving and change the procedure to "Is subtype EntityLiving" then the same issue will still occur, even if these two entity types allign.
I'm having an issue with custom attributes. Every time I compile the procedure responsible for managing the attribute, it gives me this error. https://imgur.com/NPKViAm
I've made the custom attribute element in the workspace, and I wrote the name of the attribute correctly. Java plugins are enabled. I can also confirm the section of the procedure responsible for modifying the vanilla attack damage attribute works correctly, so it's just the custom attribute that's having issues.
Actually it is pretty good idea, I'll check those out :>