Fixed packet crash bug

This commit is contained in:
Calclavia 2013-12-22 01:08:58 +08:00
parent c9831d33db
commit 256c66f7b6
4 changed files with 5 additions and 12 deletions

View file

@ -196,7 +196,7 @@ public abstract class PartConductor extends PartAdvanced implements IAdvancedCon
}
this.currentAcceptorConnections = possibleAcceptorConnections;
this.sendDescUpdate();
//this.sendDescUpdate();
}
tile().markRender();

View file

@ -126,7 +126,7 @@ public class PartFlatWire extends PartWireBase implements TFacePart, JNormalOccl
@Override
public void readDesc(MCDataInput packet)
{
// super.readDesc(packet);
super.readDesc(packet);
this.side = packet.readByte();
this.connMap = packet.readInt();
}
@ -134,7 +134,7 @@ public class PartFlatWire extends PartWireBase implements TFacePart, JNormalOccl
@Override
public void writeDesc(MCDataOutput packet)
{
// super.writeDesc(packet);
super.writeDesc(packet);
packet.writeByte(this.side);
packet.writeInt(this.connMap);
}
@ -142,6 +142,7 @@ public class PartFlatWire extends PartWireBase implements TFacePart, JNormalOccl
@Override
public void read(MCDataInput packet)
{
super.read(packet);
read(packet, packet.readUByte());
}
@ -581,7 +582,7 @@ public class PartFlatWire extends PartWireBase implements TFacePart, JNormalOccl
public boolean useStaticRenderer()
{
return false;
return true;
}
@Override

View file

@ -102,9 +102,7 @@ public abstract class PartWireBase extends PartConductor implements IBlockableCo
public void setInsulationColor(int dye)
{
dyeID = dye;
refresh();
world().markBlockForUpdate(x(), y(), z());
tile().notifyPartChange(this);
}
@ -113,9 +111,7 @@ public abstract class PartWireBase extends PartConductor implements IBlockableCo
{
isInsulated = insulated;
dyeID = DEFAULT_COLOR;
refresh();
world().markBlockForUpdate(x(), y(), z());
tile().notifyPartChange(this);
}
@ -123,9 +119,7 @@ public abstract class PartWireBase extends PartConductor implements IBlockableCo
{
isInsulated = true;
dyeID = dyeColour;
refresh();
world().markBlockForUpdate(x(), y(), z());
tile().notifyPartChange(this);
}
@ -138,7 +132,6 @@ public abstract class PartWireBase extends PartConductor implements IBlockableCo
{
dyeID = dye;
refresh();
world().markBlockForUpdate(x(), y(), z());
tile().notifyPartChange(this);
}

View file

@ -58,7 +58,6 @@ public class RenderLainWire
* 2 = side 2 = -Z = NORTH
* 3 = side 5 = +X = EAST
*/
private static class WireModelGenerator
{
int side;