Started Rewriting Packet Handling

Started rewriting our packet handling code. Deleted PacketHandler in
favor of using sided (Server-, Client-) packet handlers to make it
easier to follow what's going on in our code. Added some event-based
handling of updates which greatly simplified signaling that data needs
to be sent, but it's not completely done yet.
This commit is contained in:
SenseiKiwi
2013-09-01 22:01:17 -04:00
parent efa5b3eb4c
commit 62fed83e2f
17 changed files with 421 additions and 221 deletions

View File

@@ -1,16 +1,13 @@
package StevenDimDoors.mod_pocketDim.dungeon;
import java.io.FileNotFoundException;
import java.io.Serializable;
import StevenDimDoors.mod_pocketDim.dungeon.pack.DungeonType;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
import StevenDimDoors.mod_pocketDim.schematic.InvalidSchematicException;
public class DungeonData implements Serializable
public class DungeonData
{
private static final long serialVersionUID = -5624866366474710161L;
private final int weight;
private final boolean isOpen;
private final boolean isInternal;

View File

@@ -286,8 +286,8 @@ public class DungeonSchematic extends Schematic {
{
IDimLink link = dimension.createLink(pocketCenter.getX(), pocketCenter.getY(), pocketCenter.getZ(), IDimLink.TYPE_NORMAL);
Point4D destination = link.source();
link.setDestination(destination.getX(), destination.getY(), destination.getZ(),
PocketManager.getDimensionData(destination.getDimension()));
NewDimData prevDim = PocketManager.getDimensionData(destination.getDimension());
prevDim.setDestination(link, destination.getX(), destination.getY(), destination.getZ());
}
private static void createExitDoorLink(NewDimData dimension, Point3D point, Point3D entrance, int rotation, Point3D pocketCenter)