Ways to change isInfinite of fluids in different dimension #1930
-
Hi, I am trying to change the isInfinite property of water to false in my custom dimension, meanwhile, keeping infinite in the other dimensions. Is there any easy way to realize it? The method I can think of is to override the isInfinite() method inside FlowableFluid class via mixin and change all the places where it appears. But I think it is too complicated. So I would like to ask whether there is an easy way to handle it. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In vanilla it is only used in one place -
To me this looks like it would be a candidate for a Fabric API event. I know forge has such an event - see CreateFluidSourceEvent here: |
Beta Was this translation helpful? Give feedback.
In vanilla it is only used in one place -
FlowableFluid.getUpdateState()
where it checks it alongsideTo me this looks like it would be a candidate for a Fabric API event.
I also don't see the architectury api providing in its compatibility layer.
I know forge has such an event - see CreateFluidSourceEvent here:
https://github.com/MinecraftForge/MinecraftForge/blob/1.18.x/src/main/java/net/minecraftforge/event/world/BlockEvent.java.