Jump to content

Recommended Posts

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.

Posted

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.

Posted

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.

 

Posted

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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.