Jump to content

Json Files For Textures


BeerHuntor

Recommended Posts

OK i had everything working as intended originaly,  however I wanted to make my project window more organized and looked to create folders for each "catagory" of block/item in my mod, having downloaded and looked at how another mod did it, albeit a 1.12 mod.. I have managed to solve the issue of the models not rendering correctly when in world,  but for the life of me, i cannot get the textures to show when in the inventory. And for some reason only 1 item doesnt show its localized name when all the rest do.

image.thumb.png.8f50a8ca087357e937fdfc4d1005a574.png

What am i doing wrong?

 

EDIT: from more testing, it seems that the item json file is the cause of the issue. Is there a way I can direct something to that path? as I cant seem to find a way currently

 

Edited by BeerHuntor
Link to comment
Share on other sites

3 minutes ago, diesieben07 said:

No. You should look into data generators instead of writing your JSONs manually.

 

Ill have a research of that, thanks for the tip...is there a best place to read up on those?

 

Edited by BeerHuntor
Link to comment
Share on other sites

1 hour ago, BeerHuntor said:

Ill look that mod up thanks.

Ive looked it up, and all i could really find that was indepth was a complete class base from a forge website https://collaborating.tuhh.de/cev7691/minecraftforge/-/blob/1.14.x/src/test/java/net/minecraftforge/debug/DataGeneratorTest.java

 

I can piece some things together, and would like to use it, but I cannot for the life of me understand what I need and what I don't to suit my needs.  So i think Ill stick with the manual JSON editing for the time being. Thanks for the suggestion tho.

Link to comment
Share on other sites

On 6/27/2020 at 5:51 PM, diesieben07 said:

Thanks, but that is basically the same as the one I found, and doesn't go towards helping me understand what it does in its entirety... For example.. the mod im trying to create is creating slabs of blocks form vanilla... How would I transfer this json into code to suit my needs..

{
  "parent": "block/slab",
  "textures": {
    "bottom": "minecraft:block/white_concrete",
    "top": "minecraft:block/white_concrete",
    "side": "minecraft:block/white_concrete"
  }
}



And the more confusing aspect is how to do the loot_tables with said dataGeneration.. I have tried messing around with it but I couldn't get it to work...

{

  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "conditions": [
                {
                  "condition": "minecraft:block_state_property",
                  "block": "moreslabsmod:acacia_log_slab",
                  "properties": {

                    "type": "double"

                  }
                }
              ],
              "count": 2
            },
            {
              "function": "minecraft:explosion_decay"
            }
          ],
          "name": "moreslabsmod:acacia_log_slab"
        }
      ]
    }
  ]
}
Link to comment
Share on other sites

ok seeing  as my other thread got deleted... ill ask here..

image.png.c0f6ad3ce00f52808e0f08e978b3f081.png

I am trying to organize my files in my project window, and cannot find anywhere where having the models/item files can be linked to a directory of my choosing, for example models/items/wood as i do in models.. Is there somewhere that I can point to this directory to enable me to do that as I have in models, or does the base code only look in the models/items folder for the inventory item textures?

Link to comment
Share on other sites

57 minutes ago, BeerHuntor said:

and cannot find anywhere where having the models/item files can be linked to a directory of my choosing

You can't. Item models are loaded based on a path constructed entirely outside your control. Its the same reason you can't put blockstate files wherever you want.

The only reason you can move your block models around is because you actually specify their paths in the blockstate file.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

28 minutes ago, Draco18s said:

You can't. Item models are loaded based on a path constructed entirely outside your control. Its the same reason you can't put blockstate files wherever you want.

The only reason you can move your block models around is because you actually specify their paths in the blockstate file.

Yeah thats what I thought it might be.. thats...unfortunate.  Thanks anyway

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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