Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.16.4] Make Fluid Behave Like Water


Haydenman2
 Share

Recommended Posts

Hello,

 

I have created a handful of fluids for my mod, and I got to the functionality and physics of a fluid by adding it to the minecraft:fluid/water tag. The issue is, this causes the fluid to work in various machines I do not want it working in, not to mention the water bubbles and other undesired results of tagging it as water. Is there a way to have it physically behave the same as water without any of the side effects of being water internally?

 

Fluid Class

 

Registry

 

Any help would be appreciated. I have tried copying logic from Entity/LivingEntity to no avail.

...

Link to comment
Share on other sites

3 hours ago, Haydenman2 said:

fluid/water tag

Maybe don't add it to the water tag?

Edited by Draco18s

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.

Link to comment
Share on other sites

48 minutes ago, Draco18s said:

Maybe don't add it to the water tag?

In that case, removing the fluid from the water (or lava) tag also removes the physics and allows me to walk freely through the fluid. The water tag is the only way I have found to make the fluid act as a disruptor to player movement.

...

Link to comment
Share on other sites

That's because swimming logic is handled by the LivingEntity class, not the block class. And the check it makes is based on the fluid/water tag.

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.

Link to comment
Share on other sites

On 12/27/2020 at 5:38 PM, Draco18s said:

That's because swimming logic is handled by the LivingEntity class, not the block class. And the check it makes is based on the fluid/water tag.

Thank you for pushing me in the right direction. Now I more understand how to manage and utilize fluid tags. Now, one more question, is it proper/typical to tag the fluid under Minecraft, Forge, or my mod's namespace?

Edited by Haydenman2

...

Link to comment
Share on other sites

Depends on your goal, really.

 

Generally speaking you shouldn't create new tags in Forge or Minecraft namespace domains, but sometimes it is appropriate (e.g. if you're adding copper ingots, then forge:ingots might be the right place, because every modder who is adding copper that also do that is going to be interoperable).

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.

Link to comment
Share on other sites

Just now, Draco18s said:

Depends on your goal, really.

 

Generally speaking you shouldn't create new tags in Forge or Minecraft namespace domains, but sometimes it is appropriate (e.g. if you're adding copper ingots, then forge:ingots might be the right place, because every modder who is adding copper that also do that is going to be interoperable).

So something along the lines of forge:fluids/oil may be considered appropriate as I would want my oil to be interoperable?

...

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.