Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Yaqoub213

Members
  • Joined

  • Last visited

Everything posted by Yaqoub213

  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!

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.