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.

Featured Replies

Posted

I have a class RubyOre that is being called and initialized from a ModBlocks class. Inside the ruby class I have the setters as such.

 

this.setHarvestLevel("pickaxe", 3);

this.setResistance(10F);

this.setHardness(3F);

 

The resistance and hardness are working properly however the harvest level has no effect. I can still mine the ore with a shovel and using wooden and iron tools. I was also in search of a method to have that on the break of the block it yields a number or Rubies instead of ruby ore. Any help is appreciated.

Version?

 

Oh, and show us the whole method that has those lines, and the method that calls it (sometimes execution order is the catch, and it depends on context).

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

  • Author

Minecraft version 1.7.10

Forge Version 10.13.4

In RubOre Class

        public void RubOreRegistry(){

RubOreBasics();

}

        public void RubOreBasics(){

this.setHarvestLevel("pickaxe", 3);

this.setResistance(10F);

this.setHardness(3F);

this.setLightLevel(0.1F);

        }

In ModBlocks Class

 

        public static void initializeBlock(){

RubOre = new RubOre(Material.ground).setBlockName("RubOre").setCreativeTab(CreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ruby_ore");

((com.avram.blocks.RubOre) RubOre).RubOreRegistry();

}

Let Me know if any more information is needed.

 

Sadly, I must let you know that MC 1.7.10 is no longer supported on this forum (not my decision). If you can design your mod to 1.10.2 or 1.11, then you'll get much more help here (and probably won't even need help, because the shortcoming in harvest level was probably fixed two years ago).

 

PS: The search function inside the site sucks, but Google can find necrotic threads and ancient forum posts for almost any issue. Play with Google until you find a past discussion of your problem.

 

Sorry I couldn't be more encouraging  :(

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Guest
This topic is now closed to further replies.

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.