|
|
@ -24,13 +24,13 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
//Inputs
|
|
|
|
//Inputs
|
|
|
|
if(wireEntity.inputs != null && !this.tool.type.equals("input")) {
|
|
|
|
if(wireEntity.inputs != null && !this.tool.type.equals("input")) {
|
|
|
|
for (int i = 0; i < wireEntity.inputs.length; i++) {
|
|
|
|
for (int i = 0; i < wireEntity.inputs.length; i++) {
|
|
|
|
this.controlList.add(new GuiButtonExtended(i, this.width - 50, wireEntity.inputs[i].buttonString, "Input", wireEntity.inputs[i].slot));
|
|
|
|
this.controlList.add(new GuiButtonExtended(i, this.width - GuiButtonExtended.width, wireEntity.inputs[i].buttonString, "Input", wireEntity.inputs[i].slot));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//Outputs
|
|
|
|
//Outputs
|
|
|
|
if(wireEntity.outputs != null && !this.tool.type.equals("output")) {
|
|
|
|
if(wireEntity.outputs != null && !this.tool.type.equals("output")) {
|
|
|
|
for (int i = 0; i < wireEntity.outputs.length; i++) {
|
|
|
|
for (int i = 0; i < wireEntity.outputs.length; i++) {
|
|
|
|
this.controlList.add(new GuiButtonExtended(i, this.width + 50, wireEntity.outputs[i].buttonString, "Output", wireEntity.outputs[i].slot));
|
|
|
|
this.controlList.add(new GuiButtonExtended(i, this.width + GuiButtonExtended.width, wireEntity.outputs[i].buttonString, "Output", wireEntity.outputs[i].slot));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -76,7 +76,8 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
if(this.tool.type.equals("input") && wireEntity.outputs[guibutton.slot].wire.isMade != true && otherEntity.inputs[tool.slot].wire.isMade != true) {
|
|
|
|
if(this.tool.type.equals("input") && wireEntity.outputs[guibutton.slot].wire.isMade != true && otherEntity.inputs[tool.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);
|
|
|
|
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);
|
|
|
|
otherEntity.inputs[tool.slot].wire = new WireConnection(this.wireEntity.xCoord, this.wireEntity.yCoord, this.wireEntity.zCoord, tool.slot, guibutton.slot);
|
|
|
|
wireEntity.updateIO();
|
|
|
|
wireEntity.update();
|
|
|
|
|
|
|
|
otherEntity.update();
|
|
|
|
tool.xadd = new ArrayList<Integer>();
|
|
|
|
tool.xadd = new ArrayList<Integer>();
|
|
|
|
tool.yadd = new ArrayList<Integer>();
|
|
|
|
tool.yadd = new ArrayList<Integer>();
|
|
|
|
tool.zadd = new ArrayList<Integer>();
|
|
|
|
tool.zadd = new ArrayList<Integer>();
|
|
|
@ -86,7 +87,8 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
if(otherEntity != null) {
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
wireEntity.inputs[guibutton.slot].wire = new WireConnection(this.tool.x, this.tool.y, this.tool.z, guibutton.slot, tool.slot);
|
|
|
|
otherEntity.updateIO();
|
|
|
|
wireEntity.update();
|
|
|
|
|
|
|
|
otherEntity.update();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tool.xadd = new ArrayList<Integer>();
|
|
|
|
tool.xadd = new ArrayList<Integer>();
|
|
|
|
tool.yadd = new ArrayList<Integer>();
|
|
|
|
tool.yadd = new ArrayList<Integer>();
|
|
|
|