Posted February 3, 201312 yr 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.
February 3, 201312 yr 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...
February 3, 201312 yr 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...
February 3, 201312 yr 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.
February 3, 201312 yr I'm not sure but judging by this I guess it should be "4"? http://www.minecraftforum.net/topic/241903-creating-mods-mcp-getrendertype/ What is he doing inn the build craft source? If you guys dont get it.. then well ya.. try harder...
February 3, 201312 yr 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...
February 3, 201312 yr 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
February 3, 201312 yr 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?
February 4, 201312 yr 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".
February 4, 201312 yr 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.