Jump to content

Thlurb

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Thlurb

  1. Hi, I'm a newbie modder trying to follow MrCrayfish's 1.8 modding tutorial

     

     

    in 1.10.2. While trying to import ModelResourceLocation, I got an error saying that the import net.minecraft.client.resources.model cannot be resolved. I'm guessing this was caused by the new dual wielding in 1.9. Can someone ELI5 how this kind of thing is done now? Preferably by converting this code to 1.10.2 since I probably won't understand what you're talking about otherwise:

     

     

    package com.thlurb.tutorial.init;
    
    import net.minecraft.client.Minecraft;
    import net.minecraft.client.resources.model.ModelResourceLocation;
    import net.minecraft.item.Item;
    import net.minecraftforge.fml.common.registry.GameRegistry;
    
    public class TutorialItems {
    
    public static Item test_item;
    
    public static void  init() {
    
    	test_item = new Item().setUnlocalizedName("test_item");
    }
    
    public static void register() {
    
    	GameRegistry.registerItem(test_item, test_item.getUnlocalizedName().substring(5));
    
    }
    
    public static void registerRenders() {
    
    }
    
    public static void registerRenders(Item item) {
    
    	Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Reference.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory"));
    }
    }
    

     

     

    Thanks!

×
×
  • Create New...

Important Information

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