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.

alex3526

Members
  • Joined

  • Last visited

Everything posted by alex3526

  1. so it crashed, but after adding "itemstack != null" in my if statement, the problem solved and it is working fine now. Thank you for pointing it out, I can't believe I missed that if(itemstack != null && itemstack.getItem() == Item.getItemFromBlock(Blocks.furnace)){ remover.remove(); }else if (itemstack != null && itemstack.getItem() == Items.bread){ remover.remove(); }
  2. you are right, I totally missed that. trying fixing it now.
  3. Over some time now, I have been learning java coding and been working on a mod for Minecraft 1.7.10. Every thing is working find and I understand most of it, but for some reason does my code, which should remove recipes from Minecraft, not work. Hope anyone can help me import java.util.Iterator; import java.util.List; import com.fantasymod.Item.ItemCreator; import com.fantasymod.blocks.BlockCreator; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRecipe; import cpw.mods.fml.common.registry.GameRegistry; public class craftingmanager { public static void mainRegistry(){ addCraftingRec(); addSmeltingRec(); } public static void addCraftingRec(){ //shaped GameRegistry.addRecipe(new ItemStack(BlockCreator.bronzeblock, 1), new Object[]{"XXX","XXX","XXX", 'X', ItemCreator.bronzeingot}); GameRegistry.addRecipe(new ItemStack(Blocks.wool, 1), new Object[]{"XX ","XX "," ", 'X', ItemCreator.cotton}); GameRegistry.addRecipe(new ItemStack(ItemCreator.bronzehelmet, 1), new Object[]{"XXX","X X"," ", 'X', ItemCreator.bronzeingot}); GameRegistry.addRecipe(new ItemStack(ItemCreator.bronzechest, 1), new Object[]{"X X","XXX","XXX", 'X', ItemCreator.bronzeingot}); GameRegistry.addRecipe(new ItemStack(ItemCreator.bronzepants, 1), new Object[]{"XXX","X X","X X", 'X', ItemCreator.bronzeingot}); GameRegistry.addRecipe(new ItemStack(ItemCreator.bronzeboots, 1), new Object[]{" ","X X","X X", 'X', ItemCreator.bronzeingot}); //shapeless } public static void addSmeltingRec(){ GameRegistry.addSmelting(BlockCreator.bronzeore, new ItemStack(ItemCreator.bronzeingot, 1), 0.0f); } public static void removeRecipe(){ Iterator<IRecipe> remover = CraftingManager.getInstance().getRecipeList().iterator(); while(remover.hasNext()){ ItemStack itemstack = remover.next().getRecipeOutput(); if(itemstack.getItem() == Item.getItemFromBlock(Blocks.furnace)){ remover.remove(); }else if (itemstack.getItem() == Items.bread){ remover.remove(); } } } } this package is being called from my main package with @EventHandler public static void Load(FMLInitializationEvent event){ craftingmanager.mainRegistry(); }

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.