mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 23:33:00 +00:00
Giant multiblock refactor
This commit is contained in:
1 parent
201111cb83
commit
aa47599278
259 files changed
+10117
-6495
No files matched your search
@@ -12,9 +12,11 @@ package forestry.apiculture.gui;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import forestry.apiculture.gadgets.TileAlvearyPlain;
|
||||
import forestry.apiculture.multiblock.IAlvearyController;
|
||||
import forestry.apiculture.multiblock.TileAlvearyPlain;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.gui.GuiForestryTitled;
|
||||
import forestry.core.gui.OwnerLedger;
|
||||
import forestry.core.utils.EnumTankLevel;
|
||||
import forestry.core.utils.Utils;
|
||||
|
||||
@@ -30,8 +32,8 @@ public class GuiAlveary extends GuiForestryTitled<ContainerAlveary, TileAlvearyP
|
||||
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
|
||||
|
||||
TileAlvearyPlain machine = inventory;
|
||||
drawHealthMeter(guiLeft + 20, guiTop + 37, machine.getHealthScaled(46), Utils.rateTankLevel(machine.getHealthScaled(100)));
|
||||
IAlvearyController alvearyController = inventory.getAlvearyController();
|
||||
drawHealthMeter(guiLeft + 20, guiTop + 37, alvearyController.getHealthScaled(46), Utils.rateTankLevel(alvearyController.getHealthScaled(100)));
|
||||
}
|
||||
|
||||
private void drawHealthMeter(int x, int y, int height, EnumTankLevel rated) {
|
||||
@@ -57,4 +59,12 @@ public class GuiAlveary extends GuiForestryTitled<ContainerAlveary, TileAlvearyP
|
||||
this.drawTexturedModalRect(x, y + 46 - height, i, k + 46 - height, 4, height);
|
||||
}
|
||||
|
||||
/* LEDGERS */
|
||||
protected void initLedgers() {
|
||||
super.initLedgers();
|
||||
|
||||
IAlvearyController alvearyController = inventory.getAlvearyController();
|
||||
ledgerManager.add(new OwnerLedger(ledgerManager, alvearyController));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user