Jump to content

[1.15.2] Make Fluid flow player away


Skyriis

Recommended Posts

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 by Skyriis
insert first step to solution
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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! :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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.