Mekanism

Mekanism

111M Downloads

ComputerCraft/OpenComputers-Integration for Thermal Evaporation Towers does not work

amesgen opened this issue ยท 13 comments

commented

All methods return "Unformed.", even though they are clearly formed. The integration works with the Fusion Reactor.

commented

Update: The integration works fine with every block EXCEPT the Thermal Evaporation Controller, which is quite funny.

commented

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();
    }
}
commented

You're sure that both OpenComputers and ComputerCraft integration don't work, or just one of the two?

commented

Yes, both do not work. (I am using the 1.6 beta of OpenComputers, dont know whether this has an impact)

commented

Is the Thermal Evaporation Plant formed, or is it unformed? Support technically will only work with a structured plant.

commented

The plant is formed, of course ;)

commented

CC recognizes the TEController as a peripheral, and OC lists it as a compontent (using an adapter block)

commented

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()?

commented

anything new?

commented

Yeah i can confirm it works on normal blocks but haven't tried on the controller

commented

Nice! If it is not too hard to explain, what was the issue?

commented

Fixed!

commented

Nvm, just saw it in the commits of the development branch.