Jump to content

PXLForce

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by PXLForce

  1. I can't believe I didn't think of this! Thank you very much! I originally set the material to glass as I didn't want it to drop itself when harvested. Since I have now set what the block will drop, I didn't need it there, but didn't realise! I've now changed it back to the rock material and all seems fine. Thanks!
  2. I'm going to be annoying and bump. If anybody has even the slightest information on how I can get this to function correctly, I would really appreciate it! If it is of any use to anybody further, I have started to use GitHub to upload my project to when I am done for the evening. If anybody wants to take a look at it, feel free. https://github.com/PXLForce/AdvancedOres!
  3. Hello! I have recently begun to learn Java and am working on a little mod to test my skills. Whilst I probably won't release this mod to anybody within the community, I wish to polish it off completely and see what I can do with it. Unfortunately, I have encountered a slight hiccup, as my block Mollionite Ore can be mined with any pickaxe. Here is the class file for you coding experts to take a look at, if you please: package com.pxlhub.advancedores.blocks; import java.util.Random; import com.pxlhub.advancedores.items.ModItems; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class MollioniteOre extends Block { public MollioniteOre() { super(Material.glass); setBlockName("mollioniteOre"); setCreativeTab(CreativeTabs.tabBlock); setStepSound(soundTypePiston); setHardness(3.0F); setResistance(7.5F); setHarvestLevel("pickaxe", 2); } @Override public Item getItemDropped(int metadata, Random random, int fortune) { return ModItems.mollioniteCrystal; } } I'm not sure how that will look on the forum, so if you like PasteBin, click here! As you can see, I have included the setHarvestLevel (Function is it?), but it can still be mined with any pickaxe and the Mollionite Crystal is still dropped! Is there something key I am missing? Thanks for the help, PXLForce
×
×
  • Create New...

Important Information

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