fix block hardness + sounds
This commit is contained in:
parent
9f9a2e9399
commit
2504f24b7b
20 changed files with 70 additions and 54 deletions
|
@ -939,7 +939,7 @@ public final class WorldServer extends AWorldServer {
|
|||
private boolean destroyBlock(LocalPos pos, float power, EntityLiving source) {
|
||||
State state = this.getState(pos);
|
||||
Block block = state.getBlock();
|
||||
if(block != Blocks.air && (block.getMaterial().isLiquid() || power - (block.getRawHardness() + 0.3F) * 0.3F > 0.0F)) {
|
||||
if(block != Blocks.air && (block.getMaterial().isLiquid() || power - ((float)block.getHardness() + 0.3F) * 0.3F > 0.0F)) {
|
||||
if(block.canExplosionDrop() && this.rand.floatv() <= 1.0F / (power * power))
|
||||
block.drop(this, pos, state, 0);
|
||||
this.setState(pos, Blocks.air.getState(), 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue