mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +01:00
Fixed a crash when having phantom liquifaces connected to non-tileentities
Closes #111
This commit is contained in:
parent
470e7b5518
commit
22e886ded2
1 changed files with 8 additions and 1 deletions
|
@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.tile;
|
||||||
|
|
||||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom;
|
import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom;
|
||||||
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||||
|
|
||||||
|
@ -37,6 +38,12 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isBoundThingInRange(){
|
public boolean isBoundThingInRange(){
|
||||||
return super.isBoundThingInRange() && this.worldObj.getTileEntity(this.boundPosition).hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null);
|
if(super.isBoundThingInRange()){
|
||||||
|
TileEntity tile = this.worldObj.getTileEntity(this.boundPosition);
|
||||||
|
if(tile != null){
|
||||||
|
return tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue