Jump to content

Noxon

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Noxon

  1. Here it drops always one or more items even if the pickaxe isn't enchanted.

    I just want to make my ore influenced by the Fortune enchantment of a pickaxe, like diamond or coal :

     

    If you break a coal ore with a simple pickaxe, it'll drop only one coal.

    If you break a coal ore with a pickaxe which is enchanted with Fortune (I, II, III), you have a chance to drop more that one coal (the quantity depends

    on the fortune level).

     

    I simply want to do the same effect for my ore. :)

  2. Hi, I'm a begginer and I tried to create a new Ore for my mod.

    So it's a Cobalt Ore which drop cobalt when you break it with a diamond pickaxe, till then it works.

    But I've a searched a method to make the enchantment fortune (enchanted pickaxe) make it drop more than one cobalt.

     

    I found a example but, I think I did something wrong, or my method is outdated.

    Here's my block class :

     

    package wwrp.Blocks;
    
    import java.util.Random;
    import cpw.mods.fml.common.registry.GameRegistry;
    import wwrp.Common.Modwwrp;
    import net.minecraft.block.material.Material;
    import net.minecraft.block.Block;
    import net.minecraft.item.Item;
    
    public class BlockwwrpcobaltOre extends Block
    {
            public BlockwwrpcobaltOre()
            {
            	super(Material.rock);
            	setHarvestLevel("pickaxe",3); // 3= DIAMOND PICKAXE
            	this.setHardness(4.5F);
            	this.setStepSound(Block.soundTypeStone);	
            }
    
            public int quantityDropped(int meta, int fortune, Random random)
            {
                return quantityDroppedWithBonus(fortune, random);
            }
    
            @Override
            public Item getItemDropped(int metadata, Random random, int fortune) 
            {
                return wwrp.Common.Modwwrp.cobalt;
            }
    
    }

     

    In my principal class :

    cobaltOre = new BlockwwrpcobaltOre().setBlockName("cobaltOre").setCreativeTab(wwrpTab).setBlockTextureName(modid + ":" + "oreCobalt");
    GameRegistry.registerBlock(cobaltOre, "cobaltOre");

     

    Can you help me again ? :(

    Thank you in advance !

     

  3. Alright, I though the material.sand enable the block to have the same function as sand.

    So, how can I make the bloc have the same proprieties ?

    I mean, the falling, the shovel which is more effective on it than other tools, the stepsound, ... ?

    I have to encode all the proprieties one by one on the class of my block ?

  4. Hello,

    I'm a new modder, I don't have real knowledge on mod, and I have real problem with a function of Forge.

    When I ty to create a new block and define a Material, this last one is totally ignored by the game.

    I explain : If I create a block which as for Material "sand", it reacts like a basic block (sound of the stone, no falling, and all is effective on it, not only the shovel). It is the same for all material in Minecraft.

    I showed and read a lot of tutorials but everybody do the same error, and they don't seem to take care about this problem... whereas it's very important, I think.

    Here is an example :

     

    In my principal mod file I declared the bloc : "sandofpath" and initialized it like this :

    sandofpath = new BlockwwrpSand(Material.sand).setBlockName("sandofpath").setCreativeTab(wwrpTab).setBlockTextureName(modid + ":" + "sandofpath");
    GameRegistry.registerBlock(sandofpath, "sandofpath");

     

    Here's the class of the block (BlockwwrpSand) :

    package wwrp.Blocks;
    
    import java.util.Random;
    
    import wwrp.Common.Modwwrp;
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockFalling;
    import net.minecraft.block.material.Material;
    
    public class BlockwwrpSand extends BlockFalling 
    {
    
    public BlockwwrpSand(Material material)
    {
    super(material);
    }
    }
    
    

     

    I tried a lot of solution but they don't work at all.

    Material seems to be realy ignored by Forge 1.7.

    Do you have a solution to fix it ?

     

    Thank you in advance.  :(

×
×
  • Create New...

Important Information

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