diff --git a/src/main/java/vazkii/botania/client/core/handler/MultiblockBlockAccess.java b/src/main/java/vazkii/botania/client/core/handler/MultiblockBlockAccess.java index c59ac25056..07cd415c98 100644 --- a/src/main/java/vazkii/botania/client/core/handler/MultiblockBlockAccess.java +++ b/src/main/java/vazkii/botania/client/core/handler/MultiblockBlockAccess.java @@ -51,9 +51,9 @@ public TileEntity getTileEntity(int x, int y, int z) { } @Override - public int getLightBrightnessForSkyBlocks(int x, int y, int z, int p_72802_4_) { + public int getLightBrightnessForSkyBlocks(int x, int y, int z, int lightValue) { if(hasBlockAccess) - return originalBlockAccess.getLightBrightnessForSkyBlocks(x,y,z,p_72802_4_); + return originalBlockAccess.getLightBrightnessForSkyBlocks(x, y, z, lightValue); return 15728640; } diff --git a/src/main/java/vazkii/botania/client/core/helper/FontHelper.java b/src/main/java/vazkii/botania/client/core/helper/FontHelper.java index e1f5ed5c01..c84195262f 100644 --- a/src/main/java/vazkii/botania/client/core/helper/FontHelper.java +++ b/src/main/java/vazkii/botania/client/core/helper/FontHelper.java @@ -12,12 +12,12 @@ public final class FontHelper { - public static boolean isFormatColor(char par0) { - return par0 >= 48 && par0 <= 57 || par0 >= 97 && par0 <= 102 || par0 >= 65 && par0 <= 70; + public static boolean isFormatColor(char letter) { + return letter >= 48 && letter <= 57 || letter >= 97 && letter <= 102 || letter >= 65 && letter <= 70; } - public static boolean isFormatSpecial(char par0) { - return par0 >= 107 && par0 <= 111 || par0 >= 75 && par0 <= 79 || par0 == 114 || par0 == 82; + public static boolean isFormatSpecial(char letter) { + return letter >= 107 && letter <= 111 || letter >= 75 && letter <= 79 || letter == 114 || letter == 82; } public static String getFormatFromString(String par0Str) { diff --git a/src/main/java/vazkii/botania/client/core/helper/RenderHelper.java b/src/main/java/vazkii/botania/client/core/helper/RenderHelper.java index d367b46788..2b222b21c4 100644 --- a/src/main/java/vazkii/botania/client/core/helper/RenderHelper.java +++ b/src/main/java/vazkii/botania/client/core/helper/RenderHelper.java @@ -20,6 +20,7 @@ import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -97,15 +98,15 @@ public static void renderTooltip(int x, int y, List tooltipData, int col GL11.glColor4f(1F, 1F, 1F, 1F); } - public static void drawGradientRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) { - float var7 = (par5 >> 24 & 255) / 255F; - float var8 = (par5 >> 16 & 255) / 255F; - float var9 = (par5 >> 8 & 255) / 255F; - float var10 = (par5 & 255) / 255F; - float var11 = (par6 >> 24 & 255) / 255F; - float var12 = (par6 >> 16 & 255) / 255F; - float var13 = (par6 >> 8 & 255) / 255F; - float var14 = (par6 & 255) / 255F; + public static void drawGradientRect(int left, int top, float z, int right, int bottom, int topColor, int bottomColor) { + float topA = (topColor >> 24 & 255) / 255F; + float topR = (topColor >> 16 & 255) / 255F; + float topG = (topColor >> 8 & 255) / 255F; + float topB = (topColor & 255) / 255F; + float bottomA = (bottomColor >> 24 & 255) / 255F; + float bottomR = (bottomColor >> 16 & 255) / 255F; + float bottomG = (bottomColor >> 8 & 255) / 255F; + float bottomB = (bottomColor & 255) / 255F; GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); @@ -113,12 +114,12 @@ public static void drawGradientRect(int par1, int par2, float z, int par3, int p GL11.glShadeModel(GL11.GL_SMOOTH); Tessellator var15 = Tessellator.instance; var15.startDrawingQuads(); - var15.setColorRGBA_F(var8, var9, var10, var7); - var15.addVertex(par3, par2, z); - var15.addVertex(par1, par2, z); - var15.setColorRGBA_F(var12, var13, var14, var11); - var15.addVertex(par1, par4, z); - var15.addVertex(par3, par4, z); + var15.setColorRGBA_F(topR, topG, topB, topA); + var15.addVertex(right, top, z); + var15.addVertex(left, top, z); + var15.setColorRGBA_F(bottomR, bottomG, bottomB, bottomA); + var15.addVertex(left, bottom, z); + var15.addVertex(right, bottom, z); var15.draw(); GL11.glShadeModel(GL11.GL_FLAT); GL11.glDisable(GL11.GL_BLEND); @@ -126,17 +127,17 @@ public static void drawGradientRect(int par1, int par2, float z, int par3, int p GL11.glEnable(GL11.GL_TEXTURE_2D); } - public static void drawTexturedModalRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) { - drawTexturedModalRect(par1, par2, z, par3, par4, par5, par6, 0.00390625F, 0.00390625F); + public static void drawTexturedModalRect(int x, int y, float z, int textureX, int textureY, int width, int height) { + drawTexturedModalRect(x, y, z, textureX, textureY, width, height, 0.00390625F, 0.00390625F); } - public static void drawTexturedModalRect(int par1, int par2, float z, int par3, int par4, int par5, int par6, float f, float f1) { + public static void drawTexturedModalRect(int x, int y, float z, int textureX, int textureY, int width, int height, float f, float f1) { Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); - tessellator.addVertexWithUV(par1 + 0, par2 + par6, z, (par3 + 0) * f, (par4 + par6) * f1); - tessellator.addVertexWithUV(par1 + par5, par2 + par6, z, (par3 + par5) * f, (par4 + par6) * f1); - tessellator.addVertexWithUV(par1 + par5, par2 + 0, z, (par3 + par5) * f, (par4 + 0) * f1); - tessellator.addVertexWithUV(par1 + 0, par2 + 0, z, (par3 + 0) * f, (par4 + 0) * f1); + tessellator.addVertexWithUV(x + 0, y + height, z, (textureX + 0) * f, (textureY + height) * f1); + tessellator.addVertexWithUV(x + width, y + height, z, (textureX + width) * f, (textureY + height) * f1); + tessellator.addVertexWithUV(x + width, y + 0, z, (textureX + width) * f, (textureY + 0) * f1); + tessellator.addVertexWithUV(x + 0, y + 0, z, (textureX + 0) * f, (textureY + 0) * f1); tessellator.draw(); } @@ -249,4 +250,15 @@ public static String getKeyDisplayString(String keyName) { return key; } + + public static void renderIcon(int x, int y, IIcon icon, int width, int height, int brightness) { + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.setBrightness(brightness); + tessellator.addVertexWithUV(x, y + height, 0, icon.getMinU(), icon.getMaxV()); + tessellator.addVertexWithUV(x + width, y + height, 0, icon.getMaxU(), icon.getMaxV()); + tessellator.addVertexWithUV(x + width, y, 0, icon.getMaxU(), icon.getMinV()); + tessellator.addVertexWithUV(x, y, 0, icon.getMinU(), icon.getMinV()); + tessellator.draw(); + } } diff --git a/src/main/java/vazkii/botania/client/fx/FXSparkle.java b/src/main/java/vazkii/botania/client/fx/FXSparkle.java index a9271060c8..855d05f643 100644 --- a/src/main/java/vazkii/botania/client/fx/FXSparkle.java +++ b/src/main/java/vazkii/botania/client/fx/FXSparkle.java @@ -162,85 +162,96 @@ public void setGravity(float value) { particleGravity = value; } - protected boolean pushOutOfBlocks(double par1, double par3, double par5) { - int var7 = MathHelper.floor_double(par1); - int var8 = MathHelper.floor_double(par3); - int var9 = MathHelper.floor_double(par5); - double var10 = par1 - var7; - double var12 = par3 - var8; - double var14 = par5 - var9; - - if (!worldObj.isAirBlock(var7, var8, var9)) { - boolean var16 = !worldObj.isBlockNormalCubeDefault(var7 - 1, var8, var9, false); - boolean var17 = !worldObj.isBlockNormalCubeDefault(var7 + 1, var8, var9, false); - boolean var18 = !worldObj.isBlockNormalCubeDefault(var7, var8 - 1, var9, false); - boolean var19 = !worldObj.isBlockNormalCubeDefault(var7, var8 + 1, var9, false); - boolean var20 = !worldObj.isBlockNormalCubeDefault(var7, var8, var9 - 1, false); - boolean var21 = !worldObj.isBlockNormalCubeDefault(var7, var8, var9 + 1, false); - byte var22 = -1; - double var23 = 9999.0D; - - if (var16 && var10 < var23) { - var23 = var10; - var22 = 0; + protected boolean pushOutOfBlocks(double x, double y, double z) { + int blockX = MathHelper.floor_double(x); + int blockY = MathHelper.floor_double(y); + int blockZ = MathHelper.floor_double(z); + double dx = x - blockX; + double dy = y - blockY; + double dz = z - blockZ; + + if (!worldObj.isAirBlock(blockX, blockY, blockZ)) { + boolean westFree = !worldObj.isBlockNormalCubeDefault(blockX - 1, blockY, blockZ, false); + boolean eastFree = !worldObj.isBlockNormalCubeDefault(blockX + 1, blockY, blockZ, false); + boolean downFree = !worldObj.isBlockNormalCubeDefault(blockX, blockY - 1, blockZ, false); + boolean upFree = !worldObj.isBlockNormalCubeDefault(blockX, blockY + 1, blockZ, false); + boolean northFree = !worldObj.isBlockNormalCubeDefault(blockX, blockY, blockZ - 1, false); + boolean southFree = !worldObj.isBlockNormalCubeDefault(blockX, blockY, blockZ + 1, false); + byte direction = -1; + double minDist = 9999.0D; + + if (westFree && dx < minDist) { + minDist = dx; + direction = 0; } - if (var17 && 1.0D - var10 < var23) { - var23 = 1.0D - var10; - var22 = 1; + if (eastFree && (1.0D - dx) < minDist) { + minDist = 1.0D - dx; + direction = 1; } - if (var18 && var12 < var23) { - var23 = var12; - var22 = 2; + if (downFree && dy < minDist) { + minDist = dy; + direction = 2; } - if (var19 && 1.0D - var12 < var23) { - var23 = 1.0D - var12; - var22 = 3; + if (upFree && (1.0D - dy) < minDist) { + minDist = 1.0D - dy; + direction = 3; } - if (var20 && var14 < var23) { - var23 = var14; - var22 = 4; + if (northFree && dz < minDist) { + minDist = dz; + direction = 4; } - if (var21 && 1.0D - var14 < var23) { - var23 = 1.0D - var14; - var22 = 5; + if (southFree && (1.0D - dz) < minDist) { + minDist = 1.0D - dz; + direction = 5; } - float var25 = rand.nextFloat() * 0.05F + 0.025F; - float var26 = (rand.nextFloat() - rand.nextFloat()) * 0.1F; - - if (var22 == 0) { - motionX = -var25; - motionY=motionZ=var26; - } - - if (var22 == 1) { - motionX = var25; - motionY=motionZ=var26; - } - - if (var22 == 2) { - motionY = -var25; - motionX=motionZ=var26; - } - - if (var22 == 3) { - motionY = var25; - motionX=motionZ=var26; - } - - if (var22 == 4) { - motionZ = -var25; - motionY=motionX=var26; - } - - if (var22 == 5) { - motionZ = var25; - motionY=motionX=var26; + float mainVel = rand.nextFloat() * 0.05F + 0.025F; + float sideVel1 = (rand.nextFloat() - rand.nextFloat()) * 0.1F; + float sideVel2 = (rand.nextFloat() - rand.nextFloat()) * 0.1F; + + switch(direction) { + case 0 -> { + motionX = -mainVel; + motionY = sideVel1; + motionZ = sideVel2; + } + + case 1 -> { + motionX = mainVel; + motionY = sideVel1; + motionZ = sideVel2; + } + + case 2 -> { + motionY = -mainVel; + motionX = sideVel1; + motionZ = sideVel2; + } + + case 3 -> { + motionY = mainVel; + motionX = sideVel1; + motionZ = sideVel2; + } + + case 4 -> { + motionZ = -mainVel; + motionY = sideVel1; + motionX = sideVel2; + } + + case 5 -> { + motionZ = mainVel; + motionY = sideVel1; + motionX = sideVel2; + } + + default -> {} } return true; diff --git a/src/main/java/vazkii/botania/client/gui/SlotLocked.java b/src/main/java/vazkii/botania/client/gui/SlotLocked.java index a200c73c82..613931bc8f 100644 --- a/src/main/java/vazkii/botania/client/gui/SlotLocked.java +++ b/src/main/java/vazkii/botania/client/gui/SlotLocked.java @@ -17,12 +17,12 @@ public class SlotLocked extends Slot { - public SlotLocked(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) { - super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_); + public SlotLocked(IInventory inventory, int slotIndex, int xPos, int yPos) { + super(inventory, slotIndex, xPos, yPos); } @Override - public boolean canTakeStack(EntityPlayer p_82869_1_) { + public boolean canTakeStack(EntityPlayer player) { return false; } diff --git a/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java b/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java index dbcf42ddd3..e0617859ef 100644 --- a/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java +++ b/src/main/java/vazkii/botania/client/gui/box/ContainerBaubleBox.java @@ -83,9 +83,9 @@ public void onContainerClosed(EntityPlayer player) { } @Override - public void putStacksInSlots(ItemStack[] p_75131_1_) { + public void putStacksInSlots(ItemStack[] stacks) { baubles.blockEvents = true; - super.putStacksInSlots(p_75131_1_); + super.putStacksInSlots(stacks); } @Override diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java index f255164297..2513b00496 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexicon.java @@ -193,15 +193,15 @@ else if(!notesEnabled && notesMoveTime > 0) } @Override - public void drawScreen(int par1, int par2, float par3) { - float time = ClientTickHandler.ticksInGame + par3; + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + float time = ClientTickHandler.ticksInGame + partialTicks; timeDelta = time - lastTime; lastTime = time; - partialTicks = par3; + this.partialTicks = partialTicks; GL11.glColor4f(1F, 1F, 1F, 1F); mc.renderEngine.bindTexture(texture); - drawNotes(par3); + drawNotes(partialTicks); GL11.glColor4f(1F, 1F, 1F, 1F); mc.renderEngine.bindTexture(texture); @@ -227,7 +227,7 @@ public void drawScreen(int par1, int par2, float par3) { GL11.glColor4f(1F, 1F, 1F, 1F); mc.renderEngine.bindTexture(texture); drawTexturedModalRect(left - 19, top + 42, 67, 180, 19, 26); - if(par1 >= left - 19 && par1 < left && par2 >= top + 62 && par2 < top + 88) { + if(mouseX >= left - 19 && mouseX < left && mouseY >= top + 62 && mouseY < top + 88) { mc.renderEngine.bindTexture(textureToff); GL11.glPushMatrix(); GL11.glScalef(0.5F, 0.5F, 0.5F); @@ -237,24 +237,24 @@ public void drawScreen(int par1, int par2, float par3) { int w = 256; int h = 152; - int x = (int) ((ClientTickHandler.ticksInGame + par3) * 6) % (width + w) - w; - int y = (int) (top + guiHeight / 2 - h / 4 + Math.sin((ClientTickHandler.ticksInGame + par3) / 6.0) * 40); + int x = (int) ((ClientTickHandler.ticksInGame + partialTicks) * 6) % (width + w) - w; + int y = (int) (top + guiHeight / 2 - h / 4 + Math.sin((ClientTickHandler.ticksInGame + partialTicks) / 6.0) * 40); drawTexturedModalRect(x * 2, y * 2, 0, 0, w, h); GL11.glDisable(GL11.GL_BLEND); GL11.glPopMatrix(); - RenderHelper.renderTooltip(par1, par2, Arrays.asList(EnumChatFormatting.GOLD + "#goldfishchris", EnumChatFormatting.AQUA + "IT SAYS MANUAL")); + RenderHelper.renderTooltip(mouseX, mouseY, Arrays.asList(EnumChatFormatting.GOLD + "#goldfishchris", EnumChatFormatting.AQUA + "IT SAYS MANUAL")); } } - super.drawScreen(par1, par2, par3); + super.drawScreen(mouseX, mouseY, partialTicks); if(hasTutorialArrow) { mc.renderEngine.bindTexture(texture); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glColor4f(1F, 1F, 1F, 0.7F + (float) (Math.sin((ClientTickHandler.ticksInGame + par3) * 0.3F) + 1) * 0.15F); + GL11.glColor4f(1F, 1F, 1F, 0.7F + (float) (Math.sin((ClientTickHandler.ticksInGame + partialTicks) * 0.3F) + 1) * 0.15F); drawTexturedModalRect(tutorialArrowX, tutorialArrowY, 20, 200, TUTORIAL_ARROW_WIDTH, TUTORIAL_ARROW_HEIGHT); GL11.glDisable(GL11.GL_BLEND); } @@ -349,20 +349,20 @@ boolean isMainPage() { } @Override - protected void actionPerformed(GuiButton par1GuiButton) { - if(par1GuiButton.id >= BOOKMARK_START) { - if(par1GuiButton.id >= BOOKMARK_START + MAX_BOOKMARK_COUNT) { - if(par1GuiButton instanceof GuiButtonChallengeInfo) + protected void actionPerformed(GuiButton button) { + if(button.id >= BOOKMARK_START) { + if(button.id >= BOOKMARK_START + MAX_BOOKMARK_COUNT) { + if(button instanceof GuiButtonChallengeInfo) mc.displayGuiScreen(new GuiLexiconEntry(LexiconData.challenges, this)); else mc.displayGuiScreen(new GuiLexiconHistory()); ClientTickHandler.notifyPageChange(); - } else handleBookmark(par1GuiButton); - } else if(par1GuiButton instanceof GuiButtonCategory) { - LexiconCategory category = ((GuiButtonCategory) par1GuiButton).getCategory(); + } else handleBookmark(button); + } else if(button instanceof GuiButtonCategory) { + LexiconCategory category = ((GuiButtonCategory) button).getCategory(); mc.displayGuiScreen(new GuiLexiconIndex(category)); ClientTickHandler.notifyPageChange(); - } else switch(par1GuiButton.id) { + } else switch(button.id) { case -1 : mc.displayGuiScreen(new GuiBotaniaConfig(this)); break; @@ -383,8 +383,8 @@ protected void actionPerformed(GuiButton par1GuiButton) { } else { PersistentVariableHelper.lastBotaniaVersion = LibMisc.VERSION; PersistentVariableHelper.saveSafe(); - par1GuiButton.visible = false; - par1GuiButton.enabled = false; + button.visible = false; + button.enabled = false; } break; @@ -394,9 +394,9 @@ protected void actionPerformed(GuiButton par1GuiButton) { } } - public void handleBookmark(GuiButton par1GuiButton) { + public void handleBookmark(GuiButton button) { boolean modified = false; - int i = par1GuiButton.id - BOOKMARK_START; + int i = button.id - BOOKMARK_START; String key = getNotesKey(); if(i == bookmarks.size()) { if(!bookmarkKeys.contains(key)) { @@ -561,15 +561,15 @@ boolean closeScreenOnInvKey() { } @Override - protected void keyTyped(char par1, int par2) { - handleNoteKey(par1, par2); + protected void keyTyped(char typedChar, int keyCode) { + handleNoteKey(typedChar, keyCode); - if(!notesEnabled && closeScreenOnInvKey() && mc.gameSettings.keyBindInventory.getKeyCode() == par2) { + if(!notesEnabled && closeScreenOnInvKey() && mc.gameSettings.keyBindInventory.getKeyCode() == keyCode) { mc.displayGuiScreen(null); mc.setIngameFocus(); } - if(par2 == KONAMI_CODE[konamiIndex]) { + if(keyCode == KONAMI_CODE[konamiIndex]) { konamiIndex++; if(konamiIndex >= KONAMI_CODE.length) { mc.getSoundHandler().playSound(PositionedSoundRecord.func_147673_a(new ResourceLocation("botania:way"))); @@ -577,15 +577,15 @@ protected void keyTyped(char par1, int par2) { } } else konamiIndex = 0; - super.keyTyped(par1, par2); + super.keyTyped(typedChar, keyCode); } - public void handleNoteKey(char par1, int par2) { + public void handleNoteKey(char typedChar, int keyCode) { if(notesEnabled) { Keyboard.enableRepeatEvents(true); boolean changed = false; - if(par2 == 14 && note.length() > 0) { + if(keyCode == 14 && note.length() > 0) { if(isCtrlKeyDown()) note = ""; else { @@ -596,8 +596,8 @@ public void handleNoteKey(char par1, int par2) { changed = true; } - if((ChatAllowedCharacters.isAllowedCharacter(par1) || par2 == 28) && note.length() < 250) { - note += par2 == 28 ? "
" : par1; + if((ChatAllowedCharacters.isAllowedCharacter(typedChar) || keyCode == 28) && note.length() < 250) { + note += keyCode == 28 ? "
" : typedChar; changed = true; } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallenge.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallenge.java index 5f852aedce..b274499ba7 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallenge.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallenge.java @@ -60,8 +60,8 @@ public void onInitGui() { } @Override - public void drawScreen(int par1, int par2, float par3) { - super.drawScreen(par1, par2, par3); + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + super.drawScreen(mouseX, mouseY, partialTicks); RenderHelper.enableGUIStandardItemLighting(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); @@ -83,37 +83,37 @@ public void drawScreen(int par1, int par2, float par3) { } @Override - protected void keyTyped(char par1, int par2) { - if(par2 == 14 && !notesEnabled) // Backspace + protected void keyTyped(char typedChar, int keyCode) { + if(keyCode == 14 && !notesEnabled) // Backspace back(); - else if(par2 == 199) { // Home + else if(keyCode == 199) { // Home mc.displayGuiScreen(new GuiLexicon()); ClientTickHandler.notifyPageChange(); } - super.keyTyped(par1, par2); + super.keyTyped(typedChar, keyCode); } @Override - protected void mouseClicked(int par1, int par2, int par3) { - super.mouseClicked(par1, par2, par3); + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); - if(par3 == 1) + if(mouseButton == 1) back(); } @Override - protected void actionPerformed(GuiButton par1GuiButton) { - if(par1GuiButton.id >= BOOKMARK_START) - super.actionPerformed(par1GuiButton); - else if(par1GuiButton.id == 12) { + protected void actionPerformed(GuiButton button) { + if(button.id >= BOOKMARK_START) + super.actionPerformed(button); + else if(button.id == 12) { mc.displayGuiScreen(parent); ClientTickHandler.notifyPageChange(); - } else if(par1GuiButton.id == 13) { + } else if(button.id == 13) { challenge.complete = !challenge.complete; setCompleteButtonTitle(); PersistentVariableHelper.saveSafe(); - } else if(par1GuiButton.id == NOTES_BUTTON_ID) + } else if(button.id == NOTES_BUTTON_ID) notesEnabled = !notesEnabled; } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallengesList.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallengesList.java index 66484f628e..8b178694a7 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallengesList.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconChallengesList.java @@ -54,8 +54,8 @@ public void onInitGui() { } @Override - public void drawScreen(int par1, int par2, float par3) { - super.drawScreen(par1, par2, par3); + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + super.drawScreen(mouseX, mouseY, partialTicks); boolean unicode = fontRendererObj.getUnicodeFlag(); fontRendererObj.setUnicodeFlag(true); @@ -72,36 +72,36 @@ public void drawScreen(int par1, int par2, float par3) { } @Override - protected void keyTyped(char par1, int par2) { - if(par2 == 14 && !notesEnabled) // Backspace + protected void keyTyped(char typedChar, int keyCode) { + if(keyCode == 14 && !notesEnabled) // Backspace back(); - else if(par2 == 199) { // Home + else if(keyCode == 199) { // Home mc.displayGuiScreen(new GuiLexicon()); ClientTickHandler.notifyPageChange(); } - super.keyTyped(par1, par2); + super.keyTyped(typedChar, keyCode); } @Override - protected void mouseClicked(int par1, int par2, int par3) { - super.mouseClicked(par1, par2, par3); + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); - if(par3 == 1) + if(mouseButton == 1) back(); } @Override - protected void actionPerformed(GuiButton par1GuiButton) { - if(par1GuiButton.id >= BOOKMARK_START) - super.actionPerformed(par1GuiButton); - else if(par1GuiButton.id == 12) { + protected void actionPerformed(GuiButton button) { + if(button.id >= BOOKMARK_START) + super.actionPerformed(button); + else if(button.id == 12) { mc.displayGuiScreen(parent); ClientTickHandler.notifyPageChange(); - } else if(par1GuiButton instanceof GuiButtonChallengeIcon) { - GuiButtonChallengeIcon cbutton = (GuiButtonChallengeIcon) par1GuiButton; + } else if(button instanceof GuiButtonChallengeIcon) { + GuiButtonChallengeIcon cbutton = (GuiButtonChallengeIcon) button; mc.displayGuiScreen(new GuiLexiconChallenge(this, cbutton.challenge)); - } else if(par1GuiButton.id == NOTES_BUTTON_ID) + } else if(button.id == NOTES_BUTTON_ID) notesEnabled = !notesEnabled; } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconEntry.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconEntry.java index 4aebd5db32..1eab95f97e 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconEntry.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconEntry.java @@ -129,16 +129,16 @@ boolean isCategoryIndex() { } @Override - protected void actionPerformed(GuiButton par1GuiButton) { + protected void actionPerformed(GuiButton button) { LexiconPage currentPage = entry.pages.get(page); LexiconPage newPage; - if(par1GuiButton.id >= BOOKMARK_START) - handleBookmark(par1GuiButton); - else if(par1GuiButton.id == NOTES_BUTTON_ID) + if(button.id >= BOOKMARK_START) + handleBookmark(button); + else if(button.id == NOTES_BUTTON_ID) notesEnabled = !notesEnabled; else - switch(par1GuiButton.id) { + switch(button.id) { case 0 : currentPage.onClosed(this); mc.displayGuiScreen(GuiScreen.isShiftKeyDown() ? new GuiLexicon() : parent); @@ -177,7 +177,7 @@ else if(par1GuiButton.id == NOTES_BUTTON_ID) } updatePageButtons(); - currentPage.onActionPerformed(this, par1GuiButton); + currentPage.onActionPerformed(this, button); } public GuiLexiconEntry setFirstEntry() { @@ -193,11 +193,11 @@ public void updatePageButtons() { } @Override - public void drawScreen(int par1, int par2, float par3) { - super.drawScreen(par1, par2, par3); + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + super.drawScreen(mouseX, mouseY, partialTicks); LexiconPage page = entry.pages.get(this.page); - page.renderScreen(this, par1, par2); + page.renderScreen(this, mouseX, mouseY); } @Override @@ -280,11 +280,11 @@ protected void mouseClickMove(int x, int y, int button, long time) { } @Override - protected void mouseClicked(int par1, int par2, int par3) { - super.mouseClicked(par1, par2, par3); + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); - fx = par1; - switch(par3) { + fx = mouseX; + switch(mouseButton) { case 1: back(); break; @@ -312,22 +312,22 @@ else if(w > 0) } @Override - protected void keyTyped(char par1, int par2) { - handleNoteKey(par1, par2); + protected void keyTyped(char typedChar, int keyCode) { + handleNoteKey(typedChar, keyCode); LexiconPage page = entry.pages.get(this.page); - page.onKeyPressed(par1, par2); + page.onKeyPressed(typedChar, keyCode); - if(par2 == 1) { + if(keyCode == 1) { mc.displayGuiScreen((GuiScreen)null); mc.setIngameFocus(); - } else if(par2 == 203 || par2 == 200 || par2 == 201) // Left, Up, Page Up + } else if(keyCode == 203 || keyCode == 200 || keyCode == 201) // Left, Up, Page Up prevPage(); - else if(par2 == 205 || par2 == 208 || par2 == 209) // Right, Down Page Down + else if(keyCode == 205 || keyCode == 208 || keyCode == 209) // Right, Down Page Down nextPage(); - if(par2 == 14 && !notesEnabled) // Backspace + if(keyCode == 14 && !notesEnabled) // Backspace back(); - else if(par2 == 199) { // Home + else if(keyCode == 199) { // Home mc.displayGuiScreen(new GuiLexicon()); ClientTickHandler.notifyPageChange(); } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconIndex.java b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconIndex.java index 79511b2631..c5f2109c35 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconIndex.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/GuiLexiconIndex.java @@ -177,8 +177,8 @@ public void setHoveredButton(GuiButtonInvisible b) { } @Override - public void drawScreen(int par1, int par2, float par3) { - super.drawScreen(par1, par2, par3); + public void drawScreen(int mouseX, int mouseY, float partialTicks) { + super.drawScreen(mouseX, mouseY, partialTicks); if(!searchField.getText().isEmpty()) { drawBookmark(left + 138, top + guiHeight - 24, " " + searchField.getText(), false); @@ -209,8 +209,8 @@ public void drawScreen(int par1, int par2, float par3) { infoTime = Math.max(0, infoTime - timeDelta); if(currentButton != null && infoTime == 0) { - int x = par1 + 10; - int y = par2; + int x = mouseX + 10; + int y = mouseY; x = currentButton.xPosition - 20; y = currentButton.yPosition; @@ -293,13 +293,13 @@ public void positionTutorialArrow() { } @Override - protected void actionPerformed(GuiButton par1GuiButton) { - if(par1GuiButton.id >= BOOKMARK_START) - handleBookmark(par1GuiButton); - else if(par1GuiButton.id == NOTES_BUTTON_ID) + protected void actionPerformed(GuiButton button) { + if(button.id >= BOOKMARK_START) + handleBookmark(button); + else if(button.id == NOTES_BUTTON_ID) notesEnabled = !notesEnabled; else - switch(par1GuiButton.id) { + switch(button.id) { case 12 : mc.displayGuiScreen(parent); ClientTickHandler.notifyPageChange(); @@ -317,10 +317,10 @@ else if(par1GuiButton.id == NOTES_BUTTON_ID) ClientTickHandler.notifyPageChange(); break; default : - if(par1GuiButton instanceof GuiButtonInvisible && ((GuiButtonInvisible) par1GuiButton).dog) - ((GuiButtonInvisible) par1GuiButton).click(); + if(button instanceof GuiButtonInvisible && ((GuiButtonInvisible) button).dog) + ((GuiButtonInvisible) button).click(); else { - int index = par1GuiButton.id + page * 12; + int index = button.id + page * 12; openEntry(index); } } @@ -364,12 +364,12 @@ protected void mouseClickMove(int x, int y, int button, long time) { } @Override - protected void mouseClicked(int par1, int par2, int par3) { - super.mouseClicked(par1, par2, par3); + protected void mouseClicked(int mouseX, int mouseY, int mouseButton) { + super.mouseClicked(mouseX, mouseY, mouseButton); - searchField.mouseClicked(par1, par2, par3); - fx = par1; - switch(par3) { + searchField.mouseClicked(mouseX, mouseY, mouseButton); + fx = mouseX; + switch(mouseButton) { case 1: back(); break; @@ -402,27 +402,27 @@ boolean closeScreenOnInvKey() { } @Override - protected void keyTyped(char par1, int par2) { - if(par2 == 203 || par2 == 200 || par2 == 201) // Left, Up, Page Up + protected void keyTyped(char typedChar, int keyCode) { + if(keyCode == 203 || keyCode == 200 || keyCode == 201) // Left, Up, Page Up prevPage(); - else if(par2 == 205 || par2 == 208 || par2 == 209) // Right, Down Page Down + else if(keyCode == 205 || keyCode == 208 || keyCode == 209) // Right, Down Page Down nextPage(); - else if(par2 == 14 && !notesEnabled && searchField.getText().isEmpty()) // Backspace + else if(keyCode == 14 && !notesEnabled && searchField.getText().isEmpty()) // Backspace back(); - else if(par2 == 199) { // Home + else if(keyCode == 199) { // Home mc.displayGuiScreen(new GuiLexicon()); ClientTickHandler.notifyPageChange(); - } else if(par2 == 28 && entriesToDisplay.size() == 1) // Enter + } else if(keyCode == 28 && entriesToDisplay.size() == 1) // Enter openEntry(0); if(!notesEnabled) { String search = searchField.getText(); - searchField.textboxKeyTyped(par1, par2); + searchField.textboxKeyTyped(typedChar, keyCode); if(!searchField.getText().equalsIgnoreCase(search)) updateAll(); } - super.keyTyped(par1, par2); + super.keyTyped(typedChar, keyCode); } void back() { diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonAchievement.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonAchievement.java index 9a0ebeb28f..4fede54529 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonAchievement.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonAchievement.java @@ -29,11 +29,11 @@ public GuiButtonAchievement(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 191, 11, 11); @@ -42,7 +42,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBack.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBack.java index 75f3de6277..0527f4d70f 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBack.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBack.java @@ -23,24 +23,24 @@ public class GuiButtonBack extends GuiButtonLexicon { - public GuiButtonBack(int par1, int par2, int par3) { - super(par1, par2, par3, 18, 9, ""); + public GuiButtonBack(int id, int xPos, int yPos) { + super(id, xPos, yPos, 18, 9, ""); } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { if(enabled) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, 36, k == 2 ? 180 : 189, 18, 9); List tooltip = getTooltip(); int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBackWithShift.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBackWithShift.java index 329edad85d..8dd5b30cd0 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBackWithShift.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBackWithShift.java @@ -18,8 +18,8 @@ public class GuiButtonBackWithShift extends GuiButtonBack { - public GuiButtonBackWithShift(int par1, int par2, int par3) { - super(par1, par2, par3); + public GuiButtonBackWithShift(int id, int xPos, int yPos) { + super(id, xPos, yPos); } @Override diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBookmark.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBookmark.java index 7685138338..cb8e6d635c 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBookmark.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonBookmark.java @@ -13,15 +13,15 @@ public class GuiButtonBookmark extends GuiButtonLexicon { GuiLexicon gui; - public GuiButtonBookmark(int par1, int par2, int par3, GuiLexicon gui, String str) { - super(par1, par2, par3, gui.bookmarkWidth(str) + 5, 11, str); + public GuiButtonBookmark(int id, int xPos, int yPos, GuiLexicon gui, String text) { + super(id, xPos, yPos, gui.bookmarkWidth(text) + 5, 11, text); this.gui = gui; } @Override - public void drawButton(Minecraft mc, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { gui.drawBookmark(xPosition, yPosition, displayString, false); - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); List tooltip = new ArrayList<>(); @@ -35,7 +35,7 @@ public void drawButton(Minecraft mc, int par2, int par3) { int tooltipY = (tooltip.size() + 1) * 5; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonCategory.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonCategory.java index ca6b49d3c1..df57c752dd 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonCategory.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonCategory.java @@ -72,8 +72,8 @@ public GuiButtonCategory(int id, int x, int y, GuiLexicon gui, LexiconCategory c } @Override - public void drawButton(Minecraft mc, int mx, int my) { - boolean inside = mx >= xPosition && my >= yPosition && mx < xPosition + width && my < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + boolean inside = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; if(inside) ticksHovered = Math.min(time, ticksHovered + gui.timeDelta); else ticksHovered = Math.max(0F, ticksHovered - gui.timeDelta); diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeIcon.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeIcon.java index 46d7c4d060..bdd21b28ed 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeIcon.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeIcon.java @@ -34,20 +34,20 @@ public GuiButtonChallengeIcon(int id, int x, int y, Challenge challenge) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); RenderHelper.enableGUIStandardItemLighting(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); - RenderItem.getInstance().renderItemIntoGUI(par1Minecraft.fontRenderer, par1Minecraft.renderEngine, challenge.icon, xPosition, yPosition); + RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, challenge.icon, xPosition, yPosition); RenderHelper.disableStandardItemLighting(); GL11.glEnable(GL11.GL_BLEND); if(challenge.complete) { GL11.glDisable(GL11.GL_DEPTH_TEST); - par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 9, 0x004C00); - par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 8, 0x0BD20D); + mc.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 9, 0x004C00); + mc.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 8, 0x0BD20D); GL11.glEnable(GL11.GL_DEPTH_TEST); } @@ -57,7 +57,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - vazkii.botania.client.core.helper.RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + vazkii.botania.client.core.helper.RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeInfo.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeInfo.java index 5aafcb3e96..6b432920a6 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeInfo.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallengeInfo.java @@ -22,15 +22,15 @@ public class GuiButtonChallengeInfo extends GuiButtonLexicon { GuiLexicon gui; - public GuiButtonChallengeInfo(int par1, int par2, int par3, String str, GuiLexicon gui) { - super(par1, par2, par3, gui.bookmarkWidth(str) + 5, 11, str); + public GuiButtonChallengeInfo(int id, int xPos, int yPos, String text, GuiLexicon gui) { + super(id, xPos, yPos, gui.bookmarkWidth(text) + 5, 11, text); this.gui = gui; } @Override - public void drawButton(Minecraft mc, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { gui.drawBookmark(xPosition, yPosition, displayString, false); - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); List tooltip = new ArrayList<>(); @@ -38,7 +38,7 @@ public void drawButton(Minecraft mc, int par2, int par3) { int tooltipY = (tooltip.size() + 1) * 5; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallenges.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallenges.java index e6e2803be7..29ae182175 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallenges.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonChallenges.java @@ -29,11 +29,11 @@ public GuiButtonChallenges(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 131 : 120, 180, 11, 11); @@ -42,7 +42,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonDoot.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonDoot.java index c0744bba00..0700242902 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonDoot.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonDoot.java @@ -34,14 +34,14 @@ public GuiButtonDoot(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(TextureMap.locationItemsTexture); + mc.renderEngine.bindTexture(TextureMap.locationItemsTexture); GL11.glColor4f(1F, 1F, 1F, 1F); - RenderItem.getInstance().renderItemIntoGUI(par1Minecraft.fontRenderer, par1Minecraft.renderEngine, new ItemStack(ModItems.cacophonium), xPosition, yPosition); - RenderItem.getInstance().renderItemIntoGUI(par1Minecraft.fontRenderer, par1Minecraft.renderEngine, new ItemStack(Items.fireworks), xPosition + 8, yPosition + 2); + RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.cacophonium), xPosition, yPosition); + RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(Items.fireworks), xPosition + 8, yPosition + 2); GL11.glDisable(GL11.GL_LIGHTING); diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonHistory.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonHistory.java index 78235273b8..f3e1a035df 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonHistory.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonHistory.java @@ -23,15 +23,15 @@ public class GuiButtonHistory extends GuiButtonLexicon { GuiLexicon gui; - public GuiButtonHistory(int par1, int par2, int par3, String str, GuiLexicon gui) { - super(par1, par2, par3, gui.bookmarkWidth(str) + 5, 11, str); + public GuiButtonHistory(int id, int xPos, int yPos, String text, GuiLexicon gui) { + super(id, xPos, yPos, gui.bookmarkWidth(text) + 5, 11, text); this.gui = gui; } @Override - public void drawButton(Minecraft mc, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { gui.drawBookmark(xPosition, yPosition, displayString, false); - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); List tooltip = new ArrayList<>(); @@ -40,7 +40,7 @@ public void drawButton(Minecraft mc, int par2, int par3) { int tooltipY = (tooltip.size() + 1) * 5; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonInvisible.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonInvisible.java index cbfb7d6097..d801b3eb33 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonInvisible.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonInvisible.java @@ -39,8 +39,8 @@ public class GuiButtonInvisible extends GuiButtonLexicon { boolean enableDog = false; double dogPos = 0; - public GuiButtonInvisible(GuiLexiconIndex gui, int par1, int par2, int par3, int par4, int par5, String par6Str) { - super(par1, par2, par3, par4, par5, par6Str); + public GuiButtonInvisible(GuiLexiconIndex gui, int id, int xPos, int yPos, int width, int height, String text) { + super(id, xPos, yPos, width, height, text); this.gui = gui; } @@ -51,11 +51,11 @@ public void click() { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { if(enableDog) { dogPos += ClientTickHandler.delta * 10; - par1Minecraft.renderEngine.bindTexture(dogResource); + mc.renderEngine.bindTexture(dogResource); float f = 1F / 64F; GL11.glTranslated(dogPos, 0, 0); GL11.glColor4f(1F, 1F, 1F, 1F); @@ -65,7 +65,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { GL11.glTranslated(-dogPos, 0, 0); } - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); boolean showStack = displayStack != null && !displayString.isEmpty(); @@ -100,16 +100,16 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { drawRect(xPosition - 5, yPosition, (int) (xPosition - 5 + timeHover * 24), yPosition + height, alpha << 24 | color); GL11.glEnable(GL11.GL_ALPHA_TEST); - boolean unicode = par1Minecraft.fontRenderer.getUnicodeFlag(); - par1Minecraft.fontRenderer.setUnicodeFlag(true); - par1Minecraft.fontRenderer.drawString(displayString, xPosition + (showStack ? 7 : 0), yPosition + (height - 8) / 2, 0); - par1Minecraft.fontRenderer.setUnicodeFlag(unicode); + boolean unicode = mc.fontRenderer.getUnicodeFlag(); + mc.fontRenderer.setUnicodeFlag(true); + mc.fontRenderer.drawString(displayString, xPosition + (showStack ? 7 : 0), yPosition + (height - 8) / 2, 0); + mc.fontRenderer.setUnicodeFlag(unicode); if(showStack) { GL11.glScalef(0.5F, 0.5F, 0.5F); RenderHelper.enableGUIStandardItemLighting(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); - RenderItem.getInstance().renderItemIntoGUI(par1Minecraft.fontRenderer, par1Minecraft.renderEngine, displayStack, xPosition * 2 - 6, yPosition * 2 + 4); + RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, displayStack, xPosition * 2 - 6, yPosition * 2 + 4); RenderHelper.disableStandardItemLighting(); GL11.glEnable(GL11.GL_BLEND); } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonLexicon.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonLexicon.java index 5b331198f1..cb82f9e076 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonLexicon.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonLexicon.java @@ -17,8 +17,8 @@ public class GuiButtonLexicon extends GuiButton { - public GuiButtonLexicon(int stateName, int id, int p_i1021_3_, int p_i1021_4_, int p_i1021_5_, String p_i1021_6_) { - super(stateName, id, p_i1021_3_, p_i1021_4_, p_i1021_5_, p_i1021_6_); + public GuiButtonLexicon(int id, int xPos, int yPos, int width, int height, String text) { + super(id, xPos, yPos, width, height, text); } @Override diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonNotes.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonNotes.java index 761d7e7c38..998b94074c 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonNotes.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonNotes.java @@ -32,11 +32,11 @@ public GuiButtonNotes(GuiLexicon parent, int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 130 : 120, 191, 10, 11); @@ -51,7 +51,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonOptions.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonOptions.java index 53786d1baf..319366e72d 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonOptions.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonOptions.java @@ -29,11 +29,11 @@ public GuiButtonOptions(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 180, 11, 11); @@ -43,7 +43,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonPage.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonPage.java index fdd0bc7e8b..a2c5c0480c 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonPage.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonPage.java @@ -24,23 +24,23 @@ public class GuiButtonPage extends GuiButtonLexicon { boolean right; - public GuiButtonPage(int par1, int par2, int par3, boolean right) { - super(par1, par2, par3, 18, 10, ""); + public GuiButtonPage(int id, int xPos, int yPos, boolean right) { + super(id, xPos, yPos, 18, 10, ""); this.right = right; } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { if(enabled) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 18 : 0, right ? 180 : 190, 18, 10); if(k == 2) - RenderHelper.renderTooltip(par2, par3, Arrays.asList(StatCollector.translateToLocal(right ? "botaniamisc.nextPage" : "botaniamisc.prevPage"))); + RenderHelper.renderTooltip(mouseX, mouseY, Arrays.asList(StatCollector.translateToLocal(right ? "botaniamisc.nextPage" : "botaniamisc.prevPage"))); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonShare.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonShare.java index 339cc48dd7..ef6250872e 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonShare.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonShare.java @@ -24,23 +24,23 @@ public class GuiButtonShare extends GuiButtonLexicon { - public GuiButtonShare(int par1, int par2, int par3) { - super(par1, par2, par3, 10, 12, ""); + public GuiButtonShare(int id, int xPos, int yPos) { + super(id, xPos, yPos, 10, 12, ""); } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 10 : 0 , 200, 10, 12); List tooltip = getTooltip(); int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } public List getTooltip() { diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonUpdateWarning.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonUpdateWarning.java index 8a1cbbaab4..f4927dee56 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonUpdateWarning.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonUpdateWarning.java @@ -31,16 +31,16 @@ public GuiButtonUpdateWarning(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { + public void drawButton(Minecraft mc, int mouseX, int mouseY) { if(!visible || !enabled) return; - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); boolean red = k == 2 || ClientTickHandler.ticksInGame % 10 < 5; - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, red ? 153 : 142, 180, 11, 11); @@ -54,7 +54,7 @@ public void drawButton(Minecraft par1Minecraft, int par2, int par3) { int tooltipY = (tooltip.size() - 1) * 10 - 25; if(k == 2) - RenderHelper.renderTooltip(par2 - 125, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX - 125, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonViewOnline.java b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonViewOnline.java index 3cfb30b454..a5aa3389f5 100644 --- a/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonViewOnline.java +++ b/src/main/java/vazkii/botania/client/gui/lexicon/button/GuiButtonViewOnline.java @@ -29,18 +29,18 @@ public GuiButtonViewOnline(int id, int x, int y) { } @Override - public void drawButton(Minecraft par1Minecraft, int par2, int par3) { - field_146123_n = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height; + public void drawButton(Minecraft mc, int mouseX, int mouseY) { + field_146123_n = mouseX >= xPosition && mouseY >= yPosition && mouseX < xPosition + width && mouseY < yPosition + height; int k = getHoverState(field_146123_n); - par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture); + mc.renderEngine.bindTexture(GuiLexicon.texture); GL11.glColor4f(1F, 1F, 1F, 1F); drawTexturedModalRect(xPosition, yPosition, k == 2 ? 41 : 30, 200, 11, 11); List tooltip = Arrays.asList(EnumChatFormatting.AQUA + StatCollector.translateToLocal("botaniamisc.viewOnline")); int tooltipY = (tooltip.size() - 1) * 10; if(k == 2) - RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip); + RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip); } } diff --git a/src/main/java/vazkii/botania/client/render/block/RenderDoubleFlower.java b/src/main/java/vazkii/botania/client/render/block/RenderDoubleFlower.java index d9a9ab80b8..b4ba6789ab 100644 --- a/src/main/java/vazkii/botania/client/render/block/RenderDoubleFlower.java +++ b/src/main/java/vazkii/botania/client/render/block/RenderDoubleFlower.java @@ -27,32 +27,30 @@ public void renderInventoryBlock(Block block, int metadata, int modelId, RenderB } @Override - public boolean renderWorldBlock(IBlockAccess world, int p_147774_2_, int p_147774_3_, int p_147774_4_, Block block, int modelId, RenderBlocks renderer) { - BlockDoublePlant p_147774_1_ = (BlockDoublePlant) block; + public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) { + BlockDoublePlant flower = (BlockDoublePlant) block; Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(p_147774_1_.getMixedBrightnessForBlock(world, p_147774_2_, p_147774_3_, p_147774_4_)); + tessellator.setBrightness(flower.getMixedBrightnessForBlock(world, x, y, z)); tessellator.setColorOpaque_F(1F, 1F, 1F); - long j1 = p_147774_2_ * 3129871 ^ p_147774_4_ * 116129781L; - j1 = j1 * j1 * 42317861L + j1 * 11L; - int i1 = world.getBlockMetadata(p_147774_2_, p_147774_3_, p_147774_4_); - boolean flag1 = BlockDoublePlant.func_149887_c(i1); - if (flag1) + int meta = world.getBlockMetadata(x, y, z); + boolean isTopHalf = BlockDoublePlant.func_149887_c(meta); + if (isTopHalf) { - if (world.getBlock(p_147774_2_, p_147774_3_ - 1, p_147774_4_) != p_147774_1_) + if (world.getBlock(x, y - 1, z) != flower) { return false; } - BlockDoublePlant.func_149890_d(world.getBlockMetadata(p_147774_2_, p_147774_3_ - 1, p_147774_4_)); + BlockDoublePlant.func_149890_d(world.getBlockMetadata(x, y - 1, z)); } else { - BlockDoublePlant.func_149890_d(i1); + BlockDoublePlant.func_149890_d(meta); } // Only change here, to use xyz rather than side/meta - IIcon icon = renderer.getBlockIcon(block, world, p_147774_2_, p_147774_3_, p_147774_4_, 0); - RenderSpecialFlower.drawCrossedSquares(world, block, icon, p_147774_2_, p_147774_3_, p_147774_4_, p_147774_2_, p_147774_3_, p_147774_4_, 1F, renderer); + IIcon icon = renderer.getBlockIcon(block, world, x, y, z, 0); + RenderSpecialFlower.drawCrossedSquares(world, block, icon, x, y, z, x, y, z, 1F, renderer); return true; } diff --git a/src/main/java/vazkii/botania/client/render/entity/RenderPixie.java b/src/main/java/vazkii/botania/client/render/entity/RenderPixie.java index 4ef2757543..baf6f38cde 100644 --- a/src/main/java/vazkii/botania/client/render/entity/RenderPixie.java +++ b/src/main/java/vazkii/botania/client/render/entity/RenderPixie.java @@ -63,17 +63,17 @@ public void doRender(Entity par1Entity, double par2, double par4, double par6, f ShaderHelper.releaseShader(); } - protected int setPixieBrightness(EntityPixie par1EntityPixie, int par2, float par3) { + protected int setPixieBrightness(EntityPixie pixie, int par2, float par3) { if (par2 != 0) return -1; else { - bindTexture(getEntityTexture(par1EntityPixie)); + bindTexture(getEntityTexture(pixie)); float f1 = 1.0F; GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE); - if (par1EntityPixie.isInvisible()) + if (pixie.isInvisible()) GL11.glDepthMask(false); else GL11.glDepthMask(true); @@ -89,7 +89,7 @@ protected int setPixieBrightness(EntityPixie par1EntityPixie, int par2, float pa } @Override - protected int shouldRenderPass(EntityLivingBase par1EntityLivingBase, int par2, float par3) { - return setPixieBrightness((EntityPixie)par1EntityLivingBase, par2, par3); + protected int shouldRenderPass(EntityLivingBase entity, int par2, float par3) { + return setPixieBrightness((EntityPixie)entity, par2, par3); } } \ No newline at end of file diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileAlfPortal.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileAlfPortal.java index 65b77c1e1d..36bbf19d4f 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileAlfPortal.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileAlfPortal.java @@ -20,20 +20,21 @@ import org.lwjgl.opengl.GL11; import vazkii.botania.client.core.handler.ClientTickHandler; +import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.common.block.BlockAlfPortal; import vazkii.botania.common.block.tile.TileAlfPortal; public class RenderTileAlfPortal extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileAlfPortal portal = (TileAlfPortal) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileAlfPortal portal = (TileAlfPortal) tileEntity; int meta = portal.getBlockMetadata(); if(meta == 0) return; GL11.glPushMatrix(); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); GL11.glTranslatef(-1F, 1F, 0.25F); GL11.glEnable(GL11.GL_BLEND); @@ -41,7 +42,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_CULL_FACE); - float alpha = (float) Math.min(1F, (Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 7D + 0.6D) * (Math.min(60, portal.ticksOpen) / 60F) * 0.5F; + float alpha = (float) Math.min(1F, (Math.sin((ClientTickHandler.ticksInGame + partialTicks) / 8D) + 1D) / 7D + 0.6D) * (Math.min(60, portal.ticksOpen) / 60F) * 0.5F; GL11.glColor4f(1F, 1F, 1F, alpha); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); @@ -53,11 +54,11 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glDisable(GL11.GL_CULL_FACE); GL11.glDisable(GL11.GL_LIGHTING); - renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240); + RenderHelper.renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glTranslated(0F, 0F, 0.5F); - renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240); + RenderHelper.renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glEnable(GL11.GL_ALPHA_TEST); @@ -66,16 +67,4 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glPopMatrix(); } - - public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setBrightness(brightness); - tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV()); - tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV()); - tessellator.draw(); - } - } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileAltar.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileAltar.java index 3ce7df9a0b..f6408465ae 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileAltar.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileAltar.java @@ -57,13 +57,13 @@ public class RenderTileAltar extends TileEntitySpecialRenderer { public static int forceMeta = -1; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) { - TileAltar altar = (TileAltar) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float partialTicks) { + TileAltar altar = (TileAltar) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - Minecraft.getMinecraft().renderEngine.bindTexture(altar.isMossy ? textureMossy : textures[Math.min(textures.length - 1, forceMeta == -1 ? tileentity.getBlockMetadata() : forceMeta)]); + Minecraft.getMinecraft().renderEngine.bindTexture(altar.isMossy ? textureMossy : textures[Math.min(textures.length - 1, forceMeta == -1 ? tileEntity.getBlockMetadata() : forceMeta)]); GL11.glTranslated(d0 + 0.5, d1 + 1.5, d2 + 0.5); GL11.glScalef(1F, -1F, -1F); @@ -93,7 +93,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub final float radiusBase = 1.2F; final float radiusMod = 0.1F; - double ticks = (ClientTickHandler.ticksInGame + pticks) * 0.5; + double ticks = (ClientTickHandler.ticksInGame + partialTicks) * 0.5; float offsetPerPetal = 360 / petals; GL11.glPushMatrix(); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileAvatar.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileAvatar.java index 03dd328c68..a14f89fa65 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileAvatar.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileAvatar.java @@ -42,13 +42,13 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer { private static final ModelAvatar model = new ModelAvatar(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) { - TileAvatar avatar = (TileAvatar) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileAvatar avatar = (TileAvatar) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); int meta = avatar.getWorldObj() != null ? avatar.getBlockMetadata() : 0; diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileBellows.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileBellows.java index 77cd868061..5b75f4393b 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileBellows.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileBellows.java @@ -32,13 +32,13 @@ public class RenderTileBellows extends TileEntitySpecialRenderer { private static final ModelBellows model = new ModelBellows(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileBellows bellows = (TileBellows) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileBellows bellows = (TileBellows) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); int meta = bellows.getWorldObj() != null ? bellows.getBlockMetadata() : 0; @@ -46,7 +46,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F); - model.render(Math.max(0.1F, 1F - (bellows.movePos + bellows.moving * f + 0.1F))); + model.render(Math.max(0.1F, 1F - (bellows.movePos + bellows.moving * partialTicks + 0.1F))); GL11.glColor3f(1F, 1F, 1F); GL11.glScalef(1F, -1F, -1F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileBrewery.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileBrewery.java index d649d0edc8..24830ff0b4 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileBrewery.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileBrewery.java @@ -43,18 +43,18 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer { public static boolean rotate = true; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - brewery = (TileBrewery) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + brewery = (TileBrewery) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); GL11.glScalef(1F, -1F, -1F); GL11.glTranslatef(0.5F, -1.5F, -0.5F); - double time = ClientTickHandler.ticksInGame + f; + double time = ClientTickHandler.ticksInGame + partialTicks; if(!rotate) time = -1; diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileCocoon.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileCocoon.java index ff7b4679bf..6d6f552a47 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileCocoon.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileCocoon.java @@ -28,15 +28,15 @@ public class RenderTileCocoon extends TileEntitySpecialRenderer { ModelCocoon model = new ModelCocoon(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileCocoon cocoon = (TileCocoon) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileCocoon cocoon = (TileCocoon) tileEntity; float rot = 0F; float modval = 60F - (float) cocoon.timePassed / (float) TileCocoon.TOTAL_TIME * 30F; if(cocoon.timePassed % modval < 10) { - float mod = (cocoon.timePassed + f) % modval; + float mod = (cocoon.timePassed + partialTicks) % modval; float v = mod / 5 * (float) Math.PI * 2; - rot = (float) Math.sin(v) * (float) Math.log(cocoon.timePassed + f); + rot = (float) Math.sin(v) * (float) Math.log(cocoon.timePassed + partialTicks); } GL11.glPushMatrix(); @@ -44,7 +44,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); GL11.glRotatef(90F, 1F, 0F, 0F); GL11.glTranslatef(0.5F, -0.5F - 3F / 16F, -0.5F + 1F / 16F); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaCrystalCube.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaCrystalCube.java index 71f7d6eefa..88aa6daccd 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaCrystalCube.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaCrystalCube.java @@ -36,8 +36,8 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer { EntityItem entity = null; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileCorporeaCrystalCube cube = (TileCorporeaCrystalCube) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileCorporeaCrystalCube cube = (TileCorporeaCrystalCube) tileEntity; if(entity == null) entity = new EntityItem(cube.getWorldObj(), cube.xCoord, cube.yCoord, cube.zCoord, new ItemStack(Blocks.stone)); @@ -46,8 +46,8 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub ItemStack stack = cube.getRequestTarget(); entity.setEntityItemStack(stack); - double time = ClientTickHandler.ticksInGame + f; - double worldTicks = tileentity.getWorldObj() == null ? 0 : time; + double time = ClientTickHandler.ticksInGame + partialTicks; + double worldTicks = tileEntity.getWorldObj() == null ? 0 : time; Minecraft mc = Minecraft.getMinecraft(); GL11.glPushMatrix(); @@ -55,7 +55,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); mc.renderEngine.bindTexture(texture); GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); @@ -67,7 +67,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glTranslatef(0F, 0.8F, 0F); GL11.glScalef(s, s, s); GL11.glRotatef(180F, 0F, 0F, 1F); - ((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(entity, 0, 0, 0, 1F, f); + ((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(entity, 0, 0, 0, 1F, partialTicks); GL11.glPopMatrix(); mc.renderEngine.bindTexture(texture); } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaIndex.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaIndex.java index 3e66131aa4..ee9c535243 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaIndex.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileCorporeaIndex.java @@ -29,15 +29,15 @@ public class RenderTileCorporeaIndex extends TileEntitySpecialRenderer { public static boolean move = true; @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partticks) { - TileCorporeaIndex index = (TileCorporeaIndex) tile; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileCorporeaIndex index = (TileCorporeaIndex) tileEntity; GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y, z + 0.5); Minecraft.getMinecraft().renderEngine.bindTexture(texture); - float translation = move ? (float) ((Math.cos((index.ticksWithCloseby + (index.hasCloseby ? partticks : 0)) / 10F) * 0.5 + 0.5) * 0.25) : 0F; - float rotation = move ? index.ticks * 2 + partticks : 0F; + float translation = move ? (float) ((Math.cos((index.ticksWithCloseby + (index.hasCloseby ? partialTicks : 0)) / 10F) * 0.5 + 0.5) * 0.25) : 0F; + float rotation = move ? index.ticks * 2 + partialTicks : 0F; float scale = 0.6F; GL11.glScalef(scale, scale, scale); crystal.render(null, 0F, rotation, translation, 0F, 0F, 1F / 16F); @@ -45,8 +45,8 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl if(index.closeby > 0F) { float starScale = 0.02F; - float starRadius = (float) TileCorporeaIndex.RADIUS * index.closeby + (index.closeby == 1F ? 0F : index.hasCloseby ? partticks : -partticks) * 0.2F; - double rads = (index.ticksWithCloseby + partticks) * 2 * Math.PI / 180; + float starRadius = (float) TileCorporeaIndex.RADIUS * index.closeby + (index.closeby == 1F ? 0F : index.hasCloseby ? partialTicks : -partialTicks) * 0.2F; + double rads = (index.ticksWithCloseby + partialTicks) * 2 * Math.PI / 180; double starX = Math.cos(rads) * starRadius; double starZ = Math.sin(rads) * starRadius; int color = 0xFF00FF; diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileEnchanter.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileEnchanter.java index 6d9b654faa..87bfb6fe6f 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileEnchanter.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileEnchanter.java @@ -25,6 +25,7 @@ import org.lwjgl.opengl.GL11; import vazkii.botania.client.core.handler.ClientTickHandler; +import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.common.block.mana.BlockEnchanter; import vazkii.botania.common.block.tile.TileEnchanter; @@ -35,8 +36,8 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer { EntityItem item; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileEnchanter enchanter = (TileEnchanter) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileEnchanter enchanter = (TileEnchanter) tileEntity; float alphaMod = 0F; if(enchanter.stage == 2) @@ -55,12 +56,12 @@ else if(enchanter.stage > 2) GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glTranslatef(0.5F, 1.25F, 0.5F); - ((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(item, d0, d1, d2, 1F, f); + ((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(item, x, y, z, 1F, partialTicks); GL11.glTranslatef(-0.5F, -1.25F, -0.5F); } GL11.glPushMatrix(); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); GL11.glRotated(90F, 1F, 0F, 0F); GL11.glTranslatef(-2F, -2F, -0.001F); @@ -69,7 +70,7 @@ else if(enchanter.stage > 2) GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glDisable(GL11.GL_ALPHA_TEST); - float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.4D) * alphaMod; + float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + partialTicks) / 8D) + 1D) / 5D + 0.4D) * alphaMod; if(alpha > 0) { if(ShaderHelper.useShaders()) @@ -79,7 +80,7 @@ else if(enchanter.stage > 2) int lightmapX = light % 65536; int lightmapY = light / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); + GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + partialTicks) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); } Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); @@ -97,7 +98,7 @@ else if(enchanter.stage > 2) } ShaderHelper.useShader(ShaderHelper.enchanterRune); - renderIcon(0, 0, BlockEnchanter.overlay, 5, 5, 240); + RenderHelper.renderIcon(0, 0, BlockEnchanter.overlay, 5, 5, 240); ShaderHelper.releaseShader(); } @@ -106,16 +107,4 @@ else if(enchanter.stage > 2) GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glPopMatrix(); } - - public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setBrightness(brightness); - tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV()); - tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV()); - tessellator.draw(); - } - } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileFloatingFlower.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileFloatingFlower.java index e74b779420..756680da6a 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileFloatingFlower.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileFloatingFlower.java @@ -34,21 +34,21 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer { private static final ModelMiniIsland model = new ModelMiniIsland(); @Override - public void renderTileEntityAt(TileEntity tile, double d0, double d1, double d2, float t) { - IFloatingFlower flower = (IFloatingFlower) tile; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + IFloatingFlower flower = (IFloatingFlower) tileEntity; GL11.glPushMatrix(); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); - double worldTime = tile.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + t); - if(tile.getWorldObj() != null) - worldTime += new Random(tile.xCoord ^ tile.yCoord ^ tile.zCoord).nextInt(1000); + double worldTime = tileEntity.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + partialTicks); + if(tileEntity.getWorldObj() != null) + worldTime += new Random(tileEntity.xCoord ^ tileEntity.yCoord ^ tileEntity.zCoord).nextInt(1000); GL11.glTranslatef(0.5F, 0F, 0.5F); GL11.glRotatef(-((float) worldTime * 0.5F), 0F, 1F, 0F); GL11.glTranslatef(-0.5F, 0F, -0.5F); - if(tile.getWorldObj() != null) { + if(tileEntity.getWorldObj() != null) { GL11.glTranslatef(0F, (float) Math.sin(worldTime * 0.05F) * 0.1F, 0F); GL11.glRotatef(4F * (float) Math.sin(worldTime * 0.04F), 1F, 0F, 0F); } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileHourglass.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileHourglass.java index c5bb50574f..e0054c58bb 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileHourglass.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileHourglass.java @@ -31,8 +31,8 @@ public class RenderTileHourglass extends TileEntitySpecialRenderer { ModelHourglass model = new ModelHourglass(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks) { - TileHourglass hourglass = (TileHourglass) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double d0, double d1, double d2, float partialTicks) { + TileHourglass hourglass = (TileHourglass) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); @@ -41,11 +41,11 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glTranslated(d0, d1, d2); Minecraft.getMinecraft().renderEngine.bindTexture(texture); - int wtime = tileentity.getWorldObj() == null ? 0 : ClientTickHandler.ticksInGame; + int wtime = tileEntity.getWorldObj() == null ? 0 : ClientTickHandler.ticksInGame; if(wtime != 0) - wtime += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(360); + wtime += new Random(tileEntity.xCoord ^ tileEntity.yCoord ^ tileEntity.zCoord).nextInt(360); - float time = wtime == 0 ? 0 : wtime + ticks; + float time = wtime == 0 ? 0 : wtime + partialTicks; float x = 0.5F + (float) Math.cos(time * 0.05F) * 0.025F; float y = 0.55F + (float) (Math.sin(time * 0.04F) + 1F) * 0.05F; float z = 0.5F + (float) Math.sin(time * 0.05F) * 0.025F; @@ -57,7 +57,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub float rot = hourglass.flip ? 180F : 1F; if(hourglass.flipTicks > 0) - rot += (hourglass.flipTicks - ticks) * (180F / 4F); + rot += (hourglass.flipTicks - partialTicks) * (180F / 4F); GL11.glRotatef(rot, 0F, 0F, 1F); GL11.glScalef(1F, -1F, -1F); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileIncensePlate.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileIncensePlate.java index 3a786db708..d26b64ded4 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileIncensePlate.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileIncensePlate.java @@ -39,8 +39,8 @@ public class RenderTileIncensePlate extends TileEntitySpecialRenderer { ModelIncensePlate model = new ModelIncensePlate(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks) { - TileIncensePlate plate = (TileIncensePlate) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileIncensePlate plate = (TileIncensePlate) tileEntity; int meta = plate.getWorldObj() != null ? plate.getBlockMetadata() : 0; @@ -49,7 +49,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileLightRelay.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileLightRelay.java index 5213ecda3a..0c5f7ad94b 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileLightRelay.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileLightRelay.java @@ -28,9 +28,9 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float pticks) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { Minecraft mc = Minecraft.getMinecraft(); - IIcon iicon = tile.getBlockMetadata() > 0 ? BlockLightRelay.worldIconRed : BlockLightRelay.worldIcon; + IIcon iicon = tileEntity.getBlockMetadata() > 0 ? BlockLightRelay.worldIconRed : BlockLightRelay.worldIcon; GL11.glPushMatrix(); GL11.glTranslated(x + 0.5, y + 0.3, z + 0.5); @@ -39,7 +39,7 @@ public void renderTileEntityAt(TileEntity tile, double x, double y, double z, fl GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glAlphaFunc(GL11.GL_GREATER, 0.05F); - double time = ClientTickHandler.ticksInGame + pticks; + double time = ClientTickHandler.ticksInGame + partialTicks; GL11.glColor4f(1F, 1F, 1F, 1F); float scale = 0.75F; diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java index d0395960bc..6dbad8ebd9 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePool.java @@ -30,6 +30,7 @@ import vazkii.botania.api.mana.IPoolOverlayProvider; import vazkii.botania.client.core.handler.ClientTickHandler; import vazkii.botania.client.core.handler.MultiblockRenderHandler; +import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.client.lib.LibResources; import vazkii.botania.client.model.ModelPool; @@ -50,8 +51,8 @@ public class RenderTilePool extends TileEntitySpecialRenderer { public static int forceManaNumber = -1; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TilePool pool = (TilePool) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TilePool pool = (TilePool) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); @@ -59,10 +60,10 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glEnable(GL12.GL_RESCALE_NORMAL); float a = MultiblockRenderHandler.rendering ? 0.6F : 1F; GL11.glColor4f(1F, 1F, 1F, a); - GL11.glTranslated(d0, d1, d2); - boolean inf = tileentity.getWorldObj() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1; - boolean dil = tileentity.getWorldObj() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2; - boolean fab = tileentity.getWorldObj() == null ? forceMeta == 3 : tileentity.getBlockMetadata() == 3; + GL11.glTranslated(x, y, z); + boolean inf = tileEntity.getWorldObj() == null ? forceMeta == 1 : tileEntity.getBlockMetadata() == 1; + boolean dil = tileEntity.getWorldObj() == null ? forceMeta == 2 : tileEntity.getBlockMetadata() == 2; + boolean fab = tileEntity.getWorldObj() == null ? forceMeta == 3 : tileEntity.getBlockMetadata() == 3; Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture); @@ -70,8 +71,8 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glScalef(1F, -1F, -1F); if(fab) { float time = ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks; - if(tileentity != null) - time += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(100000); + if(tileEntity != null) + time += new Random(tileEntity.xCoord ^ tileEntity.yCoord ^ tileEntity.zCoord).nextInt(100000); Color color = Color.getHSBColor(time * 0.005F, 0.6F, 1F); GL11.glColor4ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) 255); @@ -112,12 +113,12 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDisable(GL11.GL_ALPHA_TEST); - GL11.glColor4f(1F, 1F, 1F, a * (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2)); + GL11.glColor4f(1F, 1F, 1F, a * (float) ((Math.sin((ClientTickHandler.ticksInGame + partialTicks) / 20.0) + 1) * 0.3 + 0.2)); GL11.glTranslatef(-0.5F, -1F - 0.43F, -0.5F); GL11.glRotatef(90F, 1F, 0F, 0F); GL11.glScalef(s, s, s); - renderIcon(0, 0, overlay, 16, 16, 240); + RenderHelper.renderIcon(0, 0, overlay, 16, 16, 240); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glDisable(GL11.GL_BLEND); @@ -138,7 +139,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glScalef(s, s, s); ShaderHelper.useShader(ShaderHelper.manaPool); - renderIcon(0, 0, BlockPool.manaIcon, 16, 16, 240); + RenderHelper.renderIcon(0, 0, BlockPool.manaIcon, 16, 16, 240); ShaderHelper.releaseShader(); GL11.glEnable(GL11.GL_ALPHA_TEST); @@ -151,16 +152,4 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub forceMana = false; forceManaNumber = -1; } - - public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setBrightness(brightness); - tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV()); - tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV()); - tessellator.draw(); - } - } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePrism.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePrism.java index e1c95c37cf..6f5f202330 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePrism.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePrism.java @@ -26,11 +26,11 @@ public class RenderTilePrism extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partTicks) { - TilePrism prism = (TilePrism) tile; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TilePrism prism = (TilePrism) tileEntity; GL11.glPushMatrix(); GL11.glTranslated(x, y, z); - float pos = (float) Math.sin((ClientTickHandler.ticksInGame + partTicks) * 0.05F) * 0.5F * (1F - 1F / 16F) - 0.5F; + float pos = (float) Math.sin((ClientTickHandler.ticksInGame + partialTicks) * 0.05F) * 0.5F * (1F - 1F / 16F) - 0.5F; ItemStack stack = prism.getStackInSlot(0); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java index 62e5611775..b9b573d97d 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePump.java @@ -32,13 +32,13 @@ public class RenderTilePump extends TileEntitySpecialRenderer { private static final ModelPump model = new ModelPump(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TilePump pump = (TilePump) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TilePump pump = (TilePump) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); int meta = pump.getWorldObj() != null ? pump.getBlockMetadata() : 0; @@ -46,7 +46,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glTranslatef(0.5F, 0.5F, 0.5F); GL11.glScalef(1F, -1F, -1F); GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F); - model.render(Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * f))); + model.render(Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * partialTicks))); GL11.glColor3f(1F, 1F, 1F); GL11.glScalef(1F, -1F, -1F); GL11.glEnable(GL12.GL_RESCALE_NORMAL); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java b/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java index 209fe9596d..e2f4129ff2 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTilePylon.java @@ -46,7 +46,7 @@ public class RenderTilePylon extends TileEntitySpecialRenderer { public static boolean pink = false; @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { if(model == null) model = ConfigHandler.oldPylonModel ? new ModelPylonOld() : new ModelPylon(); @@ -56,25 +56,25 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); float a = MultiblockRenderHandler.rendering ? 0.6F : 1F; GL11.glColor4f(1F, 1F, 1F, a); - if(tileentity.getWorldObj() != null) { - green = tileentity.getBlockMetadata() == 1; - pink = tileentity.getBlockMetadata() == 2; + if(tileEntity.getWorldObj() != null) { + green = tileEntity.getBlockMetadata() == 1; + pink = tileEntity.getBlockMetadata() == 2; } if(ConfigHandler.oldPylonModel) Minecraft.getMinecraft().renderEngine.bindTexture(pink ? texturePinkOld : green ? textureGreenOld : textureOld); else Minecraft.getMinecraft().renderEngine.bindTexture(pink ? texturePink : green ? textureGreen : texture); - double worldTime = tileentity.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + pticks); + double worldTime = tileEntity.getWorldObj() == null ? 0 : (double) (ClientTickHandler.ticksInGame + partialTicks); - if(tileentity != null) - worldTime += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(360); + if(tileEntity != null) + worldTime += new Random(tileEntity.xCoord ^ tileEntity.yCoord ^ tileEntity.zCoord).nextInt(360); if(ConfigHandler.oldPylonModel) { - GL11.glTranslated(d0 + 0.5, d1 + 2.2, d2 + 0.5); + GL11.glTranslated(x + 0.5, y + 2.2, z + 0.5); GL11.glScalef(1F, -1.5F, -1F); } else { - GL11.glTranslated(d0 + 0.2 + (green ? -0.1 : 0), d1 + 0.05, d2 + 0.8 + (green ? 0.1 : 0)); + GL11.glTranslated(x + 0.2 + (green ? -0.1 : 0), y + 0.05, z + 0.8 + (green ? 0.1 : 0)); float scale = green ? 0.8F : 0.6F; GL11.glScalef(scale, 0.6F, scale); } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileRedString.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileRedString.java index 24910351c5..0ff829438d 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileRedString.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileRedString.java @@ -18,8 +18,8 @@ public class RenderTileRedString extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partticks) { - TileRedString trs = (TileRedString) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileRedString trs = (TileRedString) tileEntity; RedStringRenderer.redStringTiles.add(trs); } } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileRuneAltar.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileRuneAltar.java index 245c62cd91..7440dc4d13 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileRuneAltar.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileRuneAltar.java @@ -39,8 +39,8 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer { RenderBlocks renderBlocks = new RenderBlocks(); @Override - public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partticks) { - TileRuneAltar altar = (TileRuneAltar) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileRuneAltar altar = (TileRuneAltar) tileEntity; GL11.glPushMatrix(); GL11.glColor4f(1F, 1F, 1F, 1F); @@ -58,7 +58,7 @@ public void renderTileEntityAt(TileEntity tileentity, double x, double y, double for(int i = 0; i < angles.length; i++) angles[i] = totalAngle += anglePer; - double time = ClientTickHandler.ticksInGame + partticks; + double time = ClientTickHandler.ticksInGame + partialTicks; for(int i = 0; i < altar.getSizeInventory(); i++) { GL11.glPushMatrix(); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileSkullOverride.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileSkullOverride.java index cf6705e050..ea5809b243 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileSkullOverride.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileSkullOverride.java @@ -34,8 +34,8 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer { public static final ModelSkullOverride modelSkull = new ModelSkullOverride(); @Override - public void renderTileEntityAt(TileEntitySkull p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { - render(p_147500_1_, (float) p_147500_2_, (float) p_147500_4_, (float) p_147500_6_, p_147500_1_.getBlockMetadata() & 7, p_147500_1_.func_145906_b() * 360 / 16.0F, p_147500_1_.func_145904_a(), p_147500_1_.func_152108_a()); + public void renderTileEntityAt(TileEntitySkull skull, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { + render(skull, (float) p_147500_2_, (float) p_147500_4_, (float) p_147500_6_, skull.getBlockMetadata() & 7, skull.func_145906_b() * 360 / 16.0F, skull.func_145904_a(), skull.func_152108_a()); } public void render(TileEntitySkull skull, float par1, float par2, float par3, int par4, float par5, int par6, GameProfile gameProfile) { diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileSparkChanger.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileSparkChanger.java index 97188418e1..222dba6091 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileSparkChanger.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileSparkChanger.java @@ -28,13 +28,13 @@ public class RenderTileSparkChanger extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { GL11.glPushMatrix(); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); GL11.glRotated(90F, 1F, 0F, 0F); GL11.glTranslatef(0.8F, 0.2F, -0.22F); GL11.glColor4f(1F, 1F, 1F, 1F); - ItemStack stack = ((TileSparkChanger) tileentity).getStackInSlot(0); + ItemStack stack = ((TileSparkChanger) tileEntity).getStackInSlot(0); if(stack != null) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileSpawnerClaw.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileSpawnerClaw.java index 92628dc63d..1c0af6d027 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileSpawnerClaw.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileSpawnerClaw.java @@ -27,11 +27,11 @@ public class RenderTileSpawnerClaw extends TileEntitySpecialRenderer { private static final ModelSpawnerClaw model = new ModelSpawnerClaw(); @Override - public void renderTileEntityAt(TileEntity var1, double d0, double d1, double d2, float var8) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(texture); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileSpreader.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileSpreader.java index e13a116c7c..14647d1f95 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileSpreader.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileSpreader.java @@ -47,12 +47,12 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer { private static final ModelSpreader model = new ModelSpreader(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks) { - TileSpreader spreader = (TileSpreader) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileSpreader spreader = (TileSpreader) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); GL11.glTranslatef(0.5F, 1.5F, 0.5F); GL11.glRotatef(spreader.rotationX + 90F, 0F, 1F, 0F); @@ -67,7 +67,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub Minecraft.getMinecraft().renderEngine.bindTexture(r); GL11.glScalef(1F, -1F, -1F); - double time = ClientTickHandler.ticksInGame + ticks; + double time = ClientTickHandler.ticksInGame + partialTicks; if(spreader.isULTRA_SPREADER()) { Color color = Color.getHSBColor((float) ((time * 5 + new Random(spreader.xCoord ^ spreader.yCoord ^ spreader.zCoord).nextInt(10000)) % 360) / 360F, 0.4F, 0.9F); @@ -77,7 +77,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glColor3f(1F, 1F, 1F); GL11.glPushMatrix(); - double worldTicks = tileentity.getWorldObj() == null ? 0 : time; + double worldTicks = tileEntity.getWorldObj() == null ? 0 : time; GL11.glRotatef((float) worldTicks % 360, 0F, 1F, 0F); GL11.glTranslatef(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F); model.renderCube(); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileStarfield.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileStarfield.java index b1991082ac..20ac70b9fe 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileStarfield.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileStarfield.java @@ -36,7 +36,7 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer { private static final Random field_147527_e = new Random(31100L); FloatBuffer field_147528_b = GLAllocation.createDirectFloatBuffer(16); @Override - public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { float f1 = (float)field_147501_a.field_147560_j; float f2 = (float)field_147501_a.field_147561_k; float f3 = (float)field_147501_a.field_147558_l; @@ -66,11 +66,11 @@ public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, doubl f6 = 0.5F; } - float f8 = (float)-(p_147500_4_ + f4); + float f8 = (float)-(y + f4); float f9 = f8 + ActiveRenderInfo.objectY; float f10 = f8 + f5 + ActiveRenderInfo.objectY; float f11 = f9 / f10; - f11 += (float)(p_147500_4_ + f4); + f11 += (float)(y + f4); GL11.glTranslatef(f1, f11, f3); GL11.glTexGeni(GL11.GL_S, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR); GL11.glTexGeni(GL11.GL_T, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR); @@ -105,10 +105,10 @@ public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, doubl float f13 = color.getBlue() / 255F; tessellator.setColorRGBA_F(f11 * f7, f12 * f7, f13 * f7, 1.0F); - tessellator.addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_); - tessellator.addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_ + 1.0D); - tessellator.addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_ + 1.0D); - tessellator.addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_); + tessellator.addVertex(x, y + f4, z); + tessellator.addVertex(x, y + f4, z + 1.0D); + tessellator.addVertex(x + 1.0D, y + f4, z + 1.0D); + tessellator.addVertex(x + 1.0D, y + f4, z); tessellator.draw(); GL11.glPopMatrix(); GL11.glMatrixMode(GL11.GL_MODELVIEW); diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileTerraPlate.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileTerraPlate.java index c87a336dfe..abfb22bfe8 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileTerraPlate.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileTerraPlate.java @@ -21,6 +21,7 @@ import org.lwjgl.opengl.GL11; import vazkii.botania.client.core.handler.ClientTickHandler; +import vazkii.botania.client.core.helper.RenderHelper; import vazkii.botania.client.core.helper.ShaderHelper; import vazkii.botania.common.block.mana.BlockTerraPlate; import vazkii.botania.common.block.tile.TileTerraPlate; @@ -28,13 +29,13 @@ public class RenderTileTerraPlate extends TileEntitySpecialRenderer { @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { - TileTerraPlate plate = (TileTerraPlate) tileentity; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileTerraPlate plate = (TileTerraPlate) tileEntity; float max = TileTerraPlate.MAX_MANA / 10F; float alphaMod = Math.min(max, plate.getCurrentMana()) / max; GL11.glPushMatrix(); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); GL11.glRotated(90F, 1F, 0F, 0F); GL11.glTranslatef(0F, 0F, -3F / 16F - 0.001F); @@ -43,7 +44,7 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glDisable(GL11.GL_ALPHA_TEST); - float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.6D) * alphaMod; + float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + partialTicks) / 8D) + 1D) / 5D + 0.6D) * alphaMod; if(ShaderHelper.useShaders()) GL11.glColor4f(1F, 1F, 1F, alpha); else { @@ -51,13 +52,13 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub int lightmapX = light % 65536; int lightmapY = light / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY); - GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); + GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + partialTicks) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha); } Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture); ShaderHelper.useShader(ShaderHelper.terraPlateRune); - renderIcon(0, 0, BlockTerraPlate.overlay, 1, 1, 240); + RenderHelper.renderIcon(0, 0, BlockTerraPlate.overlay, 1, 1, 240); ShaderHelper.releaseShader(); GL11.glEnable(GL11.GL_ALPHA_TEST); @@ -65,16 +66,4 @@ public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, doub GL11.glColor4f(1F, 1F, 1F, 1F); GL11.glPopMatrix(); } - - public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) { - Tessellator tessellator = Tessellator.instance; - tessellator.startDrawingQuads(); - tessellator.setBrightness(brightness); - tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV()); - tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV()); - tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV()); - tessellator.draw(); - } - } diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileTeruTeruBozu.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileTeruTeruBozu.java index adcb0cbc97..3bc99baca5 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileTeruTeruBozu.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileTeruTeruBozu.java @@ -32,20 +32,20 @@ public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer { ModelTeruTeruBozu model = new ModelTeruTeruBozu(); @Override - public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) { + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_BLEND); GL11.glDisable(GL11.GL_CULL_FACE); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft.getMinecraft().renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture); GL11.glRotatef(180F, 1F, 0F, 0F); - double time = Botania.proxy.getWorldElapsedTicks() + f; - boolean hasWorld = tileentity.getWorldObj() != null; + double time = Botania.proxy.getWorldElapsedTicks() + partialTicks; + boolean hasWorld = tileEntity.getWorldObj() != null; if(hasWorld) - time += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(1000); + time += new Random(tileEntity.xCoord ^ tileEntity.yCoord ^ tileEntity.zCoord).nextInt(1000); GL11.glTranslatef(0.5F, -1.25F + (hasWorld ? (float) Math.sin(time * 0.01F) * 0.05F : 0F), -0.5F); if(hasWorld) { diff --git a/src/main/java/vazkii/botania/client/render/tile/RenderTileTinyPotato.java b/src/main/java/vazkii/botania/client/render/tile/RenderTileTinyPotato.java index d8883a54a7..986193371e 100644 --- a/src/main/java/vazkii/botania/client/render/tile/RenderTileTinyPotato.java +++ b/src/main/java/vazkii/botania/client/render/tile/RenderTileTinyPotato.java @@ -49,12 +49,12 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer { private static final ModelTinyPotato model = new ModelTinyPotato(); @Override - public void renderTileEntityAt(TileEntity var1, double d0, double d1, double d2, float var8) { - TileTinyPotato potato = (TileTinyPotato) var1; + public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) { + TileTinyPotato potato = (TileTinyPotato) tileEntity; GL11.glPushMatrix(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glColor4f(1F, 1F, 1F, 1F); - GL11.glTranslated(d0, d1, d2); + GL11.glTranslated(x, y, z); Minecraft mc = Minecraft.getMinecraft(); mc.renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture); @@ -91,7 +91,7 @@ public void renderTileEntityAt(TileEntity var1, double d0, double d1, double d2, float jump = potato.jumpTicks; if(jump > 0) - jump -= var8; + jump -= partialTicks; float up = (float) -Math.abs(Math.sin(jump / 10 * Math.PI)) * 0.2F; float rotZ = (float) Math.sin(jump / 10 * Math.PI) * 2; @@ -251,7 +251,7 @@ else if(name.equals("dinnerbone") || name.equals("grumm")) { GL11.glScalef(1.5F, 1.5F, 1.5F); GL11.glTranslatef(0F, 0.7F, 0F); GL11.glRotatef(90F, 0F, 1F, 0F); - ItemFlightTiara.renderHalo(null, var8); + ItemFlightTiara.renderHalo(null, partialTicks); } else if(name.equals("nebris")) { mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture); GL11.glRotatef(180F, 1F, 0F, 0F); @@ -326,7 +326,7 @@ else if(name.equals("dinnerbone") || name.equals("grumm")) { GL11.glPopMatrix(); } - MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8)); + MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, x, y, z, partialTicks)); GL11.glRotatef(-rotZ, 0F, 0F, 1F); GL11.glRotatef(-rotY, 0F, 1F, 0F); diff --git a/src/main/java/vazkii/botania/common/block/decor/BlockReeds.java b/src/main/java/vazkii/botania/common/block/decor/BlockReeds.java index f99c1319bb..1c079775b9 100644 --- a/src/main/java/vazkii/botania/common/block/decor/BlockReeds.java +++ b/src/main/java/vazkii/botania/common/block/decor/BlockReeds.java @@ -61,12 +61,12 @@ public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer play } @Override - protected IIcon getSideIcon(int p_150163_1_) { + protected IIcon getSideIcon(int lowBits) { return blockIcon; } @Override - protected IIcon getTopIcon(int p_150161_1_) { + protected IIcon getTopIcon(int lowBits) { return topIcon; } diff --git a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java index d24ce3dc48..028a54c6e2 100644 --- a/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java +++ b/src/main/java/vazkii/botania/common/core/helper/InventoryHelper.java @@ -236,19 +236,19 @@ public GenericInventory(String name, boolean isInvNameLocalized, int size) { } @Override - public ItemStack decrStackSize(int par1, int par2) { - if(inventoryContents[par1] != null) { + public ItemStack decrStackSize(int slot, int count) { + if(inventoryContents[slot] != null) { ItemStack itemstack; - if(inventoryContents[par1].stackSize <= par2) { - itemstack = inventoryContents[par1]; - inventoryContents[par1] = null; + if(inventoryContents[slot].stackSize <= count) { + itemstack = inventoryContents[slot]; + inventoryContents[slot] = null; return itemstack; } - itemstack = inventoryContents[par1].splitStack(par2); - if(inventoryContents[par1].stackSize == 0) - inventoryContents[par1] = null; + itemstack = inventoryContents[slot].splitStack(count); + if(inventoryContents[slot].stackSize == 0) + inventoryContents[slot] = null; return itemstack; } diff --git a/src/main/java/vazkii/botania/common/core/helper/Vector3.java b/src/main/java/vazkii/botania/common/core/helper/Vector3.java index 02c47ba543..445f113db8 100644 --- a/src/main/java/vazkii/botania/common/core/helper/Vector3.java +++ b/src/main/java/vazkii/botania/common/core/helper/Vector3.java @@ -39,10 +39,10 @@ public class Vector3 public Vector3() { } - public Vector3(double d, double d1, double d2) { - x = d; - y = d1; - z = d2; + public Vector3(double x, double y, double z) { + this.x = x; + this.y = y; + this.z = z; } public Vector3(Vector3 vec) { diff --git a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java index 5e632b0233..d157f3dec8 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java +++ b/src/main/java/vazkii/botania/common/entity/EntityDoppleganger.java @@ -366,14 +366,14 @@ public void readEntityFromNBT(NBTTagCompound par1nbtTagCompound) { } @Override - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { - Entity e = par1DamageSource.getEntity(); - if((par1DamageSource.damageType.equals("player") || e instanceof EntityPixie) && e != null && isTruePlayer(e) && getInvulTime() == 0) { + public boolean attackEntityFrom(DamageSource source, float amount) { + Entity e = source.getEntity(); + if((source.damageType.equals("player") || e instanceof EntityPixie) && e != null && isTruePlayer(e) && getInvulTime() == 0) { EntityPlayer player = (EntityPlayer) e; if(!playersWhoAttacked.contains(player.getCommandSenderName())) playersWhoAttacked.add(player.getCommandSenderName()); - float dmg = par2; + float dmg = amount; boolean crit = false; if(e instanceof EntityPlayer) { EntityPlayer p = (EntityPlayer) e; @@ -381,7 +381,7 @@ public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { } int cap = crit ? 60 : 40; - return super.attackEntityFrom(par1DamageSource, Math.min(cap, dmg) * (isHardMode() ? 0.6F : 1F)); + return super.attackEntityFrom(source, Math.min(cap, dmg) * (isHardMode() ? 0.6F : 1F)); } return false; } @@ -420,8 +420,8 @@ protected void damageEntity(DamageSource par1DamageSource, float par2) { } @Override - public void onDeath(DamageSource p_70645_1_) { - super.onDeath(p_70645_1_); + public void onDeath(DamageSource source) { + super.onDeath(source); EntityLivingBase entitylivingbase = func_94060_bK(); if(entitylivingbase instanceof EntityPlayer) { ((EntityPlayer) entitylivingbase).addStat(ModAchievements.gaiaGuardianKill, 1); diff --git a/src/main/java/vazkii/botania/common/entity/EntityFlameRing.java b/src/main/java/vazkii/botania/common/entity/EntityFlameRing.java index b77f34f00a..bf04086851 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityFlameRing.java +++ b/src/main/java/vazkii/botania/common/entity/EntityFlameRing.java @@ -89,7 +89,7 @@ public void onEntityUpdate() { } @Override - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { + public boolean attackEntityFrom(DamageSource source, float amount) { return false; } diff --git a/src/main/java/vazkii/botania/common/entity/EntityFlyingCreature.java b/src/main/java/vazkii/botania/common/entity/EntityFlyingCreature.java index b9c27de8c4..dd7ba47904 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityFlyingCreature.java +++ b/src/main/java/vazkii/botania/common/entity/EntityFlyingCreature.java @@ -17,30 +17,30 @@ public class EntityFlyingCreature extends EntityAmbientCreature { - public EntityFlyingCreature(World par1World) { - super(par1World); + public EntityFlyingCreature(World world) { + super(world); } @Override - protected void fall(float par1) { + protected void fall(float distance) { // NO-OP } @Override - protected void updateFallState(double par1, boolean par3) { + protected void updateFallState(double distanceFallenThisTick, boolean isOnGround) { // NO-OP } @Override - public void moveEntityWithHeading(float par1, float par2) { + public void moveEntityWithHeading(float strafe, float forward) { if(isInWater()) { - moveFlying(par1, par2, 0.02F); + moveFlying(strafe, forward, 0.02F); moveEntity(motionX, motionY, motionZ); motionX *= 0.800000011920929D; motionY *= 0.800000011920929D; motionZ *= 0.800000011920929D; } else if(handleLavaMovement()) { - moveFlying(par1, par2, 0.02F); + moveFlying(strafe, forward, 0.02F); moveEntity(motionX, motionY, motionZ); motionX *= 0.5D; motionY *= 0.5D; @@ -55,7 +55,7 @@ public void moveEntityWithHeading(float par1, float par2) { } float f3 = 0.16277136F / (f2 * f2 * f2); - moveFlying(par1, par2, onGround ? 0.1F * f3 : 0.02F); + moveFlying(strafe, forward, onGround ? 0.1F * f3 : 0.02F); f2 = 0.91F; if (onGround) { diff --git a/src/main/java/vazkii/botania/common/entity/EntityMagicLandmine.java b/src/main/java/vazkii/botania/common/entity/EntityMagicLandmine.java index 8d56c4336a..2f5463f7d4 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityMagicLandmine.java +++ b/src/main/java/vazkii/botania/common/entity/EntityMagicLandmine.java @@ -26,8 +26,8 @@ public class EntityMagicLandmine extends Entity { public EntityDoppleganger summoner; - public EntityMagicLandmine(World par1World) { - super(par1World); + public EntityMagicLandmine(World world) { + super(world); setSize(0F, 0F); } diff --git a/src/main/java/vazkii/botania/common/entity/EntityPinkWither.java b/src/main/java/vazkii/botania/common/entity/EntityPinkWither.java index 8d050076eb..c7851aea47 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityPinkWither.java +++ b/src/main/java/vazkii/botania/common/entity/EntityPinkWither.java @@ -37,17 +37,17 @@ public void onLivingUpdate() { } @Override - public void setAttackTarget(EntityLivingBase p_70624_1_) { + public void setAttackTarget(EntityLivingBase target) { // NO-OP } @Override - protected void attackEntity(Entity p_70785_1_, float p_70785_2_) { + protected void attackEntity(Entity entity, float distanceToEntity) { // NO-OP } @Override - public boolean attackEntityAsMob(Entity p_70652_1_) { + public boolean attackEntityAsMob(Entity victim) { return false; } @@ -66,7 +66,7 @@ protected boolean isAIEnabled() { } @Override - protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) { + protected void dropFewItems(boolean playerKill, int looting) { // NO-OP } diff --git a/src/main/java/vazkii/botania/common/entity/EntityPixie.java b/src/main/java/vazkii/botania/common/entity/EntityPixie.java index 870a13f720..4212242885 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityPixie.java +++ b/src/main/java/vazkii/botania/common/entity/EntityPixie.java @@ -95,9 +95,9 @@ protected void updateEntityActionState() { } @Override - public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { - if(getType() == 0 && par1DamageSource.getEntity() != summoner || getType() == 1 && par1DamageSource.getEntity() instanceof EntityPlayer) - return super.attackEntityFrom(par1DamageSource, par2); + public boolean attackEntityFrom(DamageSource source, float amount) { + if(getType() == 0 && source.getEntity() != summoner || getType() == 1 && source.getEntity() instanceof EntityPlayer) + return super.attackEntityFrom(source, amount); return false; } diff --git a/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java b/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java index 01e1f8f7ce..09e928064a 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java +++ b/src/main/java/vazkii/botania/common/entity/EntityPoolMinecart.java @@ -62,8 +62,8 @@ public int getMinecartType() { } @Override - public void killMinecart(DamageSource p_94095_1_) { - super.killMinecart(p_94095_1_); + public void killMinecart(DamageSource source) { + super.killMinecart(source); func_145778_a(Item.getItemFromBlock(ModBlocks.pool), 1, 0.0F); } diff --git a/src/main/java/vazkii/botania/common/entity/EntitySignalFlare.java b/src/main/java/vazkii/botania/common/entity/EntitySignalFlare.java index bcecb6ffbf..c085fda875 100644 --- a/src/main/java/vazkii/botania/common/entity/EntitySignalFlare.java +++ b/src/main/java/vazkii/botania/common/entity/EntitySignalFlare.java @@ -20,8 +20,8 @@ public class EntitySignalFlare extends Entity { private static final String COLOR_TAG = "color"; - public EntitySignalFlare(World par1World) { - super(par1World); + public EntitySignalFlare(World world) { + super(world); setSize(0F, 0F); dataWatcher.addObject(30, 0); dataWatcher.setObjectWatched(30); diff --git a/src/main/java/vazkii/botania/common/entity/EntityThrownItem.java b/src/main/java/vazkii/botania/common/entity/EntityThrownItem.java index bba68628fd..5643cc1ee2 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityThrownItem.java +++ b/src/main/java/vazkii/botania/common/entity/EntityThrownItem.java @@ -25,8 +25,8 @@ public class EntityThrownItem extends EntityItem { - public EntityThrownItem(World par1World) { - super(par1World); + public EntityThrownItem(World world) { + super(world); } public EntityThrownItem(World worldIn, double x, diff --git a/src/main/java/vazkii/botania/common/entity/EntityVineBall.java b/src/main/java/vazkii/botania/common/entity/EntityVineBall.java index cfeadd7231..58fb51b1ab 100644 --- a/src/main/java/vazkii/botania/common/entity/EntityVineBall.java +++ b/src/main/java/vazkii/botania/common/entity/EntityVineBall.java @@ -20,8 +20,8 @@ public class EntityVineBall extends EntityThrowable { - public EntityVineBall(World par1World) { - super(par1World); + public EntityVineBall(World world) { + super(world); dataWatcher.addObject(30, 0F); dataWatcher.setObjectWatched(30); }