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.

minecraftbigfoot

Members
  • Joined

  • Last visited

  1. Thanks for all the help guys! Final method: public static void removeRecipes() { ItemStack result = null; Map<ItemStack, ItemStack> recipes = FurnaceRecipes.instance().getSmeltingList(); Iterator<ItemStack> interator = recipes.keySet().iterator(); while (interator.hasNext()) { ItemStack recipe = interator.next(); result = recipes.get(recipe); ItemStack stone = new ItemStack(Blocks.STONE, 1, 0); if (ItemStack.areItemStacksEqual(stone, result)) { interator.remove(); } } } Thanks all <3
  2. Hence why I can't make it work this way. public static void removeRecipes() { Iterator interator = FurnaceRecipes.instance().getSmeltingList().entrySet().iterator(); while (interator.hasNext()) { ItemStack cobble = new ItemStack(Blocks.COBBLESTONE); if (interator.next().equals(cobble)) interator.remove(); } } Done this with normal stone and cobble as Jay suggested neither even changes a thing. Nothing is changed because it wants an object and I'm giving it an ItemStack.
  3. ItemStack cobble = new ItemStack(Blocks.COBBLESTONE); FurnaceRecipes.instance().getSmeltingList().remove(cobble); Doesn't work, guess I will have to continue brainstorming. Thank you anyway Jay
  4. Iterating over it isn't working well.. because theres not an Interface for smelting to get the current recipe of the interator. How would you go about calling this? I take it: FurnaceRecipes.instance().getSmeltingList().remove(stone) wouldn't work.
  5. Thank youu this is what I have so far :3 public static void removeRecipes() { Iterator<IRecipe> furnace = FurnaceRecipes.instance().getSmeltingList().iterator(); Iterator<IRecipe> iterator = CraftingManager.getInstance().getRecipeList().iterator(); while (iterator.hasNext()) { IRecipe recipe = iterator.next(); ItemStack stone = new ItemStack(Blocks.STONE, 1, 0); if (recipe == null) continue; ItemStack output = recipe.getRecipeOutput(); if (output != null && output.equals(stone)) iterator.remove(); } }
  6. The issue I seem to be having is: Iterator<IRecipe> furance = FurnaceRecipes.instance().getSmeltingList().iterator(); as there is no iterator for FurnaceRecipes, whereas normal crafting will return me one.
  7. package mod.brandy; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; public class BrandyAntiRecipes { public static void removeRecipes() { ItemStack stone = new ItemStack(Blocks.STONE, 1, 0); FurnaceRecipes.instance().getSmeltingList().remove(stone); } } This is called in my init() in my main class, however it does nothing. Clearly I've made a bit of a mistake thank you~ version: 1.10
  8. Thank you Sir! if(plr.getHeldItemMainhand() != null && plr.getHeldItemMainhand().getItem().equals(BrandyWeapons.vorpalBlade)) works perfect!
  9. Need a little help Null checking, thought that a valid null check was if(plr.inventory.getCurrentItem().getItem() != null && plr.inventory.getCurrentItem().getItem().equals(BrandyWeapons.vorpalBlade)) But I find this gives me a null pointer exception and errors, I'm being dumb right?
  10. Yesterday was not my finest day
  11. Boom! if(event.getEntity() instanceof EntitySkeleton) { ItemStack stack = new ItemStack(Items.SKULL, 1, 0); if(stack.stackSize > 1){stack.stackSize = 1;} EntityItem drop = new EntityItem(attacked.worldObj, attacked.posX, attacked.posY, attacked.posZ, stack); event.getDrops().add(drop); } Thanks all, think I was just having a mental block, how things have changed over just a couple of years :')
  12. Probably should hehe, thank you. Whilst you're here.. event.getDrops().add(new ItemStack(Items.SKULL, 1, 0)) wants me to make the ItemStack a EntityItem, not being funny but what does this mean?
  13. I am working on MC 1.10, however I was using CurrentItem because from what I remember from a couple of years ago that was the right call (stopped playing for 2 or so years). However I will change it to get main hand
  14. This doesn't drop a skull, though from what I can see it should. //"skeleton", "wither", "zombie", "char", "creeper", "dragon" @SubscribeEvent public void entityDrops(LivingDropsEvent event) { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer plr = mc.thePlayer; if(plr.inventory.getCurrentItem().getItem().equals(BrandyWeapons.vorpalBlade)) { if(event.getEntity().getEntityId() == 51){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 0), 0);} if(event.getEntity().getEntityId() == 5){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 1), 0);} if(event.getEntity().getEntityId() == 54){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 2), 0);} if(event.getEntity() == plr){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 3), 0);} if(event.getEntity().getEntityId() == 50){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 4), 0);} if(event.getEntity().getEntityId() == 63){ event.getEntity().entityDropItem(new ItemStack(Items.SKULL, 1, 5), 0);} } } Wondering if it is because I am using EntityIDs?

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.