ComputerCraft/OpenComputers-Integration for Thermal Evaporation Towers does not work
amesgen opened this issue ยท 13 comments
All methods return "Unformed.", even though they are clearly formed. The integration works with the Fusion Reactor.
Update: The integration works fine with every block EXCEPT the Thermal Evaporation Controller, which is quite funny.
possible workaround for TileEntityThermalEvaporationBlock, which also might be a tiny bit more performant xD
public Object[] invoke(int method, Object[] args) throws Exception
{
//add check
TileEntityThermalEvaporationController controller = this instanceof TileEntityThermalEvaporationController ? this : getController();
if(controller == null)
{
return new Object[] {"Unformed."};
}
switch(method)
{
case 0:
return new Object[] {controller.temperature};
case 1:
return new Object[] {controller.height};
case 2:
return new Object[] {controller.structured};
case 3:
return new Object[] {controller.inputTank.getFluidAmount()};
case 4:
return new Object[] {controller.outputTank.getFluidAmount()};
default:
throw new NoSuchMethodException();
}
}
You're sure that both OpenComputers and ComputerCraft integration don't work, or just one of the two?
Yes, both do not work. (I am using the 1.6 beta of OpenComputers, dont know whether this has an impact)
Is the Thermal Evaporation Plant formed, or is it unformed? Support technically will only work with a structured plant.
CC recognizes the TEController as a peripheral, and OC lists it as a compontent (using an adapter block)
Digging in your code, the implementation of IComputerIntegration
in TileEntityEvaporationBlock
is almost identical compared to the fusion reactor. Therefore, as the computers return "Umformed.", the getController()
-method may be the issue. What happens if you implement IComputerIntegration
only in TileEntityEvaporationController
, because in this case, you don't have to call getController()
?
Yeah i can confirm it works on normal blocks but haven't tried on the controller