Jump to content

Struggling to code new liquids.


Recommended Posts

Hey all, I'm having trouble getting liquids to work in the mod I'm working on with a friend and it seems no matter what i do they just wont register as blocks. 
At best, the liquid WILL show up as a item, but it wont appear in a bucket in the creative inventory and if I try and use the existing base game code for liquids with the added "[ { type: "block", code: "game:woodbucket", attributes: { ucontents: [ { type:"item", code: "gggenchem:dissolvedsulfur", makefull: true } ] } } ]" section formatted correctly, it just crashes the same as This existing thread.

I'd appreciate any and all helpw ith this because the wiki doesnt have much in the way of guides for custom liquids, and even attempts at reverse engineering the code for other mods liquids hasnt gone very far 😭.
 

dissolvedsulfur.json dissolvedsulfurportion.json

image.png

Edited by RoboGlizzy
image didn't embed
Link to comment
Share on other sites

I will share something I found out similar to your issue. I was making a block and I was having the darnest time. The game kept thinking it was an item and not a block. It turns out the folder that you place your files matter. I had placed my file which was supposed to be a blockType inside a folder named itemTypes. Bottom line is you can take the same file and if you place it in itemtypes it will be an item. If you place in blocktypes it will be a block. Maybe if you do that with whatever it is that fluids need then the game will be able to read it?

 

Looking at your screenshot your asset says "game:item-dissolvedsulfurportion" and not 'game:block-dissolvedsulfurportion" or "game:fluid-dissolvedsulfurportion". That leads me to believe that you placed your main "types" file in the "itemtypes" folder inside your mod. You might need to place it in the folder designated for fluids. Once again I dont know what folder that is since I'm only familiar with "itemTypes" and "blockTypes".

 

You know what I'm looking in to this for my own personal mod as well. I will let you know what I find out.

Edited by ZergMazter
Link to comment
Share on other sites

  • 2 weeks later...

Are you sure you are not missing the ending "} ]" that would close line "creativeinventoryStacks: [ {"? I've done this and crashed my game so many times. It's always the silliest things. Should look like:

creativeinventoryStacks:

[ { tabs: ["general", "liquids"], stacks: [ { type: "block", code: "game:woodbucket", attributes: { ucontents: [ { type:"item", code: "gggenchem:dissolvedsulfur", makefull: true } ] } } ] } ],

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.