DynamicTreesTeam / DynamicTrees

Minecraft Forge mod providing dynamic trees that progressively grow from seed to maturity.
MIT License
218 stars 96 forks source link

Add a default destroyTime for BlockWithDynamicHardness that isn't zero. #710

Closed alcatrazEscapee closed 1 year ago

alcatrazEscapee commented 1 year ago

In short - this should not have any effect on the functionality of dynamic trees itself. This sets the vanilla field to a default value of 2.0, rather than zero (which indicates this block breaks instantly). This exists purely for cases where the underlying field is queried by another mod, because a position isn't available.

I ran into this with an issue with one of my mods. While I'm able to fix this for the most part, because Forge does provide a position to PlayerEvent.BreakSpeed, it does not provide a position to PlayerEvent.HarvestCheck, and this is a, in my opinion, harmless change on dynamic tree's part that would avoid the issue all together, in addition to my own fix in https://github.com/alcatrazEscapee/no-tree-punching/commit/7dbdebfd1a48f8e3ac0c22b20decc67acef472e3.