Jump to content

Recommended Posts

Posted

Hello, I am making a pipe block and I wanted to render fluids through the pipes, but just thinking about it, there just doesn't seem like there is a relativity easy way, that does not require a whole ton of math, to do this. Is there some sort of api that helps out with this or should I just make my pipe opaque and call it a done deal and not even bother with it.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted

Why would it require a ton of math? Just bind a texture if there is a fluid in it (nbt tag?), and dont bind it otherwise.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

Is this pipe a custom rendered block that connects when placed next to another? or is it a full 1x1x1 block?

 

Also, do you mean that depending on the amount of fluid in the pipe, a different height of fluid is rendered? (kind of like BuilcCrafts pipes) If so, then there would be a little bit of maths to do this, not a tone though, really just getting the currently stored amount, dividing it by fluid capacity of the pipe, and multiplying it by height of the maximum amount to be rendered (I am not 100% sure of this, but it will be something along those lines). Also, you would need a custom block renderer to do this in.

 

You would also need a method in the renderer to get the current texture of the fluid in the pipe. I can't tell you how to do this at the moment (I am on a school pc, and don't have access to my code at home to make sure if I am correct, and I don't want to be giving wrong answers) but will do later if nobody already has by then.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

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.