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.

Eri_In_Wonderland

Members
  • Joined

  • Last visited

  1. Apparently the problem was that I stupidly didn't add the ".json" extenstion to the files... Now the block has its texture in the world, but the both block and item models in hand do not. The only error in the console is this, which I'm assuming is totally unrelated: According to that guide, it suggests a missing model. But it's not missing, or incorrectly named...is it?
  2. Isn't what's in that method required in 1.8? I don't see what my item/block classes have to do with anything, but here: ModItem public class ModItem extends Item { public static float weight; public ModItem(float weight) { this.weight = weight; this.setCreativeTab(Tabs.oItems); } } ModBlock public class ModBlock extends Block { public ModBlock() { super(Material.rock); this.setCreativeTab(Tabs.oBlocks); } } BlockOre public class BlockOre extends ModBlock { public static Item dropped; public static Block blockDropped; public static int amount, exp; public BlockOre(Item dropped, int exp) { this.dropped = dropped; this.amount = 1; this.exp = exp; } public BlockOre(Item dropped, int amount, int exp) { this.dropped = dropped; this.amount = amount; this.exp = exp; } public BlockOre(Block blockDropped) { this.blockDropped = blockDropped; this.amount = 1; this.exp = 0; } @Override public int getExpDrop(IBlockAccess world, BlockPos pos, int fortune) { return this.exp; } @Override public int quantityDropped(Random random) { return this.amount; } @Override public Item getItemDropped(IBlockState state, Random rand, int fortune) { if(dropped != null) { return dropped; } else if(blockDropped != null) { return Item.getItemFromBlock(blockDropped); } return Item.getItemFromBlock(this); } @Override public int quantityDroppedWithBonus(int fortune, Random random) { return this.amount + random.nextInt(fortune); } }
  3. I've followed every tutorial I could find, mainly the one by MrCrayfish, and everything still renders as a purple and black block. There are no "missing texture" errors like there was in 1.7.10 but I dunno if that was just removed in 1.8 or not for the new rendering system. I dunno where the problem is so I'll just post everything... Main class @Mod(modid = This.modid, version = This.version) public class This { public static final String modid = "oregenesis"; public static final String version = "1.0"; @SidedProxy(clientSide = "eiw.oregenesis.network.ClientProxy", serverSide = "eiw.oregenesis.network.ServerProxy") public static ServerProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { RegItems.register(); RegBlocks.register(); } @EventHandler public void init(FMLInitializationEvent event) { proxy.renderContent(); } @EventHandler public void postInit(FMLPostInitializationEvent event) { } } Item registry public class RegItems { public static Item ingot_copper; public static void register() { ingot_copper = new ModItem(1F).setUnlocalizedName("ingot_copper"); GameRegistry.registerItem(ingot_copper, ingot_copper.getUnlocalizedName().substring(5)); } public static void render() { rr(ingot_copper); } public static void rr(Item item) { Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(This.modid + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } Block Registry public class RegBlocks { public static Block ore_copper; public static void register() { ore_copper = new BlockOre(ore_copper).setUnlocalizedName("ore_copper"); GameRegistry.registerBlock(ore_copper, ore_copper.getUnlocalizedName().substring(5)); } public static void render() { rr(ore_copper); } public static void rr(Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(This.modid + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } ClientProxy public class ClientProxy extends ServerProxy { public static void renderContent() { RegItems.render(); RegBlocks.render(); } } ====================================================================== Item .json for the ingot { "parent": "builtin/generated", "textures": { "layer0": "oregenesis:items/ingot_copper" }, "display": { "thirdperson": { "rotation": [ -90, 0, 0 ], "translation": [ 0, 1, -3 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson": { "rotation": [ 0, -135, 25 ], "translation": [ 0, 4, 2 ], "scale": [ 1.7, 1.7, 1.7 ] } } } Item model .json for the ore block { "parent": "oregenesis:block/ore_copper", "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } Blockstate .json for the ore block { "variants": { "normal": { "model": "oregenesis:ore_copper" } } } Block model .json for the ore block { "parent": "block/cube_all", "textures": { "all": "oregenesis:blocks/ore_copper" } }

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.