Adjusted Block Hardness.
Test Tools with getHarvestLevel
This commit is contained in:
parent
50541cebe6
commit
009417ca4f
2 changed files with 13 additions and 3 deletions
|
@ -187,8 +187,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||||
this( c, mat, null );
|
this( c, mat, null );
|
||||||
setLightOpacity( 15 );
|
setLightOpacity( 15 );
|
||||||
setLightLevel( 0 );
|
setLightLevel( 0 );
|
||||||
setHardness( 1.2F );
|
setHardness( 2.2F );
|
||||||
setTileProvider( false );
|
setTileProvider( false );
|
||||||
|
setHarvestLevel( "pickaxe", 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// update Block value.
|
// update Block value.
|
||||||
|
|
|
@ -46,8 +46,17 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void breakFaster(PlayerEvent.BreakSpeed Ev)
|
public void breakFaster(PlayerEvent.BreakSpeed Ev)
|
||||||
{
|
{
|
||||||
if ( Ev.block == this && (Ev.originalSpeed > 7 || Ev.metadata > 0) )
|
if ( Ev.block == this && Ev.entityPlayer != null )
|
||||||
Ev.newSpeed /= 0.1;
|
{
|
||||||
|
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() {
|
public BlockSkyStone() {
|
||||||
|
|
Loading…
Reference in a new issue