-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open Ended Pipe Effect Handlers
PepperCode1 edited this page Oct 23, 2021
·
1 revision
Effect handlers for open-ended pipes can be registered to allow for custom behavior when such a pipe is spilling fluid.
- Implement
OpenEndedPipe$IEffectHandler-
canApplyEffectschecks if effects should be applied for the givenFluidStack -
applyEffectsruns when effects should be applied - Both methods receive the
OpenEndedPipeinstance as context to allow getting the world, position, etc.
-
- Register an instance with
OpenEndedPipe#registerEffectHandler
An example can be found here. (Create's own handler for milk)