mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
use getters & setters for InfuseStorage (#5416)
* use getters & setters for InfuseStorage to prevent type/amount discrepancies * Fix a few checks when reading from network/NBT * Fix some spacing I screwed up by accident * fix metallurgic infuser gui texture for dark gauge
This commit is contained in:
1 parent
bbcea85fc4
commit
0dba7cb584
14 files changed
+135
-87
No files matched your search
@@ -76,8 +76,8 @@ public class GuiFactory extends GuiMekanismTile<TileEntityFactory> {
|
||||
+ ": " + tileEntity.gasTank.getStored() : LangUtils.localize("gui.none"), xAxis, yAxis);
|
||||
} else if (tileEntity.getRecipeType() == RecipeType.INFUSING) {
|
||||
drawHoveringText(
|
||||
tileEntity.infuseStored.type != null ? tileEntity.infuseStored.type.getLocalizedName() + ": "
|
||||
+ tileEntity.infuseStored.amount : LangUtils.localize("gui.empty"), xAxis, yAxis);
|
||||
tileEntity.infuseStored.getType() != null ? tileEntity.infuseStored.getType().getLocalizedName() + ": "
|
||||
+ tileEntity.infuseStored.getAmount() : LangUtils.localize("gui.empty"), xAxis, yAxis);
|
||||
}
|
||||
}
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
@@ -116,7 +116,7 @@ public class GuiFactory extends GuiMekanismTile<TileEntityFactory> {
|
||||
}
|
||||
} else if (tileEntity.getRecipeType() == RecipeType.INFUSING) {
|
||||
if (tileEntity.getScaledInfuseLevel(160) > 0) {
|
||||
displayGauge(8, 78, tileEntity.getScaledInfuseLevel(160), 5, tileEntity.infuseStored.type.sprite);
|
||||
displayGauge(8, 78, tileEntity.getScaledInfuseLevel(160), 5, tileEntity.infuseStored.getType().sprite);
|
||||
}
|
||||
}
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
|
||||
Reference in new issue
Block a user