Oil spouts wasn't visible above the ocean surface.

This commit is contained in:
SandGrainOne 2014-04-14 01:00:51 +02:00
parent daa9ab82fb
commit d5055969b0

View file

@ -19,6 +19,7 @@ import java.util.Set;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower; import net.minecraft.block.BlockFlower;
import net.minecraft.block.BlockStaticLiquid;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -260,7 +261,7 @@ public class OilPopulate {
private boolean isReplaceableFluid(World world, int x, int y, int z) { private boolean isReplaceableFluid(World world, int x, int y, int z) {
Block block = world.getBlock(x, y, z); Block block = world.getBlock(x, y, z);
return (block instanceof BlockFluidBase || block instanceof IFluidBlock) && block.getMaterial() != Material.lava; return (block instanceof BlockStaticLiquid || block instanceof BlockFluidBase || block instanceof IFluidBlock) && block.getMaterial() != Material.lava;
} }
private boolean isOil(World world, int x, int y, int z) { private boolean isOil(World world, int x, int y, int z) {
@ -357,6 +358,10 @@ public class OilPopulate {
continue; continue;
} }
if (block instanceof BlockStaticLiquid) {
return y;
}
if (block instanceof BlockFluidBase) { if (block instanceof BlockFluidBase) {
return y; return y;
} }