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.

holypinkhobo

Members
  • Joined

  • Last visited

  1. No you were right, rookie mistake on my side. Thank you
  2. I'm new to 1.7 coding. I added a block with the local name as copperore and added all the vairable such ass setCreativeTab and setBlockName. Registering the block works fine its just when i use .setBlockHarvestLevel eclipse gives me the error "This Method setBlockHarvestLevel (Block,String,int) is undefined for the type MinecraftForge. I'm sure i just made a small mistake in the coding and can't catch it myself, so any help please? package morefoodandtools; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = BaseClassMFT.MODID, version = BaseClassMFT.VERSION) public class BaseClassMFT { public static final String MODID = "mft"; public static final String VERSION = "Alpha 1.0 Prerelease 1: Chicken Extension!"; //Initializatiion //Blocks public static final Block copperore = new CopperOre(Material.rock); //Tools //Food //Chicken Salad public static Item chickensalad = new ChickenSalad(2, 2, 0.5f, false). setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("chickensalad") .setMaxStackSize(.setTextureName(MODID + ":" + "chickensalad"); //Chicken Soup public static Item chickensoup = new ChickenSoup(3, 4, false) .setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("chickensoup") .setMaxStackSize(.setTextureName(MODID + ":" + "chickensoup"); //Chicken Pot Pie public static Item chickenpotpie = new ChickenPotPie(4, 4, false) .setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("chickenpotpie") .setMaxStackSize(16).setTextureName(MODID + ":" + "chickenpotpie"); //Pink Slime public static Item pinkslime = new PinkSlime(1, 1, false) .setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("pinkslime") .setMaxStackSize(64).setTextureName(MODID + ":" + "pinkslime"); //Chicken Nugget public static Item chickennugget = new ChickenNugget(10, 6, true) .setCreativeTab(CreativeTabs.tabFood).setUnlocalizedName("chickennugget") .setMaxStackSize(.setTextureName(MODID + ":" + "chickennugget"); @EventHandler //Crafting and Registering public void preInit(FMLPreInitializationEvent event) { //Food //Chicken Salad GameRegistry.addRecipe(new ItemStack(chickensalad, 3), new Object[]{ " A ", " B ", " C ", ('A'), Items.wheat, ('B'), Items.cooked_chicken, ('C'), Items.bowl, }); GameRegistry.registerItem(chickensalad, "chickensalad"); //Chicken soup GameRegistry.addRecipe(new ItemStack(chickensoup, 3), new Object[]{ " D ", " E ", " F ", ('D'), Items.carrot, ('E'), Items.cooked_chicken, ('F'), Items.bowl, }); GameRegistry.registerItem(chickensoup, "chickensoup"); //Chicken Pot Pie GameRegistry.addRecipe(new ItemStack(chickenpotpie, 3), new Object[]{ "BBB", "BCB", "B#B", ('B'), Items.bread, ('C'), Items.carrot, ('#'), Items.cooked_chicken, }); GameRegistry.registerItem(chickenpotpie, "chickenpotpie"); //Pink Slime GameRegistry.addRecipe(new ItemStack(pinkslime, 3), new Object[]{ " D ", " E ", " F ", ('D'), Items.rotten_flesh, ('E'), Items.cooked_chicken, ('F'), Items.bone, }); GameRegistry.registerItem(pinkslime, "pinkslime"); //Chicken Nugget GameRegistry.addRecipe(new ItemStack(chickennugget, 1), new Object[]{ "BBB", "BCB", "BBB", ('B'), Items.bread, ('C'), pinkslime, }); GameRegistry.registerItem(chickennugget, "chickennugget"); //Blocks GameRegistry.registerBlock(copperore, "copperore"); MinecraftForge.setBlockHarvestLevel(copperore, "pickaxe", 2); }} and for my CopperOre class... package morefoodandtools; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; public class CopperOre extends Block { public CopperOre(Material p_i45394_1_) { super(p_i45394_1_); setHardness(0.2f); setStepSound(Block.soundTypeStone); setCreativeTab(CreativeTabs.tabBlock); setBlockName("copperore");

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.