use of micdoodle8.mods.galacticraft.api.entity.ICargoEntity in project Galacticraft by micdoodle8.
the class TileEntityCargoUnloader method checkForCargoEntity.
public void checkForCargoEntity() {
boolean foundFuelable = false;
BlockVec3 thisVec = new BlockVec3(this);
for (final EnumFacing dir : EnumFacing.VALUES) {
final TileEntity pad = thisVec.getTileEntityOnSide(this.worldObj, dir);
if (pad != null && pad instanceof TileEntityMulti) {
final TileEntity mainTile = ((TileEntityMulti) pad).getMainBlockTile();
if (mainTile instanceof ICargoEntity) {
this.attachedFuelable = (ICargoEntity) mainTile;
foundFuelable = true;
break;
}
} else if (pad != null && pad instanceof ICargoEntity) {
this.attachedFuelable = (ICargoEntity) pad;
foundFuelable = true;
break;
}
}
if (!foundFuelable) {
this.attachedFuelable = null;
}
}
use of micdoodle8.mods.galacticraft.api.entity.ICargoEntity in project Galacticraft by micdoodle8.
the class TileEntityCargoLoader method checkForCargoEntity.
public void checkForCargoEntity() {
boolean foundFuelable = false;
BlockVec3 thisVec = new BlockVec3(this);
for (final EnumFacing dir : EnumFacing.VALUES) {
final TileEntity pad = thisVec.getTileEntityOnSide(this.worldObj, dir);
if (pad != null && pad instanceof TileEntityMulti) {
final TileEntity mainTile = ((TileEntityMulti) pad).getMainBlockTile();
if (mainTile instanceof ICargoEntity) {
this.attachedFuelable = (ICargoEntity) mainTile;
foundFuelable = true;
break;
}
} else if (pad != null && pad instanceof ICargoEntity) {
this.attachedFuelable = (ICargoEntity) pad;
foundFuelable = true;
break;
}
}
if (!foundFuelable) {
this.attachedFuelable = null;
}
}
Aggregations