For a mod i'm currently working on i need to get the name of a spacestation the moment the player joins that spacestation (with the EntityJoinWorldEvent)
When i try to get the spacestationdata via SpaceStationWorldData#getStationData i always get back null.
Is there something i'm currently missing or is there a better way tp get the name of a spacestation?
In this case data is always null giving a npe later on in my code. Body is of type CelestialBody and i get it via
GalaxyRegistry#getCelestialBodyFromDimensionID
When i try to get the spacestationdata via SpaceStationWorldData#getStationData i always get back null.
Is there something i'm currently missing or is there a better way tp get the name of a spacestation?
Code:
Satellite satellite = (Satellite) body;
String parent;
if(satellite.getParentPlanet().getUnlocalizedName().equalsIgnoreCase("planet.overworld")){
parent = "Earth";
}else{
parent = satellite.getParentPlanet().getLocalizedName();
}
SpaceStationWorldData data = SpaceStationWorldData.getStationData(e.getWorld(), satellite.getID(), (EntityPlayer) e.getEntity());
GalaxyRegistry#getCelestialBodyFromDimensionID