Posted May 14, 20205 yr Hey Guys, i've created a Fluid using ForgeFlowingFluid which should behave like water but it don't flow things away Fluid: https://pastebin.com/678Ve6Fc FluidBlock: https://pastebin.com/DzsM2kaW Some Ideas how i can fix that? Edit #1: Adding the following code to the fluidblock will make entities flow away if they don't move @Override public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { super.onEntityCollision(state, worldIn, pos, entityIn); if (entityIn.getRidingEntity() instanceof BoatEntity) { entityIn.inWater=false; } else if (entityIn.handleFluidAcceleration(BlutmondFluidTags.CRYSTALLIZER)) { entityIn.fallDistance = 0.0F; entityIn.extinguish(); entityIn.inWater=true; } } Edited May 16, 20205 yr by Skyriis insert first step to solution
May 14, 20205 yr Have you made a water.json in your resources in data/minecraft/tags/fluids that contains your fluid block? I believe that is what makes water do it's floaty stuff.
May 14, 20205 yr Author i've made a .json in data/%modid%/tags/fluids. Should i move it to data/minecraft/tags/fluids? i've tried moving it to the mincraft tags but it doen't fixed my problem Edited May 14, 20205 yr by Skyriis update
May 14, 20205 yr 19 minutes ago, Skyriis said: i've made a .json in data/%modid%/tags/fluids. Should i move it to data/minecraft/tags/fluids? i've tried moving it to the mincraft tags but it doen't fixed my problem What does your water.json look like? The one I made for my thing when I was testing looked like this: Quote { "replace": false, "values": [ "bunchostuff:muddy_water", "bunchostuff:muddy_water_flow" ] } And it should be in data/minecraft/tags/fluids within your resources.
May 14, 20205 yr Author 40 minutes ago, Ugdhar said: What does your water.json look like? https://pastebin.com/ZZiyuKaT 40 minutes ago, Ugdhar said: it should be in data/minecraft/tags/fluids within your resources Okay i moved it to this location (.\src\main\resources\data\minecraft\tags\fluids\crystallizer.json)
May 14, 20205 yr 7 minutes ago, Skyriis said: https://pastebin.com/ZZiyuKaT Okay i moved it to this location (.\src\main\resources\data\minecraft\tags\fluids\crystallizer.json) Rename it water.json
May 14, 20205 yr Author But if i rename the tag file to water, forge thinks the fluid is another type of water. Which is not what i want. It should be a own fluid and only flow players, mobs, items, etc. away like water do
May 14, 20205 yr Ah, then I don't believe it's going to be so simple, and you'll have to dig in and find (or hope someone knows) where the actual water flow physics take place, and then hope it's in a place you can change it, and not embedded in the middle of something crazy. Sorry I'm not more help to you, I just knew that setting a fluid as water would make it float people and stuff, which is what it sounded like you wanted. Good luck!
May 14, 20205 yr Author No problem, i thought by changing the density and viscosity value of the FluidAttributes it whould work but it still behave like air and not like water. Maybe someone else know how to change that. Meanwhile i'll take a look in the minecraft source codes.
May 14, 20205 yr Author 11 minutes ago, diesieben07 said: water physics are hardcoded to the water fluid tag Oh... Okay. Well i guess there is some work for me to do ^^ thanks
May 16, 20205 yr Author On 5/14/2020 at 3:19 PM, diesieben07 said: There should probably be a pull request for mods to opt into it. i didn't find any pull request related to water physics. As far as i could understand, the water physics are located in the Entity class of minecraft (for example: handleWaterMovement on line #1057). It whould be great if the forge team could add something to create custom fluid physics.
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.