We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

8

Attributes, Potion Effects, and Enchantments.

2 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    Now, for attributes affecting entities, it's gonna have to be a bit different. The tag could look like this: {ActiveAttributes:[{ Name: "minecraft:armor", Magnitude: 8, Duration: 1200}]}
    Which would correspond to having an extra diamond chestplate worth of armor for one minute. For infinite duration (and for describing an entities base properties), something like this might work: {BaseAttributes:[{ Name: "minecraft:health", Magnitude: 20}]}

    For potions, a tag like this could be used: {PotionAttributes:[{ Name: "minecraft:speed", Magnitude: 1, Duration: 1200}]}
    A potion with this tag would increase the affected entity's speed attribute by 1 unit for a minute.

    Combining attributes and enchantments in this way leads to an issue with anvils and combining enchantments. One solution is to add an optional tag to mark an attribute as an enchantment and thus combine-able in an anvil {Attributes:[{ Name: "minecraft:sharpness", Magnitude: 3, Slot: "mainhand", IsEnchantment: true}]}
    Another solution is just make it so the anvil only recognizes certain attributes as valid things to combine.

    There's also an issue of the enchantment glimmer. Maybe an item could get the enchantment glimmer from having an attribute with {IsEnchantment: true}, but I think it would be nice to have a simple {glimmer: 1} tag. This would make it easier to give custom items that glimmer without having to add an entire dummy enchantment anyway.

  • 0
    Registered User commented
    Comment actions Permalink

    Finally consider what the effect of all these (admittedly wide reaching) changes would be. The option would be open to have enchantment tables that can spit out randomized non-integer enchantments in a future update. Any new effect could be used in many ways. Since all types of effects would then work the same as each other, it's easier for new players to learn how to use commands. With all the tags being simplified, it could be easier to add new effects in the future. This could reduce lag since custom armor can give "potion effects" directly, rather than requiring a command to give players wearing that armor the effect.

    I do not suggest that this would be trivial to implement, but this would make this particular aspect of the game much smoother to work with.