Rewrote All the Things #81
@@ -391,17 +391,16 @@ public class PocketManager
|
|||||||
|
|
||||||
public static void unload()
|
public static void unload()
|
||||||
{
|
{
|
||||||
|
if (!isLoaded)
|
||||||
|
{
|
||||||
|
throw new IllegalStateException("Pocket dimensions have already been unloaded!");
|
||||||
|
}
|
||||||
|
|
||||||
save();
|
save();
|
||||||
dimensionData = null;
|
|
||||||
unregisterPockets();
|
unregisterPockets();
|
||||||
|
dimensionData = null;
|
||||||
|
isLoaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* 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();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public static DimLink getLink(int x, int y, int z, World world)
|
public static DimLink getLink(int x, int y, int z, World world)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ public class ClientPacketHandler implements IPacketHandler, IUpdateSource
|
|||||||
if (!packet.channel.equals(PacketConstants.CHANNEL_NAME))
|
if (!packet.channel.equals(PacketConstants.CHANNEL_NAME))
|
||||||
return;
|
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
|
try
|
||||||
{
|
{
|
||||||
DataInputStream input = new DataInputStream(new ByteArrayInputStream(packet.data));
|
DataInputStream input = new DataInputStream(new ByteArrayInputStream(packet.data));
|
||||||
|
|||||||
Reference in New Issue
Block a user