Applied Energistics 2

Applied Energistics 2

156M Downloads

Wrench Capability

PssbleTrngle opened this issue ยท 5 comments

commented

Describe the feature
Instead of making the wrench an implementable interface, make it a capability.

Reasons why it should be considered
There is no way for mod to provide their wrench without making AE2 a hard dependency

commented

From Creators-of-Create/Create#1691.

I would like to move to a system where the forge:tools/wrenches (or similar, I'm not sure of the exact name) tag is used for "simple" wrenches, i.e. those that don't cost any durability but just tell the block to have wrench behavior - think Thermal's Crescent Hammer, AE2's own wrenches, Create's as well, etc... I don't really care about not damaging wrenches that should be damaged after usage - I guess players would use non-damageable wrenches anyway.

commented

I do think allowing items with the tag forge:tools/wrenches would suffice for almost all cases. Most of the wrenches provides by other mods do allow usage independent from any conditions like the player or itemstack and most of them don't even have any durability, so implementing an interface just to return true is kind of an overkill for most of them

commented

Should I include checking if the itemstack has the forge:tools/wrenches in this pr?

commented

This is not as easy as adding a cap or tag to support other wrenches. Currently some logic is still handled by our own wrenches or would have to be handled by them to fix one or two smaller bugs.

As far as I can remember the wrenches handle rotating or disassembling blocks on their side, while only parts handle their own removal when being activated by a wrench.

We would need to completely rewrite the wrench handling to support any item being used. The usual example of using a stick for debugging. Probably removing IAEWrench completely due to being useless then.
Otherwise it would behave pretty randomly when using a 3rd party wrench instead of an AE2 wrench.

commented

Closing in favour of a tag based approach in 1.17