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.

Blu_Nighttime

Members
  • Joined

  • Last visited

Everything posted by Blu_Nighttime

  1. Hey thanks! I've managed to copy the item, although it's now indestructible, I now have something to work with. Now...how do I change the title to solve?
  2. A pic of the class for the tool (no methods are deprecated). A couple variables: public static ToolMaterial MATERIAL = EnumHelper.addToolMaterial("MATERIAL", 0, 2048, 1.5F, 1.0F, 0); private static final Set EFFECTIVE_ON = Sets.newHashSet(new Block[] {Blocks.AIR}); Calling and registering: pulverizertool = new ItemPulverizerTool(0.5F,MATERIAL,EFFECTIVE_ON); GameRegistry.register(pulverizertool); Crafting: GameRegistry.addShapedRecipe(new ItemStack(ModItems.stonedust,9), "PS ", " ", " ",'P', new ItemStack(ModItems.pulverizertool,1,OreDictionary.WILDCARD_VALUE),'S',Blocks.STONE); When the tool is used in crafting and product is made, the tool has a red zero next to it and disappears on click. I'm struggling to solve this one issue.
  3. Right I've changed my code. Do I need to override hasContainerItem() and getContainerItem()?
  4. package mstrTiggyI.MoreBlocks.items; import mstrTiggyI.MoreBlocks.MoreBlocks; import mstrTiggyI.MoreBlocks.Reference; import mstrTiggyI.MoreBlocks.init.ModItems; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; public class ItemPulverizerTool extends Item { private ItemStack emptyItem = null; private static int maxDamage = 2048; public ItemPulverizerTool(){ setUnlocalizedName(Reference.MoreBlocksItems.PULVERIZERTOOL.getUnlocalizedName()); setRegistryName(Reference.MoreBlocksItems.PULVERIZERTOOL.getRegistryName()); setCreativeTab(MoreBlocks.CREATIVE_TAB); setMaxDamage(maxDamage); setMaxStackSize(1); setNoRepair(); } @Override public boolean hasContainerItem() { return true; } public void setEmptyItem(ItemStack ei) { this.emptyItem = ei; } public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) { return false; } public ItemStack getContainerItemStack(ItemStack stack) { int dmg = stack.getItemDamage(); if (dmg == maxDamage) { return new ItemStack(stack.getItem(), 0, maxDamage); } ItemStack tr = copyStack(stack, 1); tr.setItemDamage(dmg + 1); return tr; } public static ItemStack copyStack(ItemStack stack, int n) { return new ItemStack(stack.itemID, n, stack.getItemDamage()); } } This is the code. The problem is that (where underlined) is saying that field cannot be Resolved. It recommends using .getItem() but that crashes the game. I'm not sure what to use nor do?!
  5. Does anyone know where I can find a link or know how to make an item which, when crafted with, isn't destroyed but it uses durability. I've looked everywhere! Either they are out of date (older versions of mc) or they make no sense. Thanks.

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.