Jump to content

1.12 Forge Blockstate Format > Item Models?


DragonFerocity

Recommended Posts

Hello,

 

So, if I use the custom forge blockstate format, what do I do for the models? (Specifically for ItemBlocks).

 

If you don't use the forge blockstate format, you have to create JSON file under the blockstates folder, and a a JSON file under models/block, and then for an ItemBlock, you also have to create a JSON file under models/item that effectively points at the JSON under models/block. However, the custom forge blockstate format negates the need for a file under models/block, so how do I make the ItemBlock file point at the right thing?

 

Here's a sample of the JSON i'm using:

Spoiler

{
  "forge_marker": 1,
  "defaults": {
    "textures": {
      "bottom": "blocks/stone_diorite_smooth",
      "top": "blocks/stone_diorite_smooth",
      "side": "blocks/stone_diorite_smooth"
    },
    "model": "block/stairs",
    "uvlock": true
  },
  "variants": {
    "facing": {
      "north": {
        "y": 270
      },
      "east": {
        "y": 0
      },
      "south": {
        "y": 90
      },
      "west": {
        "y:": 180
      }
    },
    "half": {
      "bottom": {
        "x": 0
      },
      "top": {
        "x": 180
      }
    },
    "shape": {
      "straight": {

      },
      "outer_right": {

      },
      "outer_left": {

      }
    }
  }
}

 

 

Edited by DragonFerocity
Link to comment
Share on other sites

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

You can also specify the item model and texture/s in the blockstates file itself. Forge looks for a variant called "inventory" in the blockstates file and uses that for the ItemBlock model. Since your model and textures are already defined in your defaults section, you should just need to add an empty variant ("inventory": [{}]) and it will automatically use the same model as your block (assuming that's what you want it to do). If you want it to be different to the defaults, you can define a different model and textures inside the variant like you would with any other.

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.



×
×
  • Create New...

Important Information

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