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.

silenthunder2

Members
  • Joined

  • Last visited

Everything posted by silenthunder2

  1. Wouldn't that only work if I was trying to repair the repair catalyst? Like I would have to be trying to repair a silver ingot. This.itemID returns the ID of the tool I'm putting into the anvil, right?
  2. So I'm learning to mod, and I've made a couple new materials, Silver and Electrum. Everything works but repair; i.e the pickaxes function as a normal pickaxe except they can't be repaired at an anvil. I want to make them repairable as well as enchantable and I want to do this so that I only need to make one pickaxe class. I need to keep each tool an extension of the vanilla tool class so it can be enchanted. The only way I can get the tools repairable with these requirements is by changing this: public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return this.toolMaterial.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } To this: public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) { return SunMod.silverIngot.itemID == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack); } But of course when I make an Electrum tool, this makes it repairable only by silver ingots, which is obviously not correct. If that's the only way to do it that means I have to make a new class for every tool from every material, which I'd like to avoid. Another way is editing the base classes, but I'd really like to avoid that if possible. Can anyone help? Here's my pickaxe class: And my main mod class: Thanks!
  3. So I've been following tutorials and learning how to work with forge, and I've got a new material that can be made into tools. For some reason, I can't enchant any of them. Here's some example code for the pickaxe: And my main class: Is there something that I'm missing to make them enchantable?

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.