[5.11.2] OpenComputers robot.swing() not breaking blocks properly with wooden axe or no tool
Babbie opened this issue ยท 7 comments
There seem to be some issues with robot.swing() in this pack, in particular when using a wooden axe or no tool at all.
Expected Behavior
robot.swing() should be able to break a wooden log with a vanilla wooden axe.
Also, breaking a block without a tool that should be breakable without one should return true
and "block"
and put the resulting item in the selected slot in the robot's inventory.
Current Behavior
When attempting to break a wooden log with a vanilla wooden axe, the robot returns false
and "block"
and does not break it, even though by all means this should be possible. It does work some other axes, though (eg. a Tinkers' mattock). Besides that, if the robot does not have any tool equipped, it will return nil
and "unknown error"
, while still breaking the block, but without picking it up.
Possible Solution
This could be an interference with whatever mod causes chat messages to pop up when using a wooden axe. As for the second problem, it should be fixed in the current release of OpenComputers.
Steps to Reproduce
- Create a robot with an inventory upgrade and give it a wooden axe in its tool slot, and place it in front of a wooden log.
- Start the robot (with OpenOS installed)
- Enter
lua
, and thenrobot = require("robot")
, followed byrobot.swing()
.
For the second issue, remove the wooden axe and repeat steps 2 and 3.
That probably is a conflict with world edit, as it uses a wooden axe for a tool. Barring changing the type of tool (not sure that is possible) not sure that much can be done about it.
It might be something to let the OpenComputer Devs know about. Is there any other axe that it can use?
Vanilla stone axes seem to be working fine (which is what I'm using for now).
I'm about to go to bed, if you or someone else hasn't made an issue on the OpenComputers github by the time I wake up, I'll do it.
It seems that the issue might not lie with WorldEdit, since testing with just OpenComputers and WorldEdit results in normal behavior...