![Mob Captains](https://media.forgecdn.net/avatars/thumbnails/812/703/256/256/638186419900039171.png)
Commands for testing
chaka996 opened this issue · 5 comments
Would be really nice to have commands for testing mob captains to make sure they are interacting with other mods properly and for testing loot tables.
To test stuff out, you can call function ps-mob:convert/<RARITY>
as any mob.
So to convert the nearest mob that can become a captain to a legendary captain, run the following command while next to it:
execute as @e[type=#ps-mob:captains,limit=1,sort=nearest] run function ps-mob:convert/legendary
If you only want to test out the loot tables you can just give yourself the loot with one of the following commands:
loot give @s loot ps-mob:base/<RARITY>
loot give @s loot ps-mob:captain/<RARITY>
Make sure to replace <RARITY>
with one of the rarities
The base
loot tables are only items of that rarity but as captains can (with a lower probability) drop items of other rarities, the captain
loot tables are what the captains of that rarity will actually drop
Thanks, that worked! If I want to add those to a player, instead of @s, I would use @theirname and change remove to add?
No, that's a little more complicated - if you would want to give these attributes to a player you can look at the functions at /data/ps-mob/functions/convert/<rarity>
and /data/ps-mob/functions/convert/captain
The convert/captain
function gets run for captains of any difficulty and the convert/<rarity>
functions only get run for a mob captain of that rarity
The convert/<rarity>
functions apply the attribute modifiers
I turned myself into a legendary mob while fooling around with the commands. I tried the same command to common (and others), and I still have all the extra buffs. How can I remove the extra buffs?
I mean, it's not like I don't want to keep them, but I might have to give the same buffs to the other people on my server and they already think things are pretty complicated lololol
Hey, to undo that, you can run the following commands one-by-one
/attribute @s generic.max_health modifier remove 15213119-2-2-2-2
/attribute @s generic.armor modifier remove 15213119-2-2-2-2
/attribute @s generic.movement_speed modifier remove 15213119-2-2-2-2
/attribute @s generic.attack_damage modifier remove 15213119-2-2-2-2
/attribute @s generic.knockback_resistance modifier remove 15213119-2-2-2-2
/tag @s remove smithed.entity
/tag @s remove ps-mob
/tag @s remove ps-mob.captain
/tag @s remove ps-mob.legendary
/tag @s remove ps-mob.rare
/tag @s remove ps-mob.uncommon
/tag @s remove ps-mob.common