Jump to content

[1.10.2] Change which liquids are infinite


josephcsible

Recommended Posts

I want to change which liquids are "infinite" (like water is in vanilla). I see that in net.minecraft.block.BlockDynamicLiquid, the updateTick method includes the line "if (this.adjacentSourceBlocks >= 2 && this.blockMaterial == Material.WATER)", which seems to be how this is controlled. My question is the best way to change this behavior. Should I subclass BlockDynamicLiquid and try to replace all uses of it? Should I use coremod/ASM to change that to do something like "if (this.adjacentSourceBlocks >= 2 && someFunctionInMyMod(this, worldIn, pos, state))"?

Link to comment
Share on other sites

  • 1 month later...

I just saw this on forge changelog and decided to comment here for the record

Build 1.10.2-12.18.1.2023:
josephcsible: Add CreateFluidSourceEvent to control infinite fluid sources
josephcsible: Add a test for CreateFluidSourceEvent
josephcsible: Use CreateFluidSourceEvent for mod fluids as well

 

this might aid you in your problem without the need of ASM

Link to comment
Share on other sites

I just saw this on forge changelog and decided to comment here for the record

Build 1.10.2-12.18.1.2023:
josephcsible: Add CreateFluidSourceEvent to control infinite fluid sources
josephcsible: Add a test for CreateFluidSourceEvent
josephcsible: Use CreateFluidSourceEvent for mod fluids as well

 

this might aid you in your problem without the need of ASM

Yes, I'd say that definitely aids me in my problem, considering I'm the one who wrote it :P
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.