Jump to content

Recommended Posts

Posted

Hey!

 

I'm trying to place flowing water in the world. I do this:


        world.setBlockState(pos, Fluids.FLOWING_WATER.getDefaultState().getBlockState());

I can place it, and it appears. Using World#getFluidState and World#getBlockState indicates that it has worked.

It seems to happen on both the client and the server side.

 

However, it does not flow and disappears almost instantly after being placed.

Interestingly, it behaves as expected if I place two blocks next to each other rapidly.

 

Can anyone help me?

Posted

Flowing water is not a water source block. As such, it has no source, and evaporates.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
35 minutes ago, Draco18s said:

Flowing water is not a water source block. As such, it has no source, and evaporates.

Thanks for the information, however, it doesn't help me with my problem. What do you mean by "evaporates"?

 

To be clear: the issue I have is not that it disappears gradually, as flowing water usually behaves in MC. As I said, "it does not flow". It simply disappears after about half a second.

 

Flowing water can exist in the world without a source block. If you want to see what I mean, create a 1x2x1 space in the world and place water in the upper of those blocks, that is then a source block, while the block below becomes flowing water. Then remove the source block, and the flowing water block below will not disappear instantly, but gradually.

 

I'm looking to create such a block, that

- is not a "source block"

- does not disappear instantly, but gradually

Edited by Anrza
Posted
2 hours ago, Anrza said:

What do you mean by "evaporates"?

This:

3 hours ago, Anrza said:

and disappears almost instantly after being placed.

Because it has no source it ceases to exist because it has no source.

2 hours ago, Anrza said:

and the flowing water block below will not disappear instantly, but gradually.

Each block in a water stream has a "depth" level and each block looks at the blocks around it and says, "what should my depth be? If I am next to a source block, 8, otherwise 1 less than the maximum I see around me."
You placing a non-source block into the world does this check and finds that its depth should be 0. Depth 0 is air. It sets itself to air.

4 hours ago, Anrza said:

it behaves as expected if I place two blocks next to each other rapidly.

Because each one sees an adjacent water block with a depth value and each one decrements their depth value by 1 each tick.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.