All the Mods 3 - ATM3

All the Mods 3 - ATM3

3M Downloads

[5.11.2] OpenComputers robot.swing() not breaking blocks properly with wooden axe or no tool

Babbie opened this issue ยท 7 comments

commented

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

  1. 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.
  2. Start the robot (with OpenOS installed)
  3. Enter lua, and then robot = require("robot"), followed by robot.swing().
    For the second issue, remove the wooden axe and repeat steps 2 and 3.
commented

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.

commented

Should I let the people over at OpenComputers and WorldEdit know about this?

commented

It might be something to let the OpenComputer Devs know about. Is there any other axe that it can use?

commented

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.

commented

It seems that the issue might not lie with WorldEdit, since testing with just OpenComputers and WorldEdit results in normal behavior...

commented

OpenComputers is in this pack I must of overlooked it on the mod list

commented

Not sure if it is the server or the pack or what it might be. In any case I'm not able to reproduce this, so maybe fixed? When the pack gets an update I'll close this, and if it still exists just reopen.