josephcsible Posted July 5, 2016 Share Posted July 5, 2016 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))"? Quote Link to comment Share on other sites More sharing options...
josephcsible Posted July 10, 2016 Author Share Posted July 10, 2016 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? Quote Link to comment Share on other sites More sharing options...
MCrafterzz Posted July 10, 2016 Share Posted July 10, 2016 Do you know any tutorials on asm? Quote http://i.imgur.com/J4rrGt6.png[/img] [Creator of mcrafterzz mod] Link to comment Share on other sites More sharing options...
josephcsible Posted July 10, 2016 Author Share Posted July 10, 2016 For this mod, I followed the one at and . Quote Link to comment Share on other sites More sharing options...
imadnsn Posted August 12, 2016 Share Posted August 12, 2016 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 Quote Link to comment Share on other sites More sharing options...
josephcsible Posted August 12, 2016 Author Share Posted August 12, 2016 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 1 Quote Link to comment Share on other sites More sharing options...
imadnsn Posted August 12, 2016 Share Posted August 12, 2016 That moment when you don't check the commiters. I feel stupid now but it's still true at least Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.