final Point point = new Point(collideBlockEvent.getContactInfo().getNormal(), getOwner().getWorld());
final int x = point.getBlockX();
final int y = point.getBlockX();
final int z = point.getBlockX();
final Block translated = getOwner().getWorld().getBlock(x, y, z).translate(BlockFace.TOP);
final BlockMaterial material = translated.getMaterial();
if (material.isPlacementObstacle()) {
Item.dropNaturally(point, new ItemStack(getMaterial(), 1));
} else {
translated.setMaterial(getMaterial(), getMaterial().toCause(point));
}
getOwner().remove();