Hi, I am having a lot of trouble with the creation of fluids in eclipse (with forge). There are a few tutorials out there but most of them are for 1.7.x or less and don't work with forge 1.8! I tried a couple and they did not work/caused my game to crash! Does anyone have/know of a simple, tested, working tutorial or piece of example code I could use? I am just beginning with mod development and could be called a noob.
I explain some fluid-related things and provide examples in this thread.
I've updated my fluid code since posting in that thread, switch the branch on GitHub to see the latest code for each Minecraft version (from 1.8 upwards). The 1.9.4 branch is the only one being actively developed at this point.
I'd highly recommend updating to 1.9.4 or at least 1.8.9. 1.8 is quite old.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
The screenshot you posted doesn't show the error, but this page explains how to fix it.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
But when I created the gradle.properties folder and entered the org.gradle.jvmargs=-Xmx2G and saved it, I ran the setupDecomp...... and it still failed
You created the file in the wrong .gradle directory. Create it in %USERPROFILE%\.gradle (the Windows equivalent of ~/.gradle) instead.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
So now that i have Minecraft forge 1.9.4 working, I need to get the fluids working.
The 1st comment on this thread by Choonster had a link to another thread with 6 links to pieces of example code. However, I'm a noob at java and I need help figuring out where to place these files in order to test an example fluid/gas. When I placed them in a blank forge 1.9.4 workspace (in the way shown in the following screenshot) i got only two errors show in the screenshot. any help? A response would be amazing :)!
However after I launched the game and viewed the fluids in creative, both the textures for the liquid and gas were default (screenshot below). Does anyone know how to fix this?
You need to tell the block and item to use the forge:fluid model (set in the blockstates file), this will use the textures you specified when creating the Fluid instance.
You can see the blockstates file for my fluids here and the fluid registration here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Sorry I'm not following you...I know about the main/fluids file and the blockstate file but I am still confused at why the texture is not already working. I have both of the files in my workspace.
Post your code and FML log (logs/fml-client-latest.log) using Gist or Pastebin. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
Screenshots are not a good way to share code.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You didn't post your FML log, but I can see a problem already: Resource domains are always lowercase. Your assets must be in assets/forgedebugmodelfluid/..., not assets/ForgeDebugModelFluid/....
Copying and pasting code is a bad idea. Try to understand what the example code is doing and write it yourself.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I did post the fml log right after I posted the other files. Sorry about the copy/pasting of files ---> I don't know much about java and I'm learning
So I changed the file name and now the texture for the fluids are invisible. as seen in the screenshot below, this zombie is in the gas fluid (the one with the resource lava)
If you've renamed the directory, post the new FML log.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
This is caused by TestGas#getColor. Fluid#getColor must return an integer in the format 0xAARRGGBB (alpha, red, green, blue). TestGas#getColor returns 0x66FF00, which has 0 as its alpha value. This causes it to be rendered completely transparent.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Hi, I am having a lot of trouble with the creation of fluids in eclipse (with forge). There are a few tutorials out there but most of them are for 1.7.x or less and don't work with forge 1.8! I tried a couple and they did not work/caused my game to crash! Does anyone have/know of a simple, tested, working tutorial or piece of example code I could use? I am just beginning with mod development and could be called a noob.
Any help is appreciated!
I explain some fluid-related things and provide examples in this thread.
I've updated my fluid code since posting in that thread, switch the branch on GitHub to see the latest code for each Minecraft version (from 1.8 upwards). The 1.9.4 branch is the only one being actively developed at this point.
I'd highly recommend updating to 1.9.4 or at least 1.8.9. 1.8 is quite old.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
So i decided to switch to forge 1.9.4 but when I ran the gradlew setupDecomplieWorkspace eclipse command on my low powered PC the build failed!
it failed at 44% decomplieMC because of GC overhead limit exceeded
Any help?
The screenshot you posted doesn't show the error, but this page explains how to fix it.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
sorry about the screenshot
But when I created the gradle.properties folder and entered the org.gradle.jvmargs=-Xmx2G and saved it, I ran the setupDecomp...... and it still failed
any ideas?
You created the file in the wrong .gradle directory. Create it in %USERPROFILE%\.gradle (the Windows equivalent of ~/.gradle) instead.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Oops!
So i moved the file to the correct location and when I run gradlew dec.... it does nothing at configruing root project > 0/1 root project
UPDATE:
After some testing, I finally got it to work and I got BUILD SUCSSESFUL!
Thank you so much Choonster!
So now that i have Minecraft forge 1.9.4 working, I need to get the fluids working.
The 1st comment on this thread by Choonster had a link to another thread with 6 links to pieces of example code. However, I'm a noob at java and I need help figuring out where to place these files in order to test an example fluid/gas. When I placed them in a blank forge 1.9.4 workspace (in the way shown in the following screenshot) i got only two errors show in the screenshot. any help? A response would be amazing :)!
I'm back again
After playing around a little bit I was able to fix the errors by changing this:
ModelBakery.addVarientName(fluid);
ModelBakery.addVarientName(gas);
Into this:
ModelBakery.registerItemVariants(fluid);
ModelBakery.registerItemVariants(gas);
However after I launched the game and viewed the fluids in creative, both the textures for the liquid and gas were default (screenshot below). Does anyone know how to fix this?
You need to tell the block and item to use the forge:fluid model (set in the blockstates file), this will use the textures you specified when creating the Fluid instance.
You can see the blockstates file for my fluids here and the fluid registration here.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Sorry I'm not following you...I know about the main/fluids file and the blockstate file but I am still confused at why the texture is not already working. I have both of the files in my workspace.
Post your code and FML log (logs/fml-client-latest.log) using Gist or Pastebin. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
Screenshots are not a good way to share code.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Here are links to my files:
Main/fluid registration and initialization
Blockstate
fml-client-latest
and a screenshot [ ] of my file organisation:
You didn't post your FML log, but I can see a problem already: Resource domains are always lowercase. Your assets must be in assets/forgedebugmodelfluid/..., not assets/ForgeDebugModelFluid/....
Copying and pasting code is a bad idea. Try to understand what the example code is doing and write it yourself.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I did post the fml log right after I posted the other files. Sorry about the copy/pasting of files ---> I don't know much about java and I'm learning
So I changed the file name and now the texture for the fluids are invisible. as seen in the screenshot below, this zombie is in the gas fluid (the one with the resource lava)
Any ideas?
If you've renamed the directory, post the new FML log.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Here is the new fml code
This is caused by TestGas#getColor. Fluid#getColor must return an integer in the format 0xAARRGGBB (alpha, red, green, blue). TestGas#getColor returns 0x66FF00, which has 0 as its alpha value. This causes it to be rendered completely transparent.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
That worked but now there is still a lava texture for the gas?
any ideas?