cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
929 stars 211 forks source link

Expandable turtle tools #883

Open SirEdvin opened 3 years ago

SirEdvin commented 3 years ago

I would suggest to more expandable turtle tools upgrade.

For example, turtle tool flow can be splitted in this steps:

  1. Selecting blocks to break
  2. Generate tool to break blocks
  3. Block breaking
    • Check if block suitable for break (extra callback)
    • Check if breaking could continue (for example, fluid check)
    • Block breaking
    • Process drop

I guess, most of modders would be interesting in changing everything expect actually block breaking.

So, for example, each of this steps, expect block breaking, could be a part of API.

SirEdvin commented 3 years ago

Here is my crude example, of how this can be: https://github.com/SirEdvin/ProgressivePeripherals/blob/1.16/src/main/java/site/siredvin/progressiveperipherals/integrations/computercraft/turtles/base/TurtleDigTool.java

Not perfect at all, but some idea show be ... visible?