From 6a0993109f71d48159ba661a80a629b95a61739f Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Fri, 22 Oct 2021 19:25:43 -0700 Subject: [PATCH] Created Open-Ended Pipe Effect Handlers (markdown) --- Open-Ended-Pipe-Effect-Handlers.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Open-Ended-Pipe-Effect-Handlers.md diff --git a/Open-Ended-Pipe-Effect-Handlers.md b/Open-Ended-Pipe-Effect-Handlers.md new file mode 100644 index 0000000..7c706e0 --- /dev/null +++ b/Open-Ended-Pipe-Effect-Handlers.md @@ -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) \ No newline at end of file