Hello,
I am trying to create a plugin using sponge and the pixelmon api but I got an error:
I am trying to get the position of an npc so I can register it using the event BattleStartedEvent from pixelmon api. I came up with the idea of getting the participent entity and then try to figure out how to get the position of this entity.
But I got the proble when I wrote this simple code:
for (BattleParticipant p : bc.participants)
{
p.getEntity();
}
getEntity(); is underlined by red and when I hover it with my mouse it says:
The method getEntity() from the type BattleParticipant refers to the missing type EntityLivingBase
According to the forge api it says that the import for doing this is: net.minecraft.entity.EntityLivingBase
But when I write: import net.minecraft.entity.EntityLivingBase it says:
“The import net.minecraft.entity.EntityLivingBase cannot be resolved”
I know I have done something wrong with my project configuration but I don’t really know how to configure graddle and make it work with a mod api.
So I have done a little bit of prophanations which are:
I added spongeforge as an external jar and also pixelmonmod and the forge I use to run my server as an external jar.
This profanation worked fine to fire some events but when it comes to get some stuff from the “net.minecraft” it is not working
I hope some people could help me with my problem or explain how to setup correctly this types of project or maybe find a solution to get the coordinates of an npc from pixelmon when this event is fired (or another thing which can differenciate this npc from the others).
Thanks for reading my post I hope some people can help me