Closed rafucuk closed 1 month ago
Well I have a lot of information right now, tested & source checked mythicmobs. issue is right here, spawnEntity does not returning forge mob types.
I've checked mythicmobs source code and there is spawnEntity function.
And no the issue is not with mythicmobs only, mythicmobs uses their custom entity types; BUT there is also a custom entity type which if entity_type is not one of their custom entity types it will get bukkit entity type and use that.
So the only issue is the CraftRegionAccessor.java returning null entitytype
@Mgazul
I've used recaf to get source code of mythicmobs for only searching purposes
It is not only a mythicmobs problem, every plugin that uses CraftRegionAccessor's spawnEntity will error if used with forged entity, for example denizen uses that too it shows that it registered in "server.list_entity_types" (a variable that shows custom entities registered on server)
REINAPACK_KITSUNE is my custom mob and it gives similar issue in the console
I hope this will be enough, if any additional information needed, I will try my best.
also denizen returns entity type UNKNOWN
Changed title because it seems it is not only with mythicmobs.
Still not fixed yet. This is how modded entity types are added in mohist: And this is how CraftRegionAccessor.spawnEntity creates an entity: It seems that CraftRegionAccessor.spawnEntity simply won't work for mod entity types.
I wonder if it is possible to fix CraftRegionAccessor.spawnEntity for mod entity types with ForgeRegistries.ENTITY_TYPES.getValue(resourcelocation) .spawn(level,pos,mobspawntype); or the like?
Mythicmobs returns a null EntityType: