Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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!

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!

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.