mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-12 21:44:06 +01:00
Created Open-Ended Pipe Effect Handlers (markdown)
parent
de1391f08d
commit
6a0993109f
8
Open-Ended-Pipe-Effect-Handlers.md
Normal file
8
Open-Ended-Pipe-Effect-Handlers.md
Normal file
@ -0,0 +1,8 @@
|
||||
Effect handlers for open-ended pipes can be registered to allow for custom behavior when such a pipe is spilling fluid.
|
||||
- Implement `OpenEndedPipe$IEffectHandler`
|
||||
- `canApplyEffects` checks if effects should be applied for the given `FluidStack`
|
||||
- `applyEffects` runs when effects should be applied
|
||||
- Both methods receive the `OpenEndedPipe` instance as context to allow getting the world, position, etc.
|
||||
- Register an instance with `OpenEndedPipe#registerEffectHandler`
|
||||
|
||||
An example can be found [here](https://github.com/Creators-of-Create/Create/blob/mc1.16/dev/src/main/java/com/simibubi/create/content/contraptions/fluids/OpenEndedPipe.java#L371). (Create's own handler for milk)
|
Loading…
Reference in New Issue
Block a user