Adds a new event, TransitionSaplingToTreeEvent, as requested by @joe-vettek.
Event Info
Invoked before sapling transition logic
Cancelable
Supporting Changes
Species#transitionToTree split into three methods:
Species#transitionToTree(World, BlockPos); the original method. Now invokes the event and then performs transition using other new methods. Made final to make incompatibility with this event cause compilation errors.
Species#shouldTransitionToTree; called if the event is not cancelled, running the default checks for empty block above and acceptable soil below.
Species#transitionToTree(World, BlockPos, Family); the method that now handles transition logic. Invoked only if the event is not cancelled and shouldTransitionToTree returns true.
Adds a new event,
TransitionSaplingToTreeEvent
, as requested by @joe-vettek.Event Info
Supporting Changes
Species#transitionToTree
split into three methods:Species#transitionToTree(World, BlockPos)
; the original method. Now invokes the event and then performs transition using other new methods. Madefinal
to make incompatibility with this event cause compilation errors.Species#shouldTransitionToTree
; called if the event is not cancelled, running the default checks for empty block above and acceptable soil below.Species#transitionToTree(World, BlockPos, Family)
; the method that now handles transition logic. Invoked only if the event is not cancelled andshouldTransitionToTree
returnstrue
.