Plethora Peripherals

Plethora Peripherals

3M Downloads

Ability to know if player is breaking block

SkyTheCodeMaster opened this issue ยท 1 comments

commented

This is a cool idea that can be used (for example) to add a % broken to a WAILA clone, or have a multitool that stores the best tool for each block, and auto switches to it.
The 2 possible methods for implementing this are:

  • Adding a damage to blocks scanned with the block scanner.
  • Adding a isDigging() method to the introspection module (Or however it works, I haven't played with it too much). It would return a boolean (digging or not), and a number from 0 to 100 (percentage of block broken).

I personally think adding the isDigging() or similar to the introspection module is the better approach here, as adding a damage to blocks scanned means that programs potentially have to loop through nearly 5000 blocks to maybe find the right one, and if multiple players are nearby, do a lot more math to figure out which block the owner of the NI is breaking.

commented

I think the introseption approach is also better