Open LowScarlet opened 2 years ago
The Phantom class doesn't extend the Monster class, so this isn't exactly intuitive but it's not wrong.
Does it do the same for ghasts?
Same for Ghast, it inherits Flying > Mob
Closing as not a Skript issue
@AyhamAl-Ali EntityData#match can be overridden for monster to return true on phantom and ghast. The link mentioned above explains that the reason these aren't a Monster in Bukkit is likely because of language/design limitations, not because players don't see them as monsters, so I think we should let Skript see these as monsters
If this case would be supported by Skript then sure, I will reopen this
this can be easily implemented as making Constant list with Mob types as flying monsters
private static final List<EntityType> FLYING_MONSTERS = Arrays.asList(
EntityType.GHAST, EntityType.PHANTOM
);
public static boolean isFlyingMonster(EntityType entityType) {
return FLYING_MONSTERS.contains(entityType);
}
I think this suggestion would be better suited for the Bukkit API itself — Java's single inheritance limits Bukkit programmatically, but there could still be a way to check if a mob is a monster that is not limited by single inheritance, like a constant list as @ham1255 suggested.
This isn't bukkit limitation idk it might be too
Its in nms generally Since phantoms extends FlyingEntity Not MonsterEntity
You could see link i posted from before above it has really good explanation about this
It also has fix but it needs nms which is not recommended in my opinion
okay i found something that might be not related but Slimes are not monsters either? so it might be not only flying hostile mobs are effected here.
okay i found something that might be not related but Slimes are not monsters either? so it might be not only flying hostile mobs are effected here.
I believe originally slimes were able to spawn in peaceful mode, and the small size ones are not hostile to the player, so this may be why they were not counted as monsters.
I think it'd be a good idea to follow this definition:
hostile mobs being these:
I think it'd be a good idea to follow this definition:
hostile mobs being these:
Hostile mobs list are missing some mobs and also jockies are single mobs or 2 mobs (zombie riding chicken)?
Skript/Server Version
Bug Description
Does phantom not fall into the category of monsters?
{_mob} is a monster
Expected Behavior
I thought Phantom was a monster?
Steps to Reproduce
{_mob} is a monster
Errors or Screenshots
Other
No response
Agreement