ModificationStation / StationAPI

A general use API for Fabric Loader mods on legacy Minecraft versions.
86 stars 20 forks source link

canHarvest hook #77

Closed 2zqa closed 1 day ago

2zqa commented 1 year ago

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.

mineLdiver commented 4 days ago

Should be resolved once https://github.com/ModificationStation/StationAPI/pull/133 is merged

mineLdiver commented 1 day ago

Implemented through IsPlayerUsingEffectiveToolEvent and PlayerStrengthOnBlockEvent