Jump to content

[SOLVED] item doesn't render properly in inventory


AkaliSucks

Recommended Posts


{
    "forge_marker": 1,
    "defaults": 
    {
        "textures": 
        {
            "stone": "blocks/stone", "ore" : "MyMod:blocks/ore"
        }
    },
    "variants": 
    {
        "normal": 
        { 
            "model": "myMod:ore" 
        }
        
        
    }

this is my blockstate for my ore

 

the issue is my attached file if shows the model for the block but gives missing texture

 

below is my inventory model

{
    "parent": "MyMod:block/ore",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375]
        }
       
    }
}

 

and my model json

{
  "parent": "block/block",
  "textures": {
    "particle": "#stone"
  },
  "elements": [
    {
      "from": [0, 0, 0],
      "to": [16, 16, 16],
      "faces": {
        "down": {"texture": "#stone", "cullface": "down", "tintindex": 0},
        "up": {"texture": "#stone", "cullface": "up", "tintindex": 0},
        "north": {"texture": "#stone", "cullface": "north", "tintindex": 0},
        "south": {"texture": "#stone", "cullface": "south", "tintindex": 0},
        "west": {"texture": "#stone", "cullface": "west", "tintindex": 0},
        "east": {"texture": "#stone", "cullface": "east", "tintindex": 0}
      }
    },
    {
      "from": [0, 0, 0],
      "to": [16, 16, 16],
      "faces": {
        "down": {"texture": "#ore", "cullface": "down"},
        "up": {"texture": "#ore", "cullface": "up"},
        "north": {"texture": "#ore", "cullface": "north"},
        "south": {"texture": "#ore", "cullface": "south"},
        "west": {"texture": "#ore", "cullface": "west"},
        "east": {"texture": "#ore", "cullface": "east"}
      }
    }
  ]
}

 

2017-08-16_16.09.04.png

Edited by AkaliSucks
Link to comment
Share on other sites

There will be errors in the log. Post those.

 

Also your mod ID needs to be all lower case.

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

*cough*

id.png

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

21 minutes ago, AkaliSucks said:

Its lowercase now and is not the issues as it still happens

<workspace>/run/logs/fml-client-latest.txt

 

Put the content of that file in Gist

Put the gist link here.

 

You can also use pastebin instead of gist

Edited by Delupara

When they say your code doesn't follow convention but ur edgy so u dont care

d-d-d-dab on them haterz

 

Link to comment
Share on other sites

public static void custommodel(BlockOre block) {
		 Item item = Item.getItemFromBlock(block);
	      //	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("gregtech:" + block.getUnlocalizedName().substring(5), "inventory") );
		 Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation("gregtech:" + block.getUnlocalizedName().substring(5), "inventory"));
	 }

This is my item model register

 

which also is in the same class as my block register down below

 

oreTin = register(new BlockOre(Material.ROCK, "oreTin",3F,3F).setCreativeTab(GregTechMod.gregtechT));  custommodel(oreTin);

Link to comment
Share on other sites

 public static void custommodel(BlockOre block) {
		 Item item = Item.getItemFromBlock(block);
	     	ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation("gregtech:" + block.getUnlocalizedName().substring(5), "inventory") );
		
	 
	 
	 } 

It actually seems to have gone backwards after doing this since the block got bigger

2017-08-17_13.46.20.png

Link to comment
Share on other sites

1 hour ago, Jay Avery said:

in preInit or ModelRegistryEvent.

Did you do this?

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

One thing to mention is if I replace the Item json's Parent with an existing block like dirt, it actually loads up a dirt block

{
    "parent": "block/dirt",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375]
        }
       
    }
}

 

Link to comment
Share on other sites

By the way, you don't need the display tag. Those are already specified in the item handheld model. You only need it if you want to override the values.

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

Did you try adding the "inventory" variant in the blockstate?

{
  "forge_marker": 1,
  "defaults": {
    "model": "cube_all",
    "transform": "forge:default-block"
  },
  "variants": {
    "inventory": [{
      "textures": {
        "all": "modid:block/xyz_ore"
      }
    }],
    "normal": { "model":"modid:xyz_ore" }
  }
}

 

I have my ore with this blockstate and works properly

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.