@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.Mineable;
import org.spout.vanilla.material.item.tool.MiningTool;
@@ -56,7 +57,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.Mineable;
import org.spout.vanilla.material.item.tool.MiningTool;
@@ -56,7 +57,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.Mineable;
import org.spout.vanilla.material.item.tool.MiningTool;
@@ -50,7 +51,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.Mineable;
import org.spout.vanilla.material.VanillaMaterials;
@@ -63,7 +64,8 @@ public MoveReaction getMoveReaction(Block block) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial().equals(VanillaMaterials.DIAMOND_PICKAXE)) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial().equals(VanillaMaterials.DIAMOND_PICKAXE)) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;
import org.spout.api.material.source.DataSource;

import org.spout.vanilla.material.Mineable;
@@ -82,7 +83,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -57,7 +57,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Spade) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Spade) {
drops.add(new ItemStack(VanillaMaterials.SNOWBALL, 4));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.Mineable;
import org.spout.vanilla.material.VanillaMaterials;
@@ -57,7 +58,8 @@ public short getDurabilityPenalty(MiningTool tool) {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(VanillaMaterials.COBBLESTONE, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.item.tool.Pickaxe;

@@ -57,7 +58,8 @@ public void initialize() {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.block.Stairs;
import org.spout.vanilla.material.item.tool.Pickaxe;
@@ -50,7 +51,8 @@ public void initialize() {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.block.Stairs;
import org.spout.vanilla.material.item.tool.Pickaxe;
@@ -51,7 +52,8 @@ public void initialize() {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.block.Stairs;
import org.spout.vanilla.material.item.tool.Pickaxe;
@@ -51,7 +52,8 @@ public void initialize() {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}
@@ -31,6 +31,7 @@
import org.spout.api.entity.Entity;
import org.spout.api.geo.cuboid.Block;
import org.spout.api.inventory.ItemStack;
import org.spout.api.material.Material;

import org.spout.vanilla.material.block.Stairs;
import org.spout.vanilla.material.item.tool.Pickaxe;
@@ -51,7 +52,8 @@ public void initialize() {
public ArrayList<ItemStack> getDrops(Block block) {
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if (block.getSource() instanceof Entity) {
if (((Entity) block.getSource()).getInventory().getCurrentItem().getMaterial() instanceof Pickaxe) {
ItemStack held = ((Entity) block.getSource()).getInventory().getCurrentItem();
if (held != null && held.getMaterial() instanceof Pickaxe) {
drops.add(new ItemStack(this, 1));
}
}