mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
Merge pull request #207 from SpoilersMC/1.7.10
Improve Perfection Checks on getDrops()
This commit is contained in:
6 files changed
+6
-6
No files matched your search
@@ -967,7 +967,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -189,7 +189,7 @@ public class BlockCardboardBox extends BlockContainer
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
public static class BlockData
|
||||
|
||||
@@ -111,7 +111,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -158,7 +158,7 @@ public class BlockGasTank extends BlockContainer
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -740,7 +740,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -586,7 +586,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IB
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
return world.isAirBlock(x, y, z) ? new ArrayList<ItemStack>() : new ArrayList<ItemStack>(Arrays.asList(getPickBlock(null, world, x, y, z, null)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user