Jump to content

Yaqoub213

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Yaqoub213's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Here's a console dump when I put "pipe/pipe01". In the preInit method of the item render register, I registered the variants like so: "[MODID]:pipe/pipe01" instead of "[MODID]:pipe01" This is the console dump when the variants are "[MODID]:pipe01" And this is the console dump when both the variant and registration functions get "[MODID]:pipe01" Note that when the locations are set to "[MODID]:pipe/pipe01" the console doesn't generate the "model location not found" issue. I would assume that this means that the file paths for the items are correct, yet when I run it minecraft doesn't render the model and textures. And if it helps, here is my ItemRenderRegister class package com.bedrockminer.tutorial.client.render.items; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelBakery; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import javax.swing.JOptionPane; import com.bedrockminer.tutorial.Main; import com.bedrockminer.tutorial.blocks.ModBlocks; import com.bedrockminer.tutorial.items.ModItems; public final class ItemRenderRegister { public static void preInit() { ModelBakery.addVariantName(ModItems.metaItem, "tutorial:meta_item_white", "tutorial:meta_item_black"); ModelBakery.addVariantName(ModItems.connectorItem, "tutorial:pipe01", "tutorial:pipe02"); } public static void registerItemRenderer() { reg(ModItems.tutorialItem); reg(ModItems.metaItem, 0, "meta_item_white"); reg(ModItems.metaItem, 1, "meta_item_black"); reg(ModItems.connectorItem, 0, "pipe/pipe01"); reg(ModItems.connectorItem, 1, "pipe/pipe02"); } //========================================================================== public static String modid = Main.MODID; public static void reg(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(modid + ":" + item.getUnlocalizedName().substring(5), "inventory")); } public static void reg(Item item, int meta, String file) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, new ModelResourceLocation(modid + ":" + file, "inventory")); //JOptionPane.showMessageDialog(null, modid + ":" + file); } }
  2. Thanks for the suggestion, but it didn't work. Still getting that pink and black cube I hate so much. I just don't understand why the path isn't getting appended to the item folder location, it seemed to do that with the other files. I would prefer being able to store the JSON files of each individual block/item in folders because I don't want my models/item folder to become hard to search through.
  3. Ok, I made an item for the block, and it worked if I put the item JSON file in the models/item folder. However, I want to store the JSON files in their own folder (named "Pipe"), to be organized. When i register the item in the item render register, I put "[modID]:Pipe/pipe01" (Pipe is the subfolder, pipe01 is the JSON file). Without the folder I just do "[modID]:[file name] and it works fine. Logically I assumed putting the folder name and a "/" would point to the right folder, but the item render register keeps saying it can't find the file. Does the item render register have a problem when item models are stored in custom folder locations?
  4. Hello all, I got into forge yesterday, making steady progress with some blocks. I made a custom model for a block, and when I place it down it looks fine. However, as an item the block remains as the missing texture cube, and when I break the block the pieces are composed of the missing texture. The block placed down is fine, no missing textures or anything. The item is missing textures and is just a generic block model. This is the item JSON file: http://pastebin.com/NGF7HuN6 This is the block model JSON file: http://pastebin.com/2AXN4dYY The only thing I can think of is my block inherits from minecraft's Block class, and maybe I needed to inherit from the ItemBlock class? Thanks for reading, I appreciate any and all suggestions and advice!
×
×
  • Create New...

Important Information

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