mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-27 15:22:57 +00:00
Reformed Forestry!
* Updated for BC 6.0.x compatibility * Re-implemented the Pipes plugin * Converted to vanilla assets lang system * Converted to standard gradle file structure * General warnings cleanup
This commit is contained in:
1 parent
36248c02f1
commit
8f2d802f11
1602 files changed
+724
-736
No files matched your search
+58
@@ -0,0 +1,58 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.food.gui;
|
||||
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import forestry.api.food.BeverageManager;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.gadgets.TileForestry;
|
||||
import forestry.core.gui.GuiForestry;
|
||||
import forestry.food.items.ItemInfuser.InfuserInventory;
|
||||
|
||||
public class GuiInfuser extends GuiForestry<TileForestry> {
|
||||
|
||||
private final IInventory inventory;
|
||||
private int startX;
|
||||
private int startY;
|
||||
|
||||
public GuiInfuser(InventoryPlayer inventoryplayer, InfuserInventory inventory) {
|
||||
super(Defaults.TEXTURE_PATH_GUI + "/infuser.png", new ContainerInfuser(inventoryplayer, inventory), inventory);
|
||||
|
||||
this.inventory = inventory;
|
||||
|
||||
xSize = 176;
|
||||
ySize = 185;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float var1, int mouseX, int mouseY) {
|
||||
super.drawGuiContainerBackgroundLayer(var1, mouseX, mouseY);
|
||||
|
||||
for (int l = 2; l < inventory.getSizeInventory(); l++) {
|
||||
String description = BeverageManager.ingredientManager.getDescription(inventory.getStackInSlot(l));
|
||||
if (description == null)
|
||||
description = "(No effect)";
|
||||
|
||||
int row = (l - 2) * 20;
|
||||
fontRendererObj.drawString(description, startX + 32, startY + 16 + row, fontColor.get("gui.screen"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
startX = (this.width - this.xSize) / 2;
|
||||
startY = (this.height - this.ySize) / 2;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user