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

I have no clue how to make a liquid and I was wondering if anyone could tell me how to make one using forge or show me a code example of one.

Depends how you want the liquid to be different form the original Lava and Water,

have you tried looking at build craft's code? https://github.com/BuildCraft/BuildCraft

It's open source so you can download the project and look at how it is implementing the oil, using eclipse you can import the project from Git by using the git read only URI which is found on the top of the page and then you can easly browse the project inn your IDE :)

 

Or you could just browse the files on your web browser :)

 

 

Edit: The oil code is inn the Energy part of the mod, there you will find the BlockOilStill and BlockOilFlowing files and from there you should be able to figure out how to proceed :)

If you guys dont get it.. then well ya.. try harder...

When you try to copy the code over from BC to your own file?

Well I guess that BC is using a different(older) version of MCP inn it's master branch which is for it's last release build.

and inn your project you got a newer version of forge and MCP where the names on it has changed or something?

That could perhaps be the reason for the error, depending on what error it is? :)

 

If you open the thing you call the .getRenderType() method on, maybe you find that the method is renamed or changed somehow?

Or missing? Most of this you can see from the error I believe :)

There could be missing imports or some other errors, it's kinda hard to tell when you say "there's an error" without specifying ^^

 

If you guys dont get it.. then well ya.. try harder...

  • Author

sorry, I didn't mean the method was the error, I meant that I'm not sure what to put for the return type.

Well if you want to use the vanilla way to do it, it is to return the number 4 according to the post I linked above. The code where it is used is shown a few posts further down. I assume that would prove to work as intended.

 

Else I guess you could write your own way of handling it like they did with BC, but if it's not needed and all works as you want it to the vanilla way, why bother? :)

If you guys dont get it.. then well ya.. try harder...

  • Author

ok it works. now all I need to know is how to make an animated texture for it. I'll see how vanilla minecraft does it

  • Author

actually do you happen to know how minecraft makes the liquid look like it's flowing? and will my liquid be storable in tanks now?

actually do you happen to know how minecraft makes the liquid look like it's flowing? and will my liquid be storable in tanks now?

I think if you made it with the BC API it will be, otherwise I'm not too sure. Wait, didn't the forge team make the liquid API universal? If so it should work with tanks.

If you found this post helpful, please take your time to give me a "Thank You". :)

so than how to I make it look like it's flowing?

Use animations and check out Minecraft's liquid code.

If you found this post helpful, please take your time to give me a "Thank You". :)

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.