AkaliSucks Posted August 16, 2017 Posted August 16, 2017 (edited) { "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"} } } ] } Edited August 20, 2017 by AkaliSucks Quote
Draco18s Posted August 16, 2017 Posted August 16, 2017 There will be errors in the log. Post those. Also your mod ID needs to be all lower case. Quote 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.
AkaliSucks Posted August 16, 2017 Author Posted August 16, 2017 (edited) my modid in actually code is lowervase, I changed it when I copied over and from what I can tell im getting 0 errors in the console Edited August 16, 2017 by AkaliSucks Quote
Draco18s Posted August 16, 2017 Posted August 16, 2017 *cough* Quote 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.
AkaliSucks Posted August 16, 2017 Author Posted August 16, 2017 (edited) Its lowercase now and is not the issues as it still happens Edited August 16, 2017 by AkaliSucks Quote
Delupara Posted August 17, 2017 Posted August 17, 2017 (edited) 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 August 17, 2017 by Delupara Quote When they say your code doesn't follow convention but ur edgy so u dont care d-d-d-dab on them haterz
Jay Avery Posted August 17, 2017 Posted August 17, 2017 (edited) Where and how do you register your item model? Does the block display correctly in the world? Edited August 17, 2017 by Jay Avery Quote
AkaliSucks Posted August 17, 2017 Author Posted August 17, 2017 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); Quote
Jay Avery Posted August 17, 2017 Posted August 17, 2017 Don't use Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register. Instead use ModelLoader.setCustomModelResourceLocation (it takes the same arguments) in preInit or ModelRegistryEvent. Quote
AkaliSucks Posted August 17, 2017 Author Posted August 17, 2017 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 Quote
Draco18s Posted August 17, 2017 Posted August 17, 2017 1 hour ago, Jay Avery said: in preInit or ModelRegistryEvent. Did you do this? Quote 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.
AkaliSucks Posted August 17, 2017 Author Posted August 17, 2017 (edited) so now Im having it run in preInit right after it initializes my blocks , Im back to it being the right model but missing textures Edited August 17, 2017 by AkaliSucks Quote
AkaliSucks Posted August 17, 2017 Author Posted August 17, 2017 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] } } } Quote
Draco18s Posted August 17, 2017 Posted August 17, 2017 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. Quote 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.
AkaliSucks Posted August 17, 2017 Author Posted August 17, 2017 33 minutes ago, Draco18s said: 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. alright i removed them but i still have the same issue Quote
Insane96MCP Posted August 19, 2017 Posted August 19, 2017 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 Quote
AkaliSucks Posted August 19, 2017 Author Posted August 19, 2017 I just solved it by putting the "textures" : {} in my item json } Quote
Recommended Posts
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.