Created
February 22, 2016 15:10
-
-
Save slenderPanda/fea38f7baf8616aa2e51 to your computer and use it in GitHub Desktop.
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 sl3nd3rpanda.mod; | |
import net.minecraft.client.Minecraft; | |
import net.minecraft.client.resources.model.ModelResourceLocation; | |
import net.minecraft.creativetab.CreativeTabs; | |
import net.minecraft.item.Item; | |
import net.minecraftforge.fml.common.registry.GameRegistry; | |
public class CustomItem extends Item | |
{ | |
public CustomItem(String name, CreativeTabs creativetab, int maxstacksize) | |
{ | |
this.setUnlocalizedName(name); | |
this.setCreativeTab(creativetab); | |
this.setMaxStackSize(maxstacksize); | |
GameRegistry.registerItem(this, name); | |
} | |
public void RegisterRenderer(String modelName) | |
{ | |
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(this, 0, new ModelResourceLocation(Main.MODID+":"+modelName, "inventory")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment