diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-08-22 20:01:40 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2019-08-22 20:01:40 -0400 |
| commit | 20bef6e26d948698398bd16aeab8c9e6b89110e4 (patch) | |
| tree | 8a21e17f78b330435f4ce2d4355d72b773230aa7 /src/main/java/darkknight/jewelrycraft/client/AbstractTab.java | |
| parent | 26fb28edd1ebb6390f8803fed3876d222cb8fdba (diff) | |
Format/import cleanup
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/client/AbstractTab.java')
| -rwxr-xr-x | src/main/java/darkknight/jewelrycraft/client/AbstractTab.java | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/client/AbstractTab.java b/src/main/java/darkknight/jewelrycraft/client/AbstractTab.java index 0db57c7..5070e7c 100755 --- a/src/main/java/darkknight/jewelrycraft/client/AbstractTab.java +++ b/src/main/java/darkknight/jewelrycraft/client/AbstractTab.java @@ -18,13 +18,11 @@ import net.minecraft.util.ResourceLocation; */
@SideOnly(Side.CLIENT)
public abstract class AbstractTab extends GuiButton {
- ResourceLocation texture = new ResourceLocation(
- Variables.MODID, "textures/gui/hearts.png");
- ItemStack renderStack;
- RenderItem itemRenderer = new RenderItem();
+ ResourceLocation texture = new ResourceLocation(Variables.MODID, "textures/gui/hearts.png");
+ ItemStack renderStack;
+ RenderItem itemRenderer = new RenderItem();
- public AbstractTab(int id, int posX, int posY,
- ItemStack renderStack) {
+ public AbstractTab(int id, int posX, int posY, ItemStack renderStack) {
super(id, posX, posY, 18, 18, "");
this.renderStack = renderStack;
}
@@ -36,9 +34,7 @@ public abstract class AbstractTab extends GuiButton { int xOffset = this.enabled ? 0 : 8;
mc.renderEngine.bindTexture(this.texture);
- this.drawTexturedModalRect(this.xPosition,
- yPosition, 144 + xOffset, 32, 18,
- 18);
+ this.drawTexturedModalRect(this.xPosition, yPosition, 144 + xOffset, 32, 18, 18);
GL11.glPushMatrix();
RenderHelper.enableGUIStandardItemLighting();
@@ -46,13 +42,9 @@ public abstract class AbstractTab extends GuiButton { this.itemRenderer.zLevel = 100.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- this.itemRenderer.renderItemAndEffectIntoGUI(
- mc.fontRenderer, mc.renderEngine,
- renderStack, xPosition + 1,
+ this.itemRenderer.renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 1,
yPosition + 1);
- this.itemRenderer.renderItemOverlayIntoGUI(
- mc.fontRenderer, mc.renderEngine,
- renderStack, xPosition + 1,
+ this.itemRenderer.renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, renderStack, xPosition + 1,
yPosition + 1);
GL11.glDisable(GL11.GL_LIGHTING);
this.itemRenderer.zLevel = 0.0F;
@@ -64,11 +56,8 @@ public abstract class AbstractTab extends GuiButton { @Override
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) {
- boolean inWindow = this.enabled && this.visible
- && mouseX >= this.xPosition
- && mouseY >= this.yPosition
- && mouseX < this.xPosition + this.width
- && mouseY < this.yPosition + this.height;
+ boolean inWindow = this.enabled && this.visible && mouseX >= this.xPosition && mouseY >= this.yPosition
+ && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height;
if (inWindow)
this.onTabClicked();
return inWindow;
|
