|
|
@ -73,6 +73,7 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
} else if(!this.tool.type.equals("unpaired")) {
|
|
|
|
} else if(!this.tool.type.equals("unpaired")) {
|
|
|
|
if(this.tool.type.equals("input")) {
|
|
|
|
if(this.tool.type.equals("input")) {
|
|
|
|
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);
|
|
|
|
|
|
|
|
wireEntity.updateIO();
|
|
|
|
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>();
|
|
|
@ -80,8 +81,10 @@ public class GuiWiring extends GuiScrollable {
|
|
|
|
tool.type = "unpaired";
|
|
|
|
tool.type = "unpaired";
|
|
|
|
} else if(this.tool.type.equals("output")) {
|
|
|
|
} else if(this.tool.type.equals("output")) {
|
|
|
|
AbstractWireTileEntity otherEntity = (AbstractWireTileEntity)Minecraft.getMinecraft().theWorld.getBlockTileEntity(tool.x, tool.y, tool.z);
|
|
|
|
AbstractWireTileEntity otherEntity = (AbstractWireTileEntity)Minecraft.getMinecraft().theWorld.getBlockTileEntity(tool.x, tool.y, tool.z);
|
|
|
|
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);
|
|
|
|
|
|
|
|
otherEntity.updateIO();
|
|
|
|
|
|
|
|
}
|
|
|
|
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>();
|
|
|
|