Mob Attributes 1

Apply attribute modifiers to entities

  1. Strahan
    Native Minecraft Version:
    1.17
    Tested Minecraft Versions:
    • 1.17
    Source Code:
    https://github.com/Strahan201/MobAttributes
    Built and tested on 1.17, but should work on any version that supports attributes.

    This is a "quick n' dirty" build - it doesn't validate or filter anything so you could put invalid combinations in, like setting a knockback modifier on an area effect cloud lol. I'll flesh this out later.

    Commands:

    /MOBA MOB
    [mob] [attr] [val]
    mobattributes.set
    Sets an attribute. If you pass no optional parameters, it dumps all mobs and their settings. If you pass just a mob, it dumps that mob settings. If you pass a mob and attribute, it tells you the attribute setting for that mob. The mob must be a valid EntityType and the attribute a valid Attribute. It will autocomplete the list of valid types. Use [DISABLE] to turn off a setting. So if you do /moba mob zombie [disable] it will turn all zombie attributes off. If you do /moba mob zombie generic_attack_knockback [disable] it would disable any modification of knockback.

    /MOBA TOGGLE
    mobattributes.toggle
    Toggles plugin functionality globally

    /MOBA RELOAD
    mobattributes.reload
    Reloads configuration from disk

    Notes:

    I'm rushing this out the door because someone needs it, but later in the week I'll be working on it more. I plan to make criteria so you can apply modifications only to mobs in certain WG regions, certain worlds, certain X/Y/Z coords, if they are named or are using certain pieces of equipment, or combinations thereof. I'm also going to make it so you can make mob spawn eggs tagged to provide customized mod adjustments, so if you want fast zombies you can make a zombie spawner egg that applies +1.5 to movement speed but only on zombies spawned with the egg. Same with mob spawers. That depends though if I can correlate a CreatureSpawnEvent to the item/spawner that triggered it, dunno.

    Consider this build a beta, and let me know if you run into problems. It's 5:32 AM and I'm dead tired so I may have missed some stuff, heh.