useEnergy = dataStream.readBoolean();
isBlock = dataStream.readBoolean();
if(isBlock)
{
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
}
}
else if(packetType == ElectricChestPacketType.CLIENT_OPEN)
{
guiType = dataStream.readInt();
windowId = dataStream.readInt();
isBlock = dataStream.readBoolean();
if(isBlock)
{
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
}
}
else if(packetType == ElectricChestPacketType.PASSWORD)
{
password = PacketHandler.readString(dataStream);
isBlock = dataStream.readBoolean();
if(isBlock)
{
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
}
}
else if(packetType == ElectricChestPacketType.LOCK)
{
locked = dataStream.readBoolean();
isBlock = dataStream.readBoolean();
if(isBlock)
{
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
}
}
}