Posted July 5, 20169 yr 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))"?
July 10, 20169 yr Author I ended up doing this as a coremod. Since I'm new to coremodding, can someone take a look at https://github.com/josephcsible/InfiniteFluids/blob/1.10.2/src/main/java/josephcsible/infinitefluids/InfiniteFluidsClassTransformer.java to make sure I didn't do anything too stupid?
July 10, 20169 yr Do you know any tutorials on asm? http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod]
August 12, 20169 yr 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
August 12, 20169 yr Author 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
August 12, 20169 yr That moment when you don't check the commiters. I feel stupid now but it's still true at least
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.