Great Renaming 3 - Misc. (#110)

This commit is contained in:
Nikolay S. authored and GitHub committed 2025-11-17 10:33:05 +01:00
1 parent d407ca2c31
commit bba06bcf46
71 files changed
+506 -529

No files matched your search

@@ -51,9 +51,9 @@ public class MultiblockBlockAccess implements IBlockAccess {
}
@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;
}
@@ -12,12 +12,12 @@ package vazkii.botania.client.core.helper;
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) {
@@ -20,6 +20,7 @@ import net.minecraft.client.renderer.entity.RenderItem;
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 final class RenderHelper {
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 final class RenderHelper {
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 final class RenderHelper {
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 final class RenderHelper {
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();
}
}
@@ -162,85 +162,96 @@ public class FXSparkle extends EntityFX {
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;
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(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 (!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 (var16 && var10 < var23) {
var23 = var10;
var22 = 0;
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;
float mainVel = rand.nextFloat() * 0.05F + 0.025F;
float sideVel1 = (rand.nextFloat() - rand.nextFloat()) * 0.1F;
float sideVel2 = (rand.nextFloat() - rand.nextFloat()) * 0.1F;
if (var22 == 0) {
motionX = -var25;
motionY=motionZ=var26;
}
switch(direction) {
case 0 -> {
motionX = -mainVel;
motionY = sideVel1;
motionZ = sideVel2;
}
if (var22 == 1) {
motionX = var25;
motionY=motionZ=var26;
}
case 1 -> {
motionX = mainVel;
motionY = sideVel1;
motionZ = sideVel2;
}
if (var22 == 2) {
motionY = -var25;
motionX=motionZ=var26;
}
case 2 -> {
motionY = -mainVel;
motionX = sideVel1;
motionZ = sideVel2;
}
if (var22 == 3) {
motionY = var25;
motionX=motionZ=var26;
}
case 3 -> {
motionY = mainVel;
motionX = sideVel1;
motionZ = sideVel2;
}
if (var22 == 4) {
motionZ = -var25;
motionY=motionX=var26;
}
case 4 -> {
motionZ = -mainVel;
motionY = sideVel1;
motionX = sideVel2;
}
if (var22 == 5) {
motionZ = var25;
motionY=motionX=var26;
case 5 -> {
motionZ = mainVel;
motionY = sideVel1;
motionX = sideVel2;
}
default -> {}
}
return true;
@@ -17,12 +17,12 @@ import net.minecraft.item.ItemStack;
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;
}
@@ -83,9 +83,9 @@ public class ContainerBaubleBox extends Container {
}
@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
@@ -193,15 +193,15 @@ public class GuiLexicon extends GuiScreen {
}
@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 class GuiLexicon extends GuiScreen {
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 class GuiLexicon extends GuiScreen {
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 @@ public class GuiLexicon extends GuiScreen {
}
@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 @@ public class GuiLexicon extends GuiScreen {
} else {
PersistentVariableHelper.lastBotaniaVersion = LibMisc.VERSION;
PersistentVariableHelper.saveSafe();
par1GuiButton.visible = false;
par1GuiButton.enabled = false;
button.visible = false;
button.enabled = false;
}
break;
@@ -394,9 +394,9 @@ public class GuiLexicon extends GuiScreen {
}
}
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 @@ public class GuiLexicon extends GuiScreen {
}
@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 @@ public class GuiLexicon extends GuiScreen {
}
} 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 class GuiLexicon extends GuiScreen {
changed = true;
}
if((ChatAllowedCharacters.isAllowedCharacter(par1) || par2 == 28) && note.length() < 250) {
note += par2 == 28 ? "<br>" : par1;
if((ChatAllowedCharacters.isAllowedCharacter(typedChar) || keyCode == 28) && note.length() < 250) {
note += keyCode == 28 ? "<br>" : typedChar;
changed = true;
}
@@ -60,8 +60,8 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
}
@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 class GuiLexiconChallenge extends GuiLexicon implements IParented {
}
@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;
}
@@ -54,8 +54,8 @@ public class GuiLexiconChallengesList extends GuiLexicon implements IParented {
}
@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 class GuiLexiconChallengesList extends GuiLexicon implements IParented {
}
@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;
}
@@ -129,16 +129,16 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@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 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
updatePageButtons();
currentPage.onActionPerformed(this, par1GuiButton);
currentPage.onActionPerformed(this, button);
}
public GuiLexiconEntry setFirstEntry() {
@@ -193,11 +193,11 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@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 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@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 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
}
@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();
}
@@ -177,8 +177,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
}
@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 class GuiLexiconIndex extends GuiLexicon implements IParented {
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 class GuiLexiconIndex extends GuiLexicon implements IParented {
}
@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 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
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 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
}
@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 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
}
@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() {
@@ -29,11 +29,11 @@ public class GuiButtonAchievement extends GuiButtonLexicon {
}
@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 class GuiButtonAchievement extends GuiButtonLexicon {
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -23,24 +23,24 @@ import vazkii.botania.client.gui.lexicon.GuiLexicon;
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<String> tooltip = getTooltip();
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -18,8 +18,8 @@ import net.minecraft.util.StatCollector;
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
@@ -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<String> tooltip = new ArrayList<>();
@@ -35,7 +35,7 @@ public class GuiButtonBookmark extends GuiButtonLexicon {
int tooltipY = (tooltip.size() + 1) * 5;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -72,8 +72,8 @@ public class GuiButtonCategory extends GuiButtonLexicon {
}
@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);
@@ -34,20 +34,20 @@ public class GuiButtonChallengeIcon extends GuiButtonLexicon {
}
@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 class GuiButtonChallengeIcon extends GuiButtonLexicon {
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);
}
}
@@ -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<String> tooltip = new ArrayList<>();
@@ -38,7 +38,7 @@ public class GuiButtonChallengeInfo extends GuiButtonLexicon {
int tooltipY = (tooltip.size() + 1) * 5;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -29,11 +29,11 @@ public class GuiButtonChallenges extends GuiButtonLexicon {
}
@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 class GuiButtonChallenges extends GuiButtonLexicon {
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -34,14 +34,14 @@ public class GuiButtonDoot extends GuiButtonLexicon {
}
@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);
@@ -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<String> tooltip = new ArrayList<>();
@@ -40,7 +40,7 @@ public class GuiButtonHistory extends GuiButtonLexicon {
int tooltipY = (tooltip.size() + 1) * 5;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -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 class GuiButtonInvisible extends GuiButtonLexicon {
}
@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 class GuiButtonInvisible extends GuiButtonLexicon {
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 class GuiButtonInvisible extends GuiButtonLexicon {
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);
}
@@ -17,8 +17,8 @@ import net.minecraft.util.ResourceLocation;
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
@@ -32,11 +32,11 @@ public class GuiButtonNotes extends GuiButtonLexicon {
}
@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 class GuiButtonNotes extends GuiButtonLexicon {
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -29,11 +29,11 @@ public class GuiButtonOptions extends GuiButtonLexicon {
}
@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 class GuiButtonOptions extends GuiButtonLexicon {
int tooltipY = (tooltip.size() - 1) * 10;
if(k == 2)
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX, mouseY + tooltipY, tooltip);
}
}
@@ -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")));
}
}
@@ -24,23 +24,23 @@ import vazkii.botania.client.gui.lexicon.GuiLexicon;
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<String> 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<String> getTooltip() {
@@ -31,16 +31,16 @@ public class GuiButtonUpdateWarning extends GuiButtonLexicon {
}
@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 class GuiButtonUpdateWarning extends GuiButtonLexicon {
int tooltipY = (tooltip.size() - 1) * 10 - 25;
if(k == 2)
RenderHelper.renderTooltip(par2 - 125, par3 + tooltipY, tooltip);
RenderHelper.renderTooltip(mouseX - 125, mouseY + tooltipY, tooltip);
}
}
@@ -29,18 +29,18 @@ public class GuiButtonViewOnline extends GuiButtonLexicon {
}
@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<String> 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);
}
}
@@ -27,32 +27,30 @@ public class RenderDoubleFlower implements ISimpleBlockRenderingHandler {
}
@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;
}
@@ -63,17 +63,17 @@ public class RenderPixie extends RenderLiving {
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 @@ public class RenderPixie extends RenderLiving {
}
@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);
}
}
@@ -20,20 +20,21 @@ import net.minecraft.util.IIcon;
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 class RenderTileAlfPortal extends TileEntitySpecialRenderer {
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 class RenderTileAlfPortal extends TileEntitySpecialRenderer {
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 class RenderTileAlfPortal extends TileEntitySpecialRenderer {
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();
}
}
@@ -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 class RenderTileAltar extends TileEntitySpecialRenderer {
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();
@@ -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;
@@ -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 class RenderTileBellows extends TileEntitySpecialRenderer {
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);
@@ -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;
@@ -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 class RenderTileCocoon extends TileEntitySpecialRenderer {
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);
@@ -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 class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
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 class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
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 class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
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);
}
@@ -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 class RenderTileCorporeaIndex extends TileEntitySpecialRenderer {
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;
@@ -25,6 +25,7 @@ import net.minecraft.util.IIcon;
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 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
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 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
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 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
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 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
}
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 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
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();
}
}
@@ -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);
}
@@ -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 class RenderTileHourglass extends TileEntitySpecialRenderer {
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 class RenderTileHourglass extends TileEntitySpecialRenderer {
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);
@@ -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 class RenderTileIncensePlate extends TileEntitySpecialRenderer {
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);
@@ -28,9 +28,9 @@ import vazkii.botania.common.block.BlockLightRelay;
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 class RenderTileLightRelay extends TileEntitySpecialRenderer {
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;
@@ -30,6 +30,7 @@ import org.lwjgl.opengl.GL12;
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 class RenderTilePool extends TileEntitySpecialRenderer {
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 class RenderTilePool extends TileEntitySpecialRenderer {
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 class RenderTilePool extends TileEntitySpecialRenderer {
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 class RenderTilePool extends TileEntitySpecialRenderer {
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 class RenderTilePool extends TileEntitySpecialRenderer {
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();
}
}
@@ -26,11 +26,11 @@ import vazkii.botania.common.block.tile.mana.TilePrism;
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);
@@ -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 class RenderTilePump extends TileEntitySpecialRenderer {
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);
@@ -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 class RenderTilePylon extends TileEntitySpecialRenderer {
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);
}
@@ -18,8 +18,8 @@ import vazkii.botania.common.block.tile.string.TileRedString;
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);
}
}
@@ -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 class RenderTileRuneAltar extends TileEntitySpecialRenderer {
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();
@@ -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) {
@@ -28,13 +28,13 @@ import vazkii.botania.common.block.tile.TileSparkChanger;
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);
@@ -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);
@@ -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 class RenderTileSpreader extends TileEntitySpecialRenderer {
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 class RenderTileSpreader extends TileEntitySpecialRenderer {
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();
@@ -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 class RenderTileStarfield extends TileEntitySpecialRenderer {
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 class RenderTileStarfield extends TileEntitySpecialRenderer {
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);
@@ -21,6 +21,7 @@ import net.minecraft.util.IIcon;
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 @@ import vazkii.botania.common.block.tile.TileTerraPlate;
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 class RenderTileTerraPlate extends TileEntitySpecialRenderer {
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 class RenderTileTerraPlate extends TileEntitySpecialRenderer {
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 class RenderTileTerraPlate extends TileEntitySpecialRenderer {
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();
}
}
@@ -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) {
@@ -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 class RenderTileTinyPotato extends TileEntitySpecialRenderer {
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 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
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 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
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);
@@ -61,12 +61,12 @@ public class BlockReeds extends BlockRotatedPillar implements ILexiconable {
}
@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;
}
@@ -236,19 +236,19 @@ public class InventoryHelper {
}
@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;
}
@@ -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) {
@@ -366,14 +366,14 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
}
@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 class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
}
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 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
}
@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);
@@ -89,7 +89,7 @@ public class EntityFlameRing extends Entity {
}
@Override
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) {
public boolean attackEntityFrom(DamageSource source, float amount) {
return false;
}
@@ -17,30 +17,30 @@ import net.minecraft.world.World;
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 class EntityFlyingCreature extends EntityAmbientCreature {
}
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) {
@@ -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);
}
@@ -37,17 +37,17 @@ public class EntityPinkWither extends EntityWither {
}
@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 @@ public class EntityPinkWither extends EntityWither {
}
@Override
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) {
protected void dropFewItems(boolean playerKill, int looting) {
// NO-OP
}
@@ -95,9 +95,9 @@ public class EntityPixie extends EntityFlyingCreature {
}
@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;
}
@@ -62,8 +62,8 @@ public class EntityPoolMinecart extends EntityMinecart {
}
@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);
}
@@ -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);
@@ -25,8 +25,8 @@ import vazkii.botania.common.core.helper.Vector3;
public class EntityThrownItem extends EntityItem {
public EntityThrownItem(World par1World) {
super(par1World);
public EntityThrownItem(World world) {
super(world);
}
public EntityThrownItem(World worldIn, double x,
@@ -20,8 +20,8 @@ import vazkii.botania.common.block.ModBlocks;
public class EntityVineBall extends EntityThrowable {
public EntityVineBall(World par1World) {
super(par1World);
public EntityVineBall(World world) {
super(world);
dataWatcher.addObject(30, 0F);
dataWatcher.setObjectWatched(30);
}