I'm trying to port a Spigot plugin of mine that implements a robust claims system into Fabric. This mod is server-side only. I'm most of the way through, but one event that's escaping me is StructureGrowEvent.
In Spigot, I have access to the player that caused the StructureGrowEvent if there was one, (person who bonemealed a mushroom or a sapling,) but in Fabric as best as I can tell, the last time a player comes into the equation is BoneMealItem#useOnFertilizable. I'd like to somehow find the player that bonemealed, (or even planted the sapling,) when the tree is generated.
My current mixin is at the head of TreeFeature#canReplace, and that seems to be the method I want after messing with it some. Any ideas I could explore?