Attributes

Published by Azzier on
Supported MCreator versions
2023.1
2023.2
2023.3
Tags / plugin type
Java plugin
Procedures
Variables
MCreator plugin
Downloads:
5301
Upvotes: 127
About the plugin

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.has attribute check

Custom AttributeModifiers

 

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
Project members
Lead developer
Contributor
License
GNU General Public License version 3 (GPLv3)

Plugin downloads
2.3.8 MCreator 2023.3 ONLY - attributes-2-3-8-2023-3.zip Uploaded on: 09/20/2023 - 10:31   File size: 96.65 KB
2.3.8 MCreator 2023.2 ONLY - attributes-2-3-8-2023-2.zip Uploaded on: 09/20/2023 - 10:31   File size: 96.66 KB
2.3.8 MCreator 2023.1 ONLY - attributes-2-3-8-2023-1.zip Uploaded on: 09/20/2023 - 10:31   File size: 96.66 KB

Comments

hi, i have a problem, when i put a block of this plugin into the code, when i look at the custom code it doesnt generate.

whenever i try using this plugin to modify an attribute, i get this error:
error: cannot find symbol
if (event instanceof ItemAttributeModifierEvent _event && _event.getSlotType() == EquipmentSlot.MAINHAND) {
^
symbol: variable event
my procedure looks like this: https://imgur.com/a/2ZNiNDe

I am using the Nerdy version of this plugin, but I am having trouble with adding or removing modifiers.
Adding a modifier crashes the game and using the remove block causes a compile error.
I posted a help request post on Reddit for the compile error here: https://www.reddit.com/r/MCreator/comments/1e08z9t/difficulty_with_attributes_nerdy_edition/

Can someone PLEASE explain how to code the attribute to do what you want it to do! I am so lost on how it works.

I actually use plugin "Attributes (Nerdy edition)", but I think I have to tell the real author of that plugin about this problem.
There are some typos in the attributes like spawn reinforcement (It's spawn reiforcement). also, when I duplicate "set <entity gravity>" procedure block, it becomes <FORGE:entity.gravity> some why.
By the way Thank you very much for that useful plugin. I usually hate to use plugins, but that one is ok, I like it! 😁

Can you PLEASE add support for getting the value of itemstacks' attributes?

Nerdy, Please need a help! So the Add or remove modifier block is working as intended but can you please tell me how can I make those only "Add" modifier blocks work? I'm new to the mcreator... what does "Deprecated - Use attribute modifiers for item" means. Please help

when i try to create a new attribute nothing happens, it just takes me back to my workspace and the attribute isn't there, any idea if its a bug or im doing something wrong?

Btw, is this still a problem? "java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeInstance.getBaseValue()" because the return value of "net.minecraft.world.entity.LivingEntity.getAttribute(net.minecraft.world.entity.ai.attributes.Attribute)" is null" I keep getting this still when trying to add attributes to entities on spawn procedure. It even does it with the other check. I added "has entity Event/target entity an attribute MAX_HEALTH, and it seems like you can't add attributes to other entities or I just don't have the latest version.

To increase mining speed of the player, do I just make a custom attribute "Mining Speed" or is mining speed just not implemented yet?