| 45 | |
| 46 | = Mob Attribute Examples = |
| 47 | == Simple == |
| 48 | A very simple example, spawns a mob with a name of "Silly Pants", health of 40 hearts, equipped with a diamond sword and golden helmet: |
| 49 | {{{ |
| 50 | { |
| 51 | name → "Silly Pants" |
| 52 | health → 40 |
| 53 | |
| 54 | equipment → { |
| 55 | hand → item &minecraft:diamond_sword |
| 56 | helmet → item &golden_helmet |
| 57 | } |
| 58 | } |
| 59 | }}} |
| 60 | |
| 61 | == Comprehensive == |
| 62 | A very comprehensive example demonstrating almost all possible attributes: |
| 63 | * Health of 40 hearts |
| 64 | * Level 30 XP yield |
| 65 | * Runs an Olivine script named "Some other Olivine Script" |
| 66 | * Can see up to 30 blocks away |
| 67 | * Equipped with a bow and armor, all the armor has projectile protection and unbreaking enchantments: |
| 68 | * Bow enchanted with punch and unbreaking |
| 69 | * Golden helmet |
| 70 | * Chainmail chestplate |
| 71 | * Chainmail leggings |
| 72 | * Iron boots enchanted also with feather falling |
| 73 | * Potion effects of speed and regeneration |
| 74 | * Facing northward |
| 75 | * Does not despawn automatically |
| 76 | * 73% chance to drop 2 golden coins, otherwise 27% chance to drop 6 redstone |
| 77 | * Riding a skeleton horse with: |
| 78 | * A saddle |
| 79 | * Iron horse armor |
| 80 | * Health of 140 hearts |
| 81 | * And movement speed base of 0.4 |
| 82 | |
| 83 | {{{ |
| 84 | { |
| 85 | health → 40 |
| 86 | level → 30 |
| 87 | |
| 88 | olivine → "Some other Olivine Script" |
| 89 | |
| 90 | modifiers → { |
| 91 | owly → { base → 30 } |
| 92 | } |
| 93 | |
| 94 | equipment → { |
| 95 | hand → item &bow with { |
| 96 | enchantments → [ |
| 97 | { type → punch; level → 1 } |
| 98 | { type → unbreaking; level → 3 } |
| 99 | ] |
| 100 | } |
| 101 | helmet → item &golden_helmet with { |
| 102 | enchantments → [ |
| 103 | { type → projectile_protection; level → 4 } |
| 104 | { type → unbreaking; level → 3 } |
| 105 | ] |
| 106 | } |
| 107 | chest → item &chainmail_chestplate with { |
| 108 | enchantments → [ |
| 109 | { type → projectile_protection; level → 4 } |
| 110 | { type → unbreaking; level → 3 } |
| 111 | ] |
| 112 | } |
| 113 | leggings → item &chainmail_leggings with { |
| 114 | enchantments → [ |
| 115 | { type → projectile_protection; level → 4 } |
| 116 | { type → unbreaking; level → 3 } |
| 117 | ] |
| 118 | } |
| 119 | boots → item &iron_boots with { |
| 120 | enchantments → [ |
| 121 | { type → feather_falling; level → chance of 2 .. 4 } @ 70% |
| 122 | { type → projectile_protection; level → 4 } |
| 123 | { type → unbreaking; level → 3 } |
| 124 | ] |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | effects → [ |
| 129 | { type → speed; amplifier → 1; duration → 5 minutes } |
| 130 | { type → regeneration; amplifier → 2; duration → 3 minutes + 30 seconds } |
| 131 | ] |
| 132 | |
| 133 | orientation → < NORTH > |
| 134 | |
| 135 | flags → [ permanent ] |
| 136 | |
| 137 | drops → [ |
| 138 | bundle 2 of item &mmm:gold_coin |
| 139 | bundle 6 of item &redstone @ 27% |
| 140 | ] |
| 141 | |
| 142 | riding → mob &Horse with { |
| 143 | saddle → item &saddle |
| 144 | armor → item &iron_horse_armor |
| 145 | type → skeleton |
| 146 | health → 140 |
| 147 | |
| 148 | |
| 149 | modifiers → { |
| 150 | agility → { base → 0.4 } |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | }}} |