use of me.desht.pneumaticcraft.common.thirdparty.waila.IInfoForwarder in project pnc-repressurized by TeamPneumatic.
the class BlockPneumaticCraft method addProbeInfo.
@Override
@Optional.Method(modid = "theoneprobe")
public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) {
TileEntity te = world.getTileEntity(data.getPos());
if (te instanceof IInfoForwarder) {
te = ((IInfoForwarder) te).getInfoTileEntity();
}
if (te instanceof IPneumaticMachine) {
TOPCallback.handlePneumatic(mode, probeInfo, (IPneumaticMachine) te);
}
if (te instanceof IHeatExchanger) {
TOPCallback.handleHeat(mode, probeInfo, (IHeatExchanger) te);
}
if (ConfigHandler.client.topShowsFluids && te != null && te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, data.getSideHit())) {
IFluidHandler handler = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, data.getSideHit());
TOPCallback.handleFluidTanks(mode, probeInfo, handler);
}
if (te instanceof TileEntityBase) {
TOPCallback.handleRedstoneMode(mode, probeInfo, (TileEntityBase) te);
}
if (te instanceof TileEntityPressureTube) {
TOPCallback.handlePressureTube(mode, probeInfo, (TileEntityPressureTube) te, data.getSideHit());
}
}
Aggregations