Adjusted Block Hardness.
Test Tools with getHarvestLevel
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user