mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-21 12:42:20 +00:00
Code refactoring
This commit is contained in:
1 parent
e24a94f0ba
commit
f3d3a0a2df
11 files changed
+270
-546
No files matched your search
@@ -9,14 +9,24 @@ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GUIEffectJar extends effectGui {
|
||||
public class GUIEffectJar extends GuiContainer {
|
||||
|
||||
public static final String BACKGROUND_FILE = "jarScreen.png";
|
||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||
CommonProxy.DOMAIN,
|
||||
CommonProxy.GUI_TEXTURE + BACKGROUND_FILE);
|
||||
CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
||||
|
||||
private static final int WIDTH = 176;
|
||||
private static final int HEIGHT = 156;
|
||||
|
||||
private static final int BAR_DEST_X = 117;
|
||||
private static final int BAR_DEST_Y = 10;
|
||||
|
||||
private static final int BAR_SRC_X = 176;
|
||||
private static final int BAR_SRC_Y = 0;
|
||||
|
||||
private static final int BAR_WIDTH = 10;
|
||||
private static final int BAR_HEIGHT = 40;
|
||||
|
||||
public GUIEffectJar(TileEntityEffectJar jar, EntityPlayer player) {
|
||||
super(new ContainerEffectJar(jar, player));
|
||||
@@ -24,6 +34,11 @@ public class GUIEffectJar extends effectGui {
|
||||
this.ySize = HEIGHT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||
fontRendererObj.drawString("Inventory", 9, 63, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||
@@ -32,7 +47,7 @@ public class GUIEffectJar extends effectGui {
|
||||
|
||||
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
TileEntityEffectJar jar = (TileEntityEffectJar) ((ContainerEffectJar) this.inventorySlots).inventory;
|
||||
TileEntityEffectJar jar = ((ContainerEffectJar) this.inventorySlots).jar;
|
||||
float r = ((jar.currentBeeColour >> 16) & 255) / 255f;
|
||||
float g = ((jar.currentBeeColour >> 8) & 255) / 255f;
|
||||
float b = (jar.currentBeeColour & 255) / 255f;
|
||||
|
||||
Reference in new issue
Block a user