CommandHelper

CommandHelper

46.5k Downloads

Mob names differs in different functions

LadyCailinBot opened this issue · 5 comments

commented

CMDHELPER-2894 - Reported by Алексей.Положенцев

In spawn_mob() there are ENDERDRAGON, CAVESPIDER, IRONGOLEM, SNOWGOLEM, PIGZOMBIE.
entities_in_radius() will return ENDER_DRAGON, CAVE_SPIDER, IRON_GOLEM, SNOW_GOLEM, PIG_ZOMBIE.
Other mob names seems to be the same.

commented

Comment by VergilPrime

Aren't these bukkit names?

commented

Comment by EntityReborn

Due to the changes that would be needed, this is a non-trivial task. An acceptable workaround is to remove the underscores from what {{entities_in_radius}} returns.

commented

Comment by Алексей.Положенцев

I know, that question is a bit old, but still actual...
And it's not only about underscores, so now i'm stuck using procedures like
if(@mob == 'HORSE:SKELETON', @mob = 'SKELETON_HORSE')
if(@mob == 'ENDERDRAGON', @mob = 'ENDER_DRAGON')
if(@mob == 'HORSE:ZOMBIE', @mob = 'ZOMBIE_HORSE')
if(@mob == 'HORSE:DONKEY', @mob = 'DONKEY')
if(@mob == 'HORSE:MULE', @mob = 'MULE')
if(@mob == 'MOOSHROOM', @mob = 'MUSHROOM_COW')
if(@mob == 'POLARBEAR', @mob = 'POLAR_BEAR')
etc.

Maybe it's possible at least to add every variant in every function?

commented

Comment by PseudoKnight

The mob names are only different in spawn_mob(), which seems like it was intended for direct command arguments. Everywhere else is consistent. Using spawn_mob() is completely optional, as there's spawn_entity(). Changing it would only break scripts and be mostly redundant.

commented

Comment by PseudoKnight

I added two aliases (mushroomcow and snowman) and spawn_mob() now automatically remove underscores to make this better.