1

Mod Help!

DingoDino19 1/25/13 11:38 pm
132
1/26/2013 4:51 pm
Please help!

So I have been trying to get my mod to drop a piece of cake when you break it, but it just drops the block, not the cake


Here is my mod_Sapphire.java:
package net.minecraft.src;

public class mod_Sapphire extends BaseMod
{
public mod_Sapphire()
{
ModLoader.registerBlock( SapphireOre );
ModLoader.addName(SapphireOre, "Sapphire Ore");
}




public String getVersion()
{
return ("1.4.7");
}
public void load()
{

}
public static final Block SapphireOre;

static
{
SapphireOre = new BlockSapphire(221, 0).setHardness(1.3F).setResistance(5.0F).setLightValue(0F).setBlockName("SapphireOre").setCreativeTab(CreativeTabs.tabBlock);


and here is my BlockSapphire.java:


package net.minecraft.src;

import java.util.Random;

public class BlockSapphire extends Block
{
protected BlockSapphire(int i,int j)
{
super(i,j,Material.ground);
}
public int idDropped(int i,Random random)
{
return Item.cake.itemID;
}
public int quantityDropped(Random random)
{
return 1;
}
}




PLEASE HELP I NEED THIS FIXED ASAP!

Anything will help, if you fix it i will love you forever and subscribe!

Dingo
Posted by
DingoDino19
Level 21 : Expert Dragonborn
7

  Have something to say?

JoinSign in

4

DingoDino19
01/26/2013 4:51 pm
Level 21 : Expert Dragonborn
it says that SapphireBlock (int,int) is undefined
1
DingoDino19
01/26/2013 4:43 pm
Level 21 : Expert Dragonborn
ok ill try
1
99razvan99
01/26/2013 3:25 pm
Level 21 : Expert Mountaineer
if i remeber good but i didn't code for some time here is you wrong change the:
protected BlockSapphire(int i,int j)
{
super(i,j,Material.ground);
}

To:
protected BlockSapphire(int i,int j, int x)
{
super(i,j,x,Material.ground);
}

Because it need 3 variables.
1
DingoDino19
01/26/2013 4:50 pm
Level 21 : Expert Dragonborn
no it doesnt work
1

Welcome