Rewrote All the Things #81

Merged
SenseiKiwi merged 8 commits from rewrite into DevBranch 2013-09-04 03:26:52 +00:00
2 changed files with 12 additions and 8 deletions
Showing only changes of commit 549ee54852 - Show all commits

View File

@@ -391,17 +391,16 @@ public class PocketManager
public static void unload()
{
save();
dimensionData = null;
unregisterPockets();
}
if (!isLoaded)
{
throw new IllegalStateException("Pocket dimensions have already been unloaded!");
}
/*
* This isn't needed right now and it's causing me problems due to the iterator's generic type -_-
public static Iterable<NewDimData> getDimensions()
{
return dimensionData.values();
}*/
save();
unregisterPockets();
dimensionData = null;
isLoaded = false;
}
public static DimLink getLink(int x, int y, int z, World world)
{

View File

@@ -38,6 +38,11 @@ public class ClientPacketHandler implements IPacketHandler, IUpdateSource
if (!packet.channel.equals(PacketConstants.CHANNEL_NAME))
return;
// If this is a memory connection, then our client is running an integrated server.
// We can tell by checking if packet size is 0.
if (manager.packetSize() == 0)
return;
try
{
DataInputStream input = new DataInputStream(new ByteArrayInputStream(packet.data));