|
|
|
@ -73,7 +73,7 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
|
tool.sideadd = new ArrayList<Integer>();
|
|
|
|
|
}
|
|
|
|
|
} else if(!this.tool.type.equals("unpaired")) {
|
|
|
|
|
if(this.tool.type.equals("input") && this.wireEntity.inputs[tool.slot].wire.isMade != true) {
|
|
|
|
|
if(this.tool.type.equals("input") && wireEntity.outputs[tool.slot].wire.isMade != true && otherEntity.inputs[guibutton.slot].wire.isMade != true) {
|
|
|
|
|
wireEntity.outputs[guibutton.slot].wire = new WireConnection(this.tool.x, this.tool.y, this.tool.z, guibutton.slot, tool.slot, tool.xadd, tool.yadd, tool.zadd, tool.sideadd, false, tool.red, tool.green, tool.blue, tool.alpha, tool.width);
|
|
|
|
|
otherEntity.inputs[tool.slot].wire = new WireConnection(this.wireEntity.xCoord, this.wireEntity.yCoord, this.wireEntity.zCoord, tool.slot, guibutton.slot);
|
|
|
|
|
wireEntity.updateIO();
|
|
|
|
@ -82,7 +82,7 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
|
tool.zadd = new ArrayList<Integer>();
|
|
|
|
|
tool.sideadd = new ArrayList<Integer>();
|
|
|
|
|
tool.type = "unpaired";
|
|
|
|
|
} else if(this.tool.type.equals("output") && otherEntity.outputs[tool.slot].wire.isMade != true) {
|
|
|
|
|
} else if(this.tool.type.equals("output") && otherEntity.outputs[tool.slot].wire.isMade != true && wireEntity.inputs[tool.slot].wire.isMade != true ) {
|
|
|
|
|
if(otherEntity != null) {
|
|
|
|
|
otherEntity.outputs[tool.slot].wire = new WireConnection(this.wireEntity.xCoord, this.wireEntity.yCoord, this.wireEntity.zCoord, tool.slot, guibutton.slot, tool.xadd, tool.yadd, tool.zadd, tool.sideadd, true, tool.red, tool.green, tool.blue, tool.alpha, tool.width);
|
|
|
|
|
wireEntity.inputs[guibutton.slot].wire = new WireConnection(this.tool.x, this.tool.y, this.tool.z, guibutton.slot, tool.slot);
|
|
|
|
|