Mekanism Tools

Mekanism Tools

77M Downloads

Methods not found in Opencomputers II

WretchedAbyss opened this issue ยท 1 comments

commented

Issue description

No methods seem to work I initially tested it with my induction matrix but found it doesn't work with any devices as far as I have seen. (including by not limited to induction matrix port, fission reactor port. Both attached to the multiblock)
I can retrieve the methods
type device-id: 96ac0ad6-dd67-4c52-a0c2-092f3547516e
[{'parameters': [], 'name': 'getItemSlotCount', 'returnType': 'int'},
{'parameters': [{'type': 'int'}], 'name': 'getItemStackInSlot', 'returnType': 'ItemStack'},
{'parameters': [{'type': 'int'}], 'name': 'getItemSlotLimit', 'returnType': 'int'},
{'parameters': [], 'name': 'canExtractEnergy', 'returnType': 'boolean'},
{'parameters': [], 'name': 'canReceiveEnergy', 'returnType': 'boolean'},
{'parameters': [], 'name': 'getEnergyStored', 'returnType': 'int'},
{'parameters': [], 'name': 'getMaxEnergyStored', 'returnType': 'int'}]
But none of these seem to function and all return an error.
test
Everything is connected as that's how I got the methods for the devices I tried reconnecting them it still didn't fix the issue.

Steps to reproduce

  1. Download Open computers 2 and Mekanism
  2. Get an Induction Matrix
  3. Connect the induction matrix
  4. Type Micropython
  5. Then input this code import devices " d = devices.bus() " , " i = d.find("inductionPort") ", then "print(i.getEnergyStored())" or any command related to trying to get information out of the device.

Minecraft version

1.18.2 (Latest)

Forge version

40.1.30

Mekanism version

10.2.2 (Latest)

Other relevant versions

It worked fine in Mekanism 10.2.0

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

commented

So I can confirm that open computers isn't seeing our capabilities that we expose as machines and I believe it is due to this (102a1b0 )change of ours where we finished updating to properly support and handle the fact that capabilities truly can never be null now even if they aren't registered and that if a capability isn't registered we just short circuit before bothering to check if we can even support it (as if it isn't registered that means it isn't actually present which means we don't need to return anything).

I sent Sangar a message inquiring about this (and whether they would like me to open an issue on their tracker), as from what I can tell they never register the listener for their capability register event. But if I am correct there is nothing we can do on our end to reasonably fix it.