This commit is contained in:
Modmuss50 2015-11-23 19:37:39 +00:00
parent 30879a534a
commit ef82ceb714
14 changed files with 156 additions and 120 deletions

View file

@ -1,6 +1,7 @@
package techreborn.blocks.fluid;
import net.minecraft.block.material.Material;
import net.minecraft.util.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidClassic;
@ -16,17 +17,17 @@ public class BlockFluidBase extends BlockFluidClassic {
@Override
public boolean canDisplace(IBlockAccess world, int x, int y, int z) {
if (world.getBlock(x, y, z).getMaterial().isLiquid())
public boolean canDisplace(IBlockAccess world, BlockPos pos) {
if(world.getBlockState(pos).getBlock().getMaterial().isLiquid())
return false;
return super.canDisplace(world, x, y, z);
return super.canDisplace(world, pos);
}
@Override
public boolean displaceIfPossible(World world, int x, int y, int z) {
if (world.getBlock(x, y, z).getMaterial().isLiquid())
public boolean displaceIfPossible(World world, BlockPos pos) {
if(world.getBlockState(pos).getBlock().getMaterial().isLiquid())
return false;
return super.displaceIfPossible(world, x, y, z);
return super.displaceIfPossible(world, pos);
}
}