submitMatches(eq.getItemInHand(), ent, goals);
}
// these 3 should be obvious
if (ent instanceof FallingBlock)
submitMatches(new BlockData(((FallingBlock) ent).getMaterial(), ((FallingBlock) ent).getBlockData()), ent, goals);
if (ent instanceof Item)
submitMatches(((Item) ent).getItemStack(), ent, goals);
if (ent instanceof ItemFrame)
submitMatches(((ItemFrame) ent).getItem(), ent, goals);
// drops wood when destroyed
if (ent instanceof Boat)
submitMatches(new BlockData(Material.WOOD), ent, goals);
// endermen can carry blocks...possibly into other lane? interesting, investigate later
if (ent instanceof Enderman)
{
MaterialData carried = ((Enderman) ent).getCarriedMaterial();
submitMatches(new BlockData(carried.getItemType(), carried.getData()), ent, goals);
}
// break minecarts to get the blocks used to craft
if (ent instanceof Minecart)
{
if (ent instanceof ExplosiveMinecart)
submitMatches(new BlockData(Material.TNT), ent, goals);
else if (ent instanceof HopperMinecart)
submitMatches(new BlockData(Material.HOPPER), ent, goals);
else if (ent instanceof PoweredMinecart)
submitMatches(new BlockData(Material.FURNACE), ent, goals);
// spawners can spawn entities with EntityEquipment on
else if (ent instanceof SpawnerMinecart)
{
// XXX todo: spawners
}
else if (ent instanceof StorageMinecart)
submitMatches(new BlockData(Material.CHEST), ent, goals);
}
// sheep can be sheared or killed for wool blocks
if (ent instanceof Sheep)
submitMatches(new BlockData(Material.WOOL, ((Sheep) ent).getColor().getWoolData()), ent, goals);
// wither skele skulls
if (ent instanceof Skeleton)
{
if (((Skeleton) ent).getSkeletonType() == SkeletonType.WITHER)
submitMatches(new BlockData(Material.SKULL, (byte) SkullType.WITHER.ordinal()), ent, goals);
}
// trade for goal blocks
if (ent instanceof Villager)
{
// FIXME https://github.com/Bukkit/Bukkit/pull/921