[solved]Question Regarding why Ghast isn't apart of the Monster.Class

Hello So I’ve been doing some research and work with the Sponge.getRegistry…however when My system does it and I output even just a list for Monster.Class as a filter…the Ghast does not Show up…here’s the list I get and the Parameters…

[13:04:56] [Server thread/INFO]: This is the list: [SpongeEntityType{id=minecraft:giant, name=giant, translation=SpongeTranslation{id=entity.Giant.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityGiantZombie}, SpongeEntityType{id=minecraft:guardian, name=guardian, translation=SpongeTranslation{id=entity.Guardian.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityGuardian}, SpongeEntityType{id=minecraft:wither, name=wither, translation=SpongeTranslation{id=entity.WitherBoss.name}, modid=minecraft, class=net.minecraft.entity.boss.EntityWither}, SpongeEntityType{id=minecraft:witch, name=witch, translation=SpongeTranslation{id=entity.Witch.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityWitch}, SpongeEntityType{id=minecraft:wither_skeleton, name=wither_skeleton, translation=SpongeTranslation{id=entity.WitherSkeleton.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityWitherSkeleton}, SpongeEntityType{id=minecraft:husk, name=husk, translation=SpongeTranslation{id=entity.Husk.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityHusk}, SpongeEntityType{id=minecraft:cave_spider, name=cave_spider, translation=SpongeTranslation{id=entity.CaveSpider.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityCaveSpider}, SpongeEntityType{id=minecraft:enderman, name=enderman, translation=SpongeTranslation{id=entity.Enderman.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityEnderman}, SpongeEntityType{id=minecraft:evocation_illager, name=evocation_illager, translation=SpongeTranslation{id=entity.EvocationIllager.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityEvoker}, SpongeEntityType{id=minecraft:vindication_illager, name=vindication_illager, translation=SpongeTranslation{id=entity.VindicationIllager.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityVindicator}, SpongeEntityType{id=minecraft:vex, name=vex, translation=SpongeTranslation{id=entity.Vex.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityVex}, SpongeEntityType{id=minecraft:blaze, name=blaze, translation=SpongeTranslation{id=entity.Blaze.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityBlaze}, SpongeEntityType{id=minecraft:skeleton, name=skeleton, translation=SpongeTranslation{id=entity.Skeleton.name}, modid=minecraft, class=net.minecraft.entity.monster.EntitySkeleton}, SpongeEntityType{id=minecraft:elder_guardian, name=elder_guardian, translation=SpongeTranslation{id=entity.ElderGuardian.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityElderGuardian}, SpongeEntityType{id=minecraft:zombie_pigman, name=zombie_pigman, translation=SpongeTranslation{id=entity.PigZombie.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityPigZombie}, SpongeEntityType{id=minecraft:magma_cube, name=magma_cube, translation=SpongeTranslation{id=entity.LavaSlime.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityMagmaCube}, SpongeEntityType{id=minecraft:spider, name=spider, translation=SpongeTranslation{id=entity.Spider.name}, modid=minecraft, class=net.minecraft.entity.monster.EntitySpider}, SpongeEntityType{id=minecraft:creeper, name=creeper, translation=SpongeTranslation{id=entity.Creeper.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityCreeper}, SpongeEntityType{id=minecraft:illusion_illager, name=illusion_illager, translation=SpongeTranslation{id=entity.IllusionIllager.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityIllusionIllager}, SpongeEntityType{id=minecraft:slime, name=slime, translation=SpongeTranslation{id=entity.Slime.name}, modid=minecraft, class=net.minecraft.entity.monster.EntitySlime}, SpongeEntityType{id=minecraft:silverfish, name=silverfish, translation=SpongeTranslation{id=entity.Silverfish.name}, modid=minecraft, class=net.minecraft.entity.monster.EntitySilverfish}, SpongeEntityType{id=minecraft:stray, name=stray, translation=SpongeTranslation{id=entity.Stray.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityStray}, SpongeEntityType{id=minecraft:endermite, name=endermite, translation=SpongeTranslation{id=entity.Endermite.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityEndermite}, SpongeEntityType{id=minecraft:zombie, name=zombie, translation=SpongeTranslation{id=entity.Zombie.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityZombie}, SpongeEntityType{id=minecraft:zombie_villager, name=zombie_villager, translation=SpongeTranslation{id=entity.ZombieVillager.name}, modid=minecraft, class=net.minecraft.entity.monster.EntityZombieVillager}]

and the code is

List<Class<? extends Entity>> classes = ImmutableList.of(Monster.class);
List list = Sponge.getRegistry().getAllof(EntityType.class).stream()
.fiter(x -> classes.stream().anyMatch(y -> y.isAssignableFrom(x.getEntityClass()))).collect(Collectors.toList());

The list you are getting, is their text representation, and not the id of the monsters.

That said, I’m not sure why ghast is missing, my guess is that they are either not a monster by design or by bug.

Consider creating a ticket against SpongeAPI.

…gommenasai…umm how does one create or make a ticket for SpongeCommon?

Follow the template, preferably posting either a minimal code example, or even better, a 1 class plugin. Pretty much what you have done in this thread, it just allows us to track progress / get dev attention.

1 Like

Make that API! sorry.

For now, you could replace monster with Hostile.class but I suspect you would want to filter out some black listed entities.

1 Like

Do you mean Sponge API?

Yes, it’s a design issue.