Code formatter take 2

This commit is contained in:
modmuss50 2016-03-25 09:47:34 +00:00
parent 33985f1a31
commit 5eed5b161d
450 changed files with 32768 additions and 26684 deletions

View file

@ -1,59 +1,67 @@
package techreborn.manual.util;
import java.awt.*;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.RenderItem;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.client.config.GuiButtonExt;
import org.lwjgl.opengl.GL11;
import java.awt.*;
public class GuiButtonItemTexture extends GuiButtonExt
{
public class GuiButtonItemTexture extends GuiButtonExt {
public int textureU;
public int textureV;
public ItemStack itemstack;
public String LINKED_PAGE;
public String NAME;
public int textureU;
public int textureV;
public ItemStack itemstack;
public String LINKED_PAGE;
public String NAME;
public GuiButtonItemTexture(int id, int xPos, int yPos, int u, int v, int width, int height, ItemStack stack,
String linkedPage, String name)
{
super(id, xPos, yPos, width, height, "_");
textureU = u;
textureV = v;
itemstack = stack;
NAME = name;
this.LINKED_PAGE = linkedPage;
}
public GuiButtonItemTexture(int id, int xPos, int yPos, int u, int v, int width, int height, ItemStack stack, String linkedPage, String name) {
super(id, xPos, yPos, width, height, "_");
textureU = u;
textureV = v;
itemstack = stack;
NAME = name;
this.LINKED_PAGE = linkedPage;
}
public void drawButton(Minecraft mc, int mouseX, int mouseY)
{
if (this.visible)
{
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
&& mouseY < this.yPosition + this.height;
mc.getTextureManager().bindTexture(buttonTextures);
int u = textureU;
int v = textureV;
public void drawButton(Minecraft mc, int mouseX, int mouseY) {
if (this.visible) {
boolean flag = mouseX >= this.xPosition && mouseY >= this.yPosition
&& mouseX < this.xPosition + this.width
&& mouseY < this.yPosition + this.height;
mc.getTextureManager().bindTexture(buttonTextures);
int u = textureU;
int v = textureV;
if (flag) {
u += width;
GL11.glPushMatrix();
GL11.glColor4f(0f, 0f, 0f, 1f);
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
GL11.glPopMatrix();
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(32826);
RenderHelper.enableStandardItemLighting();
RenderHelper.enableGUIStandardItemLighting();
if (flag)
{
u += width;
GL11.glPushMatrix();
GL11.glColor4f(0f, 0f, 0f, 1f);
this.drawTexturedModalRect(this.xPosition, this.yPosition, u, v, width, height);
GL11.glPopMatrix();
}
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(32826);
RenderHelper.enableStandardItemLighting();
RenderHelper.enableGUIStandardItemLighting();
RenderItem itemRenderer = Minecraft.getMinecraft().getRenderItem();
itemRenderer.renderItemIntoGUI(itemstack, this.xPosition, this.yPosition);
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3, Color.white.getRGB());
}
}
this.drawString(mc.fontRendererObj, this.NAME, this.xPosition + 20, this.yPosition + 3,
Color.white.getRGB());
}
}
public boolean getIsHovering() {
return hovered;
}
public boolean getIsHovering()
{
return hovered;
}
}