ModificationStation/StationAPI

canHarvest hook

Closed this issue · 2 comments

2zqa commented

Currently it is not possible to inject into PlayerInventory's canHarvest method, because StationAPI already does this. However it can still be useful for mods to change the behavior of this method. Is there a way to achieve this currently (without injecting into StationFlatteningPlayer)? If not, could there be a hook or something similar available?

For context: we're trying to conditionally (based on block metadata) increase the speed when mining with a null itemstack.

Should be resolved once #133 is merged

Implemented through IsPlayerUsingEffectiveToolEvent and PlayerStrengthOnBlockEvent