}
public static boolean emptyBucket(World world, int x, int y, int z, ItemStack bucket) {
boolean r = false;
if (!buckets.inverse().containsKey(new ItemWrapper(bucket))) {
if (bucket.getItem() instanceof ItemBucket) {
r = ((ItemBucket) bucket.getItem()).tryPlaceContainedLiquid(world, x, y, z);
world.markBlockForUpdate(x, y, z);
}
return r;
}
BlockWrapper result = buckets.inverse().get(new ItemWrapper(bucket));
Material material = world.getBlock(x, y, z).getMaterial();
boolean solid = !material.isSolid();
if (world.isAirBlock(x, y, z) || solid) {
if (!world.isRemote && solid && !material.isLiquid()) {