mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Fixed a bug with fluid placers replacing fluids in front of them
This commit is contained in:
parent
4b548dd0a9
commit
9d1cb8e45a
1 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.PosUtil;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.Util;
|
import de.ellpeck.actuallyadditions.mod.util.Util;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockLiquid;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
@ -87,7 +88,7 @@ public class TileEntityFluidCollector extends TileEntityBase implements IFluidHa
|
||||||
if(block != null){
|
if(block != null){
|
||||||
BlockPos offsetPos = this.pos.offset(sideToManipulate);
|
BlockPos offsetPos = this.pos.offset(sideToManipulate);
|
||||||
Block blockPresent = PosUtil.getBlock(offsetPos, this.worldObj);
|
Block blockPresent = PosUtil.getBlock(offsetPos, this.worldObj);
|
||||||
boolean replaceable = blockPresent.isReplaceable(this.worldObj, offsetPos);
|
boolean replaceable = !(blockPresent instanceof BlockLiquid) && !(blockPresent instanceof IFluidBlock) && !blockPresent.isReplaceable(this.worldObj, offsetPos);
|
||||||
if(replaceable){
|
if(replaceable){
|
||||||
PosUtil.setBlock(offsetPos, this.worldObj, block, 0, 3);
|
PosUtil.setBlock(offsetPos, this.worldObj, block, 0, 3);
|
||||||
this.tank.drain(Util.BUCKET, true);
|
this.tank.drain(Util.BUCKET, true);
|
||||||
|
|
Loading…
Reference in a new issue