Improved handling of air blocks when mining/harvesting
This commit is contained in:
parent
88b817ffef
commit
6b48063c9a
1 changed files with 2 additions and 2 deletions
|
@ -45,11 +45,11 @@ public abstract class TileEntityAbstractMiner extends TileEntityAbstractLaser {
|
|||
|
||||
protected void harvestBlock(VectorI valuable) {
|
||||
Block block = worldObj.getBlock(valuable.x, valuable.y, valuable.z);
|
||||
if (block == Blocks.air) {
|
||||
if (block == null || block.isAir(worldObj, valuable.x, valuable.y, valuable.z)) {
|
||||
return;
|
||||
}
|
||||
int blockMeta = worldObj.getBlockMetadata(valuable.x, valuable.y, valuable.z);
|
||||
if (block != null && (block instanceof BlockLiquid)) {
|
||||
if (block instanceof BlockLiquid) {
|
||||
// Evaporate fluid
|
||||
worldObj.playSoundEffect(valuable.x + 0.5D, valuable.y + 0.5D, valuable.z + 0.5D, "random.fizz", 0.5F,
|
||||
2.6F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.8F);
|
||||
|
|
Loading…
Add table
Reference in a new issue