Skip to content

Instantly share code, notes, and snippets.

Created July 25, 2016 02:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5a43e7966cede356b65fa266b666b016 to your computer and use it in GitHub Desktop.
Save anonymous/5a43e7966cede356b65fa266b666b016 to your computer and use it in GitHub Desktop.
package com.bigsis.spookjams.items; //My comments in this class are present in light-colored lines like this one that follow two forward-slashes ("//"). To remove these, go to "Edit > Find/Replace...", add "//.*" to the Find field, and press "Replace All".
import com.bigsis.spookjams.Reference; //Import this to recognize our custom Reference.java class.
import net.minecraft.creativetab.CreativeTabs; //Import this to recognize Minecraft Creative Tabs.
import net.minecraft.item.Item; //Need this to recognize Minecraft Item objects.
public class ItemCheese extends Item
{
public ItemCheese() //This is the constructor for your new Cheese Item.
{
setUnlocalizedName(Reference.SpookjamItems.CHEESE.getUnlocalizedName()); //Set the common name of this new item from the CHEESE enum we declared in Reference.java.
setRegistryName(Reference.SpookjamItems.CHEESE.getRegistryName()); //Set the system name of this new item from the CHEESE enum we declared in Reference.java.
this.setCreativeTab(CreativeTabs.FOOD); //Specify that this item appear in the Foodstuffs category of the standard Creative Menu.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment