I have a Planet packet that I am sending from the server to the client.
The Planet.class contains this:
//Class implements Serializable
public PlanetType type;
public void init(PlanetType type){
this.type = type;
}
The PlanetType.class contains:
//Class implements Serializable
public static PlanetType terra = new PlanetType("terra");
public String name;
public PlanetType(String name){
this.name = name;
}
I have registered both classes but when I send a Planet packet I get an: Error during deserialization error. Class cannot be created (missing no-arg constructor): com.gpg.pt.planet.PlanetType
So I assume I cannot have a constructor in the PlanetType.class. So can I not have a PlanetType variable in my Planet.class?