Fixed the drops for various blocks
This commit is contained in:
parent
630d34019b
commit
09dc9c27da
3 changed files with 11 additions and 36 deletions
|
@ -63,4 +63,10 @@ public abstract class BOPBlock extends Block
|
||||||
{
|
{
|
||||||
return this.isOpaqueCube();
|
return this.isOpaqueCube();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta)
|
||||||
|
{
|
||||||
|
return meta;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,81 +31,59 @@ public class BlockBOPGeneric extends Block
|
||||||
this.setHarvestLevel("pickaxe", 3, 7);
|
this.setHarvestLevel("pickaxe", 3, 7);
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
|
||||||
//TODO: this.setCreativeTab()
|
|
||||||
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case ASH_STONE:
|
case ASH_STONE:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(1.0F);
|
this.setHardness(1.0F);
|
||||||
//TODO setStepSound(Block.soundStoneFootstep)
|
|
||||||
this.setStepSound(Block.soundTypePiston);
|
this.setStepSound(Block.soundTypePiston);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRAG_ROCK:
|
case CRAG_ROCK:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(1.0F);
|
this.setHardness(1.0F);
|
||||||
//TODO setStepSound(Block.soundGravelFootstep)
|
|
||||||
this.setStepSound(soundTypeGravel);
|
this.setStepSound(soundTypeGravel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DRIED_DIRT:
|
case DRIED_DIRT:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.1F);
|
this.setHardness(0.1F);
|
||||||
this.setHarvestLevel("pickaxe", 0);
|
this.setHarvestLevel("pickaxe", 0);
|
||||||
|
|
||||||
//TODO setStepSound(Block.soundStoneFootstep)
|
|
||||||
this.setStepSound(Block.soundTypePiston);
|
this.setStepSound(Block.soundTypePiston);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HARD_DIRT:
|
case HARD_DIRT:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.9F);
|
this.setHardness(0.9F);
|
||||||
//TODO setStepSound(Block.soundStoneFootstep)
|
|
||||||
this.setStepSound(Block.soundTypePiston);
|
this.setStepSound(Block.soundTypePiston);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HARD_ICE:
|
case HARD_ICE:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.75F);
|
this.setHardness(0.75F);
|
||||||
//TODO setStepSound(Block.soundStoneFootstep)
|
|
||||||
this.setStepSound(Block.soundTypePiston);
|
this.setStepSound(Block.soundTypePiston);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HARD_SAND:
|
case HARD_SAND:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.7F);
|
this.setHardness(0.7F);
|
||||||
this.setHarvestLevel("shovel", 0);
|
this.setHarvestLevel("shovel", 0);
|
||||||
|
|
||||||
//TODO setStepSound(Block.soundSandFootstep)
|
|
||||||
this.setStepSound(Block.soundTypeSand);
|
this.setStepSound(Block.soundTypeSand);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUD_BRICK:
|
case MUD_BRICK:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(1.0F);
|
this.setHardness(1.0F);
|
||||||
//TODO: this.setResistance
|
|
||||||
this.setResistance(2.0F);
|
this.setResistance(2.0F);
|
||||||
//TODO setStepSound(Block.soundStoneFootstep)
|
|
||||||
this.setStepSound(Block.soundTypePiston);
|
this.setStepSound(Block.soundTypePiston);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BIOME_BLOCK:
|
case BIOME_BLOCK:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.6F);
|
this.setHardness(0.6F);
|
||||||
//TODO setStepSound(Block.soundGravelFootstep)
|
|
||||||
this.setStepSound(soundTypeGlass);
|
this.setStepSound(soundTypeGlass);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CRYSTAL:
|
case CRYSTAL:
|
||||||
//TODO: this.setHardness
|
|
||||||
this.setHardness(0.15F);
|
this.setHardness(0.15F);
|
||||||
//TODO: this.setResistance
|
|
||||||
this.setResistance(5.0F);
|
this.setResistance(5.0F);
|
||||||
//TODO: this.setLightValue
|
|
||||||
this.setLightLevel(1.0F);
|
this.setLightLevel(1.0F);
|
||||||
//TODO setStepSound(Block.soundGravelFootstep)
|
|
||||||
this.setStepSound(Block.soundTypeGlass);
|
this.setStepSound(Block.soundTypeGlass);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -115,7 +93,6 @@ public class BlockBOPGeneric extends Block
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: registerIcons()
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister)
|
public void registerBlockIcons(IIconRegister iconRegister)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -162,7 +139,6 @@ public class BlockBOPGeneric extends Block
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getItemDropped()
|
|
||||||
public Item getItemDropped(int metadata, Random random, int fortune)
|
public Item getItemDropped(int metadata, Random random, int fortune)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -171,18 +147,13 @@ public class BlockBOPGeneric extends Block
|
||||||
return BOPItemHelper.get("misc");
|
return BOPItemHelper.get("misc");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
//TODO: getItemForBlock()
|
return super.getItemDropped(metadata, random, fortune);
|
||||||
return Item.getItemFromBlock(this);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: dropBlockAsItemWithChance()
|
|
||||||
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int metadata, float chance, int fortune)
|
||||||
{
|
{
|
||||||
if (world.isRemote)
|
|
||||||
return;
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case BIOME_BLOCK:
|
case BIOME_BLOCK:
|
||||||
|
@ -205,14 +176,15 @@ public class BlockBOPGeneric extends Block
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
super.dropBlockAsItemWithChance(world, x, y, z, metadata, chance, fortune);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO damageDropped()
|
|
||||||
public int damageDropped(int meta)
|
public int damageDropped(int meta)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@ -239,7 +211,6 @@ public class BlockBOPGeneric extends Block
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//TODO: getIcon()
|
|
||||||
public IIcon getIcon(int side, int meta)
|
public IIcon getIcon(int side, int meta)
|
||||||
{
|
{
|
||||||
return texture;
|
return texture;
|
||||||
|
|
|
@ -105,10 +105,8 @@ public class BlockMud extends BOPBlock
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int metadata, Random random, int fortune)
|
public Item getItemDropped(int metadata, Random random, int fortune)
|
||||||
{
|
{
|
||||||
if (metadata == 0)
|
if (metadata == 0) return BOPItemHelper.get("mudball");
|
||||||
return BOPItemHelper.get("mudball");
|
else return super.getItemDropped(metadata, random, fortune);
|
||||||
else
|
|
||||||
return Item.getItemFromBlock(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue