From 256c66f7b6567f0ce05acbdef2a5248423fe0b0f Mon Sep 17 00:00:00 2001 From: Calclavia Date: Sun, 22 Dec 2013 01:08:58 +0800 Subject: [PATCH] Fixed packet crash bug --- src/resonantinduction/wire/part/PartConductor.java | 2 +- src/resonantinduction/wire/part/PartFlatWire.java | 7 ++++--- src/resonantinduction/wire/part/PartWireBase.java | 7 ------- src/resonantinduction/wire/render/RenderLainWire.java | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/resonantinduction/wire/part/PartConductor.java b/src/resonantinduction/wire/part/PartConductor.java index 8ede08cc2..c97c1f42d 100644 --- a/src/resonantinduction/wire/part/PartConductor.java +++ b/src/resonantinduction/wire/part/PartConductor.java @@ -196,7 +196,7 @@ public abstract class PartConductor extends PartAdvanced implements IAdvancedCon } this.currentAcceptorConnections = possibleAcceptorConnections; - this.sendDescUpdate(); + //this.sendDescUpdate(); } tile().markRender(); diff --git a/src/resonantinduction/wire/part/PartFlatWire.java b/src/resonantinduction/wire/part/PartFlatWire.java index 4aa4f9562..1b9786ac8 100644 --- a/src/resonantinduction/wire/part/PartFlatWire.java +++ b/src/resonantinduction/wire/part/PartFlatWire.java @@ -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 diff --git a/src/resonantinduction/wire/part/PartWireBase.java b/src/resonantinduction/wire/part/PartWireBase.java index fa64e0b64..5a6a1eb32 100644 --- a/src/resonantinduction/wire/part/PartWireBase.java +++ b/src/resonantinduction/wire/part/PartWireBase.java @@ -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); } diff --git a/src/resonantinduction/wire/render/RenderLainWire.java b/src/resonantinduction/wire/render/RenderLainWire.java index f334d5dc7..d234851d2 100644 --- a/src/resonantinduction/wire/render/RenderLainWire.java +++ b/src/resonantinduction/wire/render/RenderLainWire.java @@ -58,7 +58,6 @@ public class RenderLainWire * 2 = side 2 = -Z = NORTH * 3 = side 5 = +X = EAST */ - private static class WireModelGenerator { int side;