Adjusted Block Hardness.

Test Tools with getHarvestLevel
This commit is contained in:
AlgorithmX2 2014-06-07 20:20:23 -05:00
parent 50541cebe6
commit 009417ca4f
2 changed files with 13 additions and 3 deletions

View file

@ -187,8 +187,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
this( c, mat, null );
setLightOpacity( 15 );
setLightLevel( 0 );
setHardness( 1.2F );
setHardness( 2.2F );
setTileProvider( false );
setHarvestLevel( "pickaxe", 0 );
}
// update Block value.

View file

@ -46,8 +46,17 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
@SubscribeEvent
public void breakFaster(PlayerEvent.BreakSpeed Ev)
{
if ( Ev.block == this && (Ev.originalSpeed > 7 || Ev.metadata > 0) )
Ev.newSpeed /= 0.1;
if ( Ev.block == this && Ev.entityPlayer != null )
{
ItemStack is = Ev.entityPlayer.inventory.getCurrentItem();
int level = -1;
if ( is != null )
level = is.getItem().getHarvestLevel( is, "pickaxe" );
if ( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
Ev.newSpeed /= 0.1;
}
}
public BlockSkyStone() {