Bugfixes!

main
Astoria 2 years ago
parent 22c1cc2915
commit 3eb1d6cb2e

@ -103,31 +103,31 @@ public abstract class AbstractWireTileEntity extends TileEntity {
public void prepForDelete() {
if(outputs != null) {
for (int i = 0; i < outputs.length; ++i) {
if (outputs[i].wire != null && outputs[i].wire.thisslot > -1) {
if (outputs[i].wire != null) {
WireConnection wire = outputs[i].wire;
AbstractWireTileEntity otherChip = (AbstractWireTileEntity)this.worldObj.getBlockTileEntity(wire.x, wire.y, wire.z);
if(otherChip != null && otherChip.outputs != null) {
if(otherChip != null) {
outputs[i].floatvalue = 0;
outputs[i].stringvalue = "";
outputs[i].wire.isMade = false;
otherChip.inputs[wire.thatslot].wire.isMade = false;
otherChip.inputs[wire.thatslot].wire = new WireConnection();
this.updateIO();
otherChip.updateIO();
worldObj.markBlockNeedsUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockNeedsUpdate(wire.x, wire.y, wire.z);
}
worldObj.markBlockNeedsUpdate(wire.x, wire.y, wire.z);
}
}
}
if(inputs != null) {
for (int i = 0; i < inputs.length; ++i) {
if (inputs[i].wire != null && inputs[i].wire.thisslot > -1) {
if (inputs[i].wire != null) {
WireConnection wire = inputs[i].wire;
AbstractWireTileEntity otherChip = (AbstractWireTileEntity)this.worldObj.getBlockTileEntity(wire.x, wire.y, wire.z);
if(otherChip != null && otherChip.outputs != null && otherChip.outputs.length > wire.thatslot) {
otherChip.outputs[wire.thatslot].wire.isMade = false;
if(otherChip != null) {
otherChip.outputs[wire.thatslot].wire = new WireConnection();
otherChip.updateIO();
}
worldObj.markBlockNeedsUpdate(wire.x, wire.y, wire.z);
}
}
}

@ -57,7 +57,7 @@ public class MixinNetServerHandler implements INetHandler {
break;
case 1:
AbstractWireTileEntity otherEntity;
if(!packet.backwired) {
if(packet.backwired) {
otherEntity = (AbstractWireTileEntity)this.mcServer.getWorldManager(this.playerEntity.dimension).getBlockTileEntity(packet.x1, packet.y1, packet.z1);
otherEntity.inputs[packet.slot2].wire = new WireConnection(packet.x2, packet.y2, packet.z2, packet.slot1, packet.slot2);
} else{

@ -375,6 +375,7 @@ public class ChipTileEntity extends AbstractWireTileEntity {
break;
}
initialized = true;
worldObj.markBlockNeedsUpdate(xCoord, yCoord, zCoord);
update();
}
}

Loading…
Cancel
Save