Jump to content

Recommended Posts

Posted

Hi I was wondering how would I set the harvest level of my ore if I have all the in one class before I would use

 

  Reveal hidden contents

but that makes it so all the ore harvest level is 3 but now I have my ore like normal Minecraft. where they are all handled in the same class

 

  Reveal hidden contents

 

 

how would I now make it so cryoniumOre  needs a iron pick to harvest and lets say tourmalineOre  needs diamond pick

 

thanks

Posted

The harvest levels are defined in the item's ToolMaterial. I think they are the first number. The ToolMaterials can be found in Item. Note that the diamond material is called emerald.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

So how would I got about making it work with my custom ore blocks since I don't see anywhere it links the ToolMaterial to the normal minecraft ores

Posted

If you have an ore that should only be broken by diamond, set the harvest level to 3 since that is diamond's harvest level. If it should only be broken by iron or above, set the harvest level to 2 since that is iron's harvest level.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

yeah but I have done all my of ore in one class so I don't have 100s of classes my ore code is like

 

Ore Code

 

  Reveal hidden contents
Posted

In the block class there is a function getHarvestLevel(metadata)

Just return the harvestlevel according to the metadata you get and don't set it in the constructor.

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.