mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
45 lines
1.6 KiB
Java
45 lines
1.6 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under the
|
|
* Botania License: http://botaniamod.net/license.php
|
|
*
|
|
* File Created @ [25/11/2015, 19:59:11 (GMT)]
|
|
*/
|
|
package vazkii.botania.client.gui.box;
|
|
|
|
import net.minecraft.client.gui.inventory.GuiInventory;
|
|
import net.minecraft.client.renderer.GlStateManager;
|
|
import net.minecraft.client.renderer.InventoryEffectRenderer;
|
|
import net.minecraft.entity.player.EntityPlayer;
|
|
import net.minecraft.inventory.Slot;
|
|
import net.minecraft.util.ResourceLocation;
|
|
import vazkii.botania.client.lib.LibResources;
|
|
|
|
public class GuiBaubleBox extends InventoryEffectRenderer {
|
|
|
|
private static final ResourceLocation texture = new ResourceLocation(LibResources.GUI_BAUBLE_BOX);
|
|
|
|
public GuiBaubleBox(EntityPlayer player, InventoryBaubleBox box) {
|
|
super(new ContainerBaubleBox(player, box));
|
|
}
|
|
|
|
@Override
|
|
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
|
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
|
mc.getTextureManager().bindTexture(texture);
|
|
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
|
|
for(int i1 = 0; i1 < 4; ++i1) {
|
|
Slot slot = inventorySlots.inventorySlots.get(i1);
|
|
if(slot.getHasStack() && slot.getSlotStackLimit() == 1)
|
|
drawTexturedModalRect(guiLeft+slot.xDisplayPosition, guiTop+slot.yDisplayPosition, 200, 0, 16, 16);
|
|
}
|
|
|
|
GuiInventory.drawEntityOnScreen(guiLeft + 43, guiTop + 61, 20, guiLeft + 43 - p_146976_2_, guiTop + 45 - 30 - p_146976_3_, mc.thePlayer);
|
|
}
|
|
|
|
}
|