More find-replace

This commit is contained in:
Vincent Lee committed 2017-06-17 08:59:48 -05:00
1 parent bf0e3bb1c7
commit 174fdfd2a5
21 files changed
+55 -54

No files matched your search

@@ -639,8 +639,8 @@ public class GuiLexicon extends GuiScreen {
}
public void orientTutorialArrowWithButton(GuiButton button) {
tutorialArrowX = button.xPosition - TUTORIAL_ARROW_WIDTH;
tutorialArrowY = button.yPosition - TUTORIAL_ARROW_HEIGHT;
tutorialArrowX = button.x - TUTORIAL_ARROW_WIDTH;
tutorialArrowY = button.y - TUTORIAL_ARROW_HEIGHT;
}
boolean closeScreenOnInvKey() {
@@ -210,8 +210,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
int x;
int y;
x = currentButton.xPosition - 20;
y = currentButton.yPosition;
x = currentButton.x - 20;
y = currentButton.y;
mc.fontRenderer.drawStringWithShadow("?", x, y, 0xFFFFFF);
GlStateManager.scale(0.5F, 0.5F, 1F);
@@ -223,8 +223,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
if(currentButton != null && infoTime > 0) {
float fract = infoTime / animationTime;
int x = currentButton.xPosition;
int y = currentButton.yPosition;
int x = currentButton.x;
int y = currentButton.y;
String s = I18n.format(currentEntry.getTagline());
boolean unicode = mc.fontRenderer.getUnicodeFlag();
mc.fontRenderer.setUnicodeFlag(true);
@@ -30,12 +30,12 @@ public class GuiButtonAchievement extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 191, 11, 11);
drawTexturedModalRect(x, y, k == 2 ? 109 : 98, 191, 11, 11);
List<String> tooltip = new ArrayList<>();
tooltip.add(TextFormatting.GREEN + I18n.format("botaniamisc.achievements"));
@@ -30,12 +30,12 @@ public class GuiButtonBack extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
if(enabled) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, 36, k == 2 ? 180 : 189, 18, 9);
drawTexturedModalRect(x, y, 36, k == 2 ? 180 : 189, 18, 9);
List<String> tooltip = getTooltip();
int tooltipY = (tooltip.size() - 1) * 10;
@@ -22,8 +22,8 @@ public class GuiButtonBookmark extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft mc, int par2, int par3) {
gui.drawBookmark(xPosition, yPosition, displayString, false);
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
gui.drawBookmark(x, y, displayString, false);
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
List<String> tooltip = new ArrayList<>();
@@ -75,7 +75,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft mc, int mx, int my) {
boolean inside = mx >= xPosition && my >= yPosition && mx < xPosition + width && my < yPosition + height;
boolean inside = mx >= x && my >= y && mx < x + width && my < y + height;
if(inside)
ticksHovered = Math.min(time, ticksHovered + gui.timeDelta);
else ticksHovered = Math.max(0F, ticksHovered - gui.timeDelta);
@@ -111,7 +111,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
}
ShaderHelper.useShader(ShaderHelper.categoryButton, shaderCallback);
RenderHelper.drawTexturedModalRect(xPosition * 2, yPosition * 2, zLevel * 2, 0, 0, 32, 32, s, s);
RenderHelper.drawTexturedModalRect(x * 2, y * 2, zLevel * 2, 0, 0, 32, 32, s, s);
ShaderHelper.releaseShader();
if(shaders) {
@@ -33,19 +33,19 @@ public class GuiButtonChallengeIcon extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.enableRescaleNormal();
par1Minecraft.getRenderItem().renderItemIntoGUI(challenge.icon, xPosition, yPosition);
par1Minecraft.getRenderItem().renderItemIntoGUI(challenge.icon, x, y);
RenderHelper.disableStandardItemLighting();
GlStateManager.enableBlend();
if(challenge.complete) {
GlStateManager.disableDepth();
par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 9, 0x004C00);
par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 8, 0x0BD20D);
par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", x + 10, y + 9, 0x004C00);
par1Minecraft.fontRenderer.drawStringWithShadow("\u2714", x + 10, y + 8, 0x0BD20D);
GlStateManager.enableDepth();
}
@@ -31,8 +31,8 @@ public class GuiButtonChallengeInfo extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft mc, int par2, int par3) {
gui.drawBookmark(xPosition, yPosition, displayString, false);
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
gui.drawBookmark(x, y, displayString, false);
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
List<String> tooltip = new ArrayList<>();
@@ -30,12 +30,12 @@ public class GuiButtonChallenges extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 131 : 120, 180, 11, 11);
drawTexturedModalRect(x, y, k == 2 ? 131 : 120, 180, 11, 11);
List<String> tooltip = new ArrayList();
tooltip.add(TextFormatting.GREEN + I18n.format("botaniamisc.challenges"));
@@ -34,13 +34,13 @@ public class GuiButtonDoot extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
GlStateManager.color(1F, 1F, 1F, 1F);
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.cacophonium), xPosition, yPosition);
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(Items.FIREWORKS), xPosition + 8, yPosition + 2);
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.cacophonium), x, y);
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(Items.FIREWORKS), x + 8, y + 2);
GlStateManager.disableLighting();
@@ -50,7 +50,7 @@ public class GuiButtonDoot extends GuiButtonLexicon {
tooltip.add(TextFormatting.GRAY + "doot doot");
if(k == 2)
RenderHelper.renderTooltip(xPosition - 100, yPosition + 36, tooltip);
RenderHelper.renderTooltip(x - 100, y + 36, tooltip);
GlStateManager.enableAlpha();
}
@@ -32,8 +32,8 @@ public class GuiButtonHistory extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft mc, int par2, int par3) {
gui.drawBookmark(xPosition, yPosition, displayString, false);
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
gui.drawBookmark(x, y, displayString, false);
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
List<String> tooltip = new ArrayList<>();
@@ -59,13 +59,13 @@ public class GuiButtonInvisible extends GuiButtonLexicon {
float f = 1F / 64F;
GlStateManager.translate(dogPos, 0, 0);
GlStateManager.color(1F, 1F, 1F, 1F);
vazkii.botania.client.core.helper.RenderHelper.drawTexturedModalRect(0, yPosition, zLevel + 10, dogPos % 100 < 50 ? 23 : 0, 0, 23, 19, f, f);
xPosition = (int) Math.max(xPosition, dogPos + 10);
vazkii.botania.client.core.helper.RenderHelper.drawTexturedModalRect(0, y, zLevel + 10, dogPos % 100 < 50 ? 23 : 0, 0, 23, 19, f, f);
x = (int) Math.max(x, dogPos + 10);
GlStateManager.translate(-dogPos, 0, 0);
}
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
boolean showStack = !displayStack.isEmpty() && !displayString.isEmpty();
@@ -97,19 +97,19 @@ public class GuiButtonInvisible extends GuiButtonLexicon {
int maxalpha = 0x22;
int alpha = Math.min(maxalpha, (int) (timeHover / 4 * maxalpha));
drawRect(xPosition - 5, yPosition, (int) (xPosition - 5 + timeHover * 24), yPosition + height, alpha << 24 | color);
drawRect(x - 5, y, (int) (x - 5 + timeHover * 24), y + height, alpha << 24 | color);
GlStateManager.enableAlpha();
boolean unicode = par1Minecraft.fontRenderer.getUnicodeFlag();
par1Minecraft.fontRenderer.setUnicodeFlag(true);
par1Minecraft.fontRenderer.drawString(displayString, xPosition + (showStack ? 7 : 0), yPosition + (height - 8) / 2, 0);
par1Minecraft.fontRenderer.drawString(displayString, x + (showStack ? 7 : 0), y + (height - 8) / 2, 0);
par1Minecraft.fontRenderer.setUnicodeFlag(unicode);
if(showStack) {
GlStateManager.scale(0.5F, 0.5F, 0.5F);
RenderHelper.enableGUIStandardItemLighting();
GlStateManager.enableRescaleNormal();
par1Minecraft.getRenderItem().renderItemIntoGUI(displayStack, xPosition * 2 - 6, yPosition * 2 + 4);
par1Minecraft.getRenderItem().renderItemIntoGUI(displayStack, x * 2 - 6, y * 2 + 4);
RenderHelper.disableStandardItemLighting();
GlStateManager.enableBlend();
}
@@ -33,12 +33,12 @@ public class GuiButtonNotes extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 130 : 120, 191, 10, 11);
drawTexturedModalRect(x, y, k == 2 ? 130 : 120, 191, 10, 11);
List<String> tooltip = new ArrayList<>();
if(GuiLexicon.notesEnabled)
@@ -46,7 +46,7 @@ public class GuiButtonNotes extends GuiButtonLexicon {
else {
tooltip.add(TextFormatting.GREEN + I18n.format("botaniamisc.showNotes"));
if(parent.note != null && !parent.note.isEmpty())
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow("!", xPosition + 10, yPosition, 0xFF0000);
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow("!", x + 10, y, 0xFF0000);
}
int tooltipY = (tooltip.size() - 1) * 10;
@@ -30,12 +30,12 @@ public class GuiButtonOptions extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 180, 11, 11);
drawTexturedModalRect(x, y, k == 2 ? 109 : 98, 180, 11, 11);
List<String> tooltip = new ArrayList<>();
for(int i = 0; i < 3; i++)
@@ -32,12 +32,12 @@ public class GuiButtonPage extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
if(enabled) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 18 : 0, right ? 180 : 190, 18, 10);
drawTexturedModalRect(x, y, k == 2 ? 18 : 0, right ? 180 : 190, 18, 10);
if(k == 2)
RenderHelper.renderTooltip(par2, par3, Collections.singletonList(I18n.format(right ? "botaniamisc.nextPage" : "botaniamisc.prevPage")));
@@ -30,12 +30,12 @@ public class GuiButtonScaleChange extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 152 : 141, 191, 11, 11);
drawTexturedModalRect(x, y, k == 2 ? 152 : 141, 191, 11, 11);
List<String> tooltip = new ArrayList<>();
tooltip.add(TextFormatting.GREEN + I18n.format("botaniamisc.scaleChange"));
@@ -30,12 +30,12 @@ public class GuiButtonShare extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 10 : 0 , 200, 10, 12);
drawTexturedModalRect(x, y, k == 2 ? 10 : 0 , 200, 10, 12);
List<String> tooltip = getTooltip();
int tooltipY = (tooltip.size() - 1) * 10;
@@ -35,14 +35,14 @@ public class GuiButtonUpdateWarning extends GuiButtonLexicon {
if(!visible || !enabled)
return;
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
boolean red = k == 2 || ClientTickHandler.ticksInGame % 10 < 5;
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, red ? 153 : 142, 180, 11, 11);
drawTexturedModalRect(x, y, red ? 153 : 142, 180, 11, 11);
List<String> tooltip = new ArrayList<>();
String version = PersistentVariableHelper.lastBotaniaVersion;
@@ -30,12 +30,12 @@ public class GuiButtonViewOnline extends GuiButtonLexicon {
@Override
public void drawButton(@Nonnull Minecraft par1Minecraft, int par2, int par3) {
hovered = par2 >= xPosition && par3 >= yPosition && par2 < xPosition + width && par3 < yPosition + height;
hovered = par2 >= x && par3 >= y && par2 < x + width && par3 < y + height;
int k = getHoverState(hovered);
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
GlStateManager.color(1F, 1F, 1F, 1F);
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 41 : 30, 200, 11, 11);
drawTexturedModalRect(x, y, k == 2 ? 41 : 30, 200, 11, 11);
List<String> tooltip = Collections.singletonList(TextFormatting.AQUA + I18n.format("botaniamisc.viewOnline"));
int tooltipY = (tooltip.size() - 1) * 10;
@@ -19,11 +19,12 @@ import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fml.common.registry.IForgeRegistryEntry;
import vazkii.botania.api.mana.ICompositableLens;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.lens.ItemLens;
public class CompositeLensRecipe implements IRecipe {
public class CompositeLensRecipe extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe {
@Override
public boolean matches(@Nonnull InventoryCrafting var1, @Nonnull World var2) {
@@ -78,8 +79,8 @@ public class CompositeLensRecipe implements IRecipe {
}
@Override
public int getRecipeSize() {
return 10;
public boolean canFit(int width, int height) {
return width * height >= 3;
}
@Nonnull
@@ -160,9 +160,9 @@ public class ItemLens extends ItemMod implements ILensControl, ICompositableLens
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> stacks) {
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> stacks) {
for(int i = 0; i < SUBTYPES; i++)
stacks.add(new ItemStack(item, 1, i));
stacks.add(new ItemStack(this, 1, i));
}
@Nonnull