-
-
Save colejagdtiger/f15c0fcd3cfb4c69c1c8e4f8201619cd to your computer and use it in GitHub Desktop.
ItemRenderingTroubles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.colejagdtiger.testing.item; | |
import net.minecraft.client.renderer.block.model.ModelResourceLocation; | |
import net.minecraft.item.Item; | |
import net.minecraftforge.client.model.ModelLoader; | |
import net.minecraftforge.fml.relauncher.Side; | |
import net.minecraftforge.fml.relauncher.SideOnly; | |
public class DarkIngot extends Item { | |
public DarkIngot() { | |
super(); | |
setRegistryName("darkIngot"); | |
setUnlocalizedName("darkIngot"); | |
} | |
@SideOnly(Side.CLIENT) | |
public void initModel() { | |
ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parent": "item/generated", | |
"textures": { | |
"layer0": "testing:items/dark_ingot" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.colejagdtiger.testing; | |
import com.colejagdtiger.testing.item.DarkIngot; | |
import net.minecraftforge.fml.common.registry.GameRegistry; | |
import net.minecraftforge.fml.relauncher.Side; | |
import net.minecraftforge.fml.relauncher.SideOnly; | |
public class ModItems { | |
public static DarkIngot darkIngot; | |
public static void init() { | |
GameRegistry.register(darkIngot = new DarkIngot()); | |
} | |
@SideOnly(Side.CLIENT) | |
public static void initModels() { | |
((DarkIngot) darkIngot).initModel(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment