use of pneumaticCraft.api.tileentity.IHeatExchanger in project PneumaticCraft by MineMaarten.
the class GuiAdvancedAirCompressor method initGui.
@Override
public void initGui() {
super.initGui();
addWidget(new WidgetTemperature(0, guiLeft + 87, guiTop + 20, 273, 675, ((IHeatExchanger) te).getHeatExchangerLogic(ForgeDirection.UNKNOWN), 325, 625));
}
use of pneumaticCraft.api.tileentity.IHeatExchanger in project PneumaticCraft by MineMaarten.
the class GuiAdvancedLiquidCompressor method initGui.
@Override
public void initGui() {
super.initGui();
addWidget(new WidgetTemperature(0, guiLeft + 92, guiTop + 20, 273, 675, ((IHeatExchanger) te).getHeatExchangerLogic(ForgeDirection.UNKNOWN), 325, 625));
}
use of pneumaticCraft.api.tileentity.IHeatExchanger in project PneumaticCraft by MineMaarten.
the class GuiFluxCompressor method initGui.
@Override
public void initGui() {
super.initGui();
inputStat = addAnimatedStat("Input", (ItemStack) null, 0xFF555555, false);
addWidget(new WidgetEnergy(guiLeft + 20, guiTop + 20, te));
addWidget(new WidgetTemperature(0, guiLeft + 87, guiTop + 20, 273, 675, ((IHeatExchanger) te).getHeatExchangerLogic(ForgeDirection.UNKNOWN), 325, 625));
}
use of pneumaticCraft.api.tileentity.IHeatExchanger in project PneumaticCraft by MineMaarten.
the class GuiPneumaticGenerator method initGui.
@Override
public void initGui() {
super.initGui();
outputStat = addAnimatedStat("Output", IC2Items.getItem("glassFiberCableItem"), 0xFF555555, false);
addWidget(new WidgetTemperature(0, guiLeft + 87, guiTop + 20, 273, 675, ((IHeatExchanger) te).getHeatExchangerLogic(ForgeDirection.UNKNOWN), 325, 625));
}
use of pneumaticCraft.api.tileentity.IHeatExchanger in project PneumaticCraft by MineMaarten.
the class WailaHeatHandler method getNBTData.
@Override
public NBTTagCompound getNBTData(EntityPlayerMP player, TileEntity te, NBTTagCompound tag, World world, int x, int y, int z) {
if (te instanceof IHeatExchanger) {
Set<IHeatExchangerLogic> heatExchangers = new HashSet<IHeatExchangerLogic>();
IHeatExchangerLogic logic = null;
boolean isMultisided = true;
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
logic = ((IHeatExchanger) te).getHeatExchangerLogic(d);
if (logic != null) {
if (heatExchangers.contains(logic)) {
isMultisided = false;
break;
} else {
heatExchangers.add(logic);
}
}
}
if (isMultisided) {
NBTTagList tagList = new NBTTagList();
for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
logic = ((IHeatExchanger) te).getHeatExchangerLogic(d);
if (logic != null) {
NBTTagCompound heatTag = new NBTTagCompound();
heatTag.setByte("side", (byte) d.ordinal());
heatTag.setInteger("temp", (int) logic.getTemperature());
tagList.appendTag(heatTag);
}
}
tag.setTag("heat", tagList);
} else if (logic != null) {
tag.setInteger("temp", (int) logic.getTemperature());
}
}
return tag;
}
Aggregations