First Checkup
This commit is contained in:
@@ -363,7 +363,7 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
Source source = Source.OTHER;
|
||||
|
||||
if(((EntityPlayer)caster).getHeldItem(message.hand) != null){
|
||||
if(!((EntityPlayer)caster).getHeldItem(message.hand).isEmpty()){
|
||||
Item item = ((EntityPlayer)caster).getHeldItem(message.hand).getItem();
|
||||
if(item instanceof ItemWand){
|
||||
source = Source.WAND;
|
||||
|
||||
@@ -37,8 +37,8 @@ public class EntityNameEntry extends StringEntry {
|
||||
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY,
|
||||
boolean isSelected){
|
||||
// super.drawEntry(slotIndex, x, y, listWidth, slotHeight, tessellator, mouseX, mouseY, isSelected);
|
||||
this.btnValue.xPosition = listWidth / 4;
|
||||
this.btnValue.yPosition = y;
|
||||
this.btnValue.x = listWidth / 4;
|
||||
this.btnValue.y = y;
|
||||
|
||||
String trans = I18n.format(this.textFieldValue.getText());
|
||||
if(!trans.equals(this.textFieldValue.getText()))
|
||||
|
||||
@@ -53,10 +53,10 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack() && this.inventorySlots
|
||||
.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack().getItem() instanceof ItemWand){
|
||||
guiLeft = (this.width - this.xSize - tooltipWidth) / 2;
|
||||
this.applyBtn.xPosition = (this.width - tooltipWidth) / 2 + 48;
|
||||
this.applyBtn.x = (this.width - tooltipWidth) / 2 + 48;
|
||||
}else{
|
||||
guiLeft = (this.width - this.xSize) / 2;
|
||||
this.applyBtn.xPosition = this.width / 2 + 48;
|
||||
this.applyBtn.x = this.width / 2 + 48;
|
||||
}
|
||||
|
||||
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack()){
|
||||
@@ -130,7 +130,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
ItemStack stack = new ItemStack(item, level);
|
||||
GlStateManager.enableDepth();
|
||||
this.itemRender.renderItemAndEffectIntoGUI(stack, guiLeft + xSize + 6 + x, y);
|
||||
this.itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, stack, guiLeft + xSize + 6 + x, y,
|
||||
this.itemRender.renderItemOverlayIntoGUI(this.fontRenderer, stack, guiLeft + xSize + 6 + x, y,
|
||||
null);
|
||||
x += 18;
|
||||
GlStateManager.disableDepth();
|
||||
@@ -150,10 +150,10 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY){
|
||||
|
||||
this.fontRendererObj
|
||||
this.fontRenderer
|
||||
.drawString(this.arcaneWorkbenchInventory.hasCustomName() ? this.arcaneWorkbenchInventory.getName()
|
||||
: I18n.format(this.arcaneWorkbenchInventory.getName()), 8, 6, 4210752);
|
||||
this.fontRendererObj.drawString(this.playerInventory.hasCustomName() ? this.playerInventory.getName()
|
||||
this.fontRenderer.drawString(this.playerInventory.hasCustomName() ? this.playerInventory.getName()
|
||||
: I18n.format(this.playerInventory.getName()), 8, this.ySize - 96 + 2, 4210752);
|
||||
|
||||
if(this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getHasStack() && this.inventorySlots
|
||||
@@ -161,8 +161,8 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
|
||||
ItemStack wand = this.inventorySlots.getSlot(ContainerArcaneWorkbench.WAND_SLOT).getStack();
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow("\u00A7f" + wand.getDisplayName(), xSize + 6, 6, 0);
|
||||
this.fontRendererObj.drawStringWithShadow(
|
||||
this.fontRenderer.drawStringWithShadow("\u00A7f" + wand.getDisplayName(), xSize + 6, 6, 0);
|
||||
this.fontRenderer.drawStringWithShadow(
|
||||
"\u00A77" + I18n.format("container.wizardry:arcane_workbench.mana") + " "
|
||||
+ (wand.getMaxDamage() - wand.getItemDamage()) + "/" + wand.getMaxDamage(),
|
||||
xSize + 6, 20, 0);
|
||||
@@ -180,7 +180,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
}
|
||||
|
||||
if(discovered){
|
||||
this.fontRendererObj.drawStringWithShadow(spell.getDisplayNameWithFormatting(), xSize + 16, y, 0);
|
||||
this.fontRenderer.drawStringWithShadow(spell.getDisplayNameWithFormatting(), xSize + 16, y, 0);
|
||||
}else{
|
||||
this.mc.standardGalacticFontRenderer.drawStringWithShadow(
|
||||
"\u00A79" + SpellGlyphData.getGlyphName(spell, this.mc.world), xSize + 16, y, 0);
|
||||
@@ -190,7 +190,7 @@ public class GuiArcaneWorkbench extends GuiContainer {
|
||||
|
||||
if(WandHelper.getTotalUpgrades(wand) > 0){
|
||||
|
||||
this.fontRendererObj.drawStringWithShadow(
|
||||
this.fontRenderer.drawStringWithShadow(
|
||||
"\u00A7f" + I18n.format("container.wizardry:arcane_workbench.upgrades"), xSize + 6, y + 6, 0);
|
||||
|
||||
int x = 0;
|
||||
|
||||
@@ -19,8 +19,8 @@ class GuiButtonApply extends GuiButton {
|
||||
public void drawButton(Minecraft minecraft, int mouseX, int mouseY){
|
||||
|
||||
// Whether the button is highlighted
|
||||
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width
|
||||
&& mouseY < this.yPosition + this.height;
|
||||
this.hovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width
|
||||
&& mouseY < this.y + this.height;
|
||||
|
||||
int k = 36;
|
||||
int l = 220;
|
||||
@@ -36,8 +36,8 @@ class GuiButtonApply extends GuiButton {
|
||||
colour = 10526880;
|
||||
}
|
||||
|
||||
WizardryUtilities.drawTexturedRect(this.xPosition, this.yPosition, k, l, this.width, this.height, 256, 256);
|
||||
this.drawCenteredString(minecraft.fontRendererObj, this.displayString, this.xPosition + this.width / 2,
|
||||
this.yPosition + (this.height - 8) / 2, colour);
|
||||
WizardryUtilities.drawTexturedRect(this.x, this.y, k, l, this.width, this.height, 256, 256);
|
||||
this.drawCenteredString(minecraft.fontRenderer, this.displayString, this.x + this.width / 2,
|
||||
this.y + (this.height - 8) / 2, colour);
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,8 @@ class GuiButtonInvisible extends GuiButton {
|
||||
* Draws this button to the screen.
|
||||
*/
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3){
|
||||
this.hovered = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||
&& par3 < this.yPosition + this.height;
|
||||
this.hovered = par2 >= this.x && par3 >= this.y && par2 < this.x + this.width
|
||||
&& par3 < this.y + this.height;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ class GuiButtonTurnPage extends GuiButton {
|
||||
*/
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3){
|
||||
if(this.visible){
|
||||
boolean flag = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width
|
||||
&& par3 < this.yPosition + this.height;
|
||||
boolean flag = par2 >= this.x && par3 >= this.y && par2 < this.x + this.width
|
||||
&& par3 < this.y + this.height;
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
par1Minecraft.getTextureManager().bindTexture(texture);
|
||||
int k = 0;
|
||||
@@ -42,7 +42,7 @@ class GuiButtonTurnPage extends GuiButton {
|
||||
l += 13;
|
||||
}
|
||||
|
||||
WizardryUtilities.drawTexturedRect(this.xPosition, this.yPosition, k, l, 23, 13, 288, 256);
|
||||
WizardryUtilities.drawTexturedRect(this.x, this.y, k, l, 23, 13, 288, 256);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ public class GuiPortableCrafting extends GuiContainer {
|
||||
* Draw the foreground layer for the GuiContainer (everything in front of the items)
|
||||
*/
|
||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_){
|
||||
this.fontRendererObj.drawString(I18n.format("container.crafting"), 28, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
this.fontRenderer.drawString(I18n.format("container.crafting"), 28, 6, 4210752);
|
||||
this.fontRenderer.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_){
|
||||
|
||||
@@ -54,8 +54,8 @@ public class GuiSpellBook extends GuiScreen {
|
||||
super.drawScreen(par1, par2, par3);
|
||||
|
||||
if(discovered){
|
||||
this.fontRendererObj.drawString(spell.getDisplayName(), xPos + 17, yPos + 14, 0);
|
||||
this.fontRendererObj.drawString(spell.type.getDisplayName(), xPos + 17, yPos + 25, 0x777777);
|
||||
this.fontRenderer.drawString(spell.getDisplayName(), xPos + 17, yPos + 14, 0);
|
||||
this.fontRenderer.drawString(spell.type.getDisplayName(), xPos + 17, yPos + 25, 0x777777);
|
||||
}else{
|
||||
this.mc.standardGalacticFontRenderer.drawString(SpellGlyphData.getGlyphName(spell, player.world), xPos + 17,
|
||||
yPos + 14, 0);
|
||||
@@ -63,27 +63,27 @@ public class GuiSpellBook extends GuiScreen {
|
||||
0x777777);
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString("-------------------", xPos + 17, yPos + 34, 0);
|
||||
this.fontRenderer.drawString("-------------------", xPos + 17, yPos + 34, 0);
|
||||
|
||||
if(spell.tier == Tier.BASIC){
|
||||
// Basic is usually white but this doesn't show up.
|
||||
this.fontRendererObj.drawString("Tier: \u00A77" + Tier.BASIC.getDisplayName(), xPos + 17, yPos + 44, 0);
|
||||
this.fontRenderer.drawString("Tier: \u00A77" + Tier.BASIC.getDisplayName(), xPos + 17, yPos + 44, 0);
|
||||
}else{
|
||||
this.fontRendererObj.drawString("Tier: " + spell.tier.getDisplayNameWithFormatting(), xPos + 17, yPos + 44,
|
||||
this.fontRenderer.drawString("Tier: " + spell.tier.getDisplayNameWithFormatting(), xPos + 17, yPos + 44,
|
||||
0);
|
||||
}
|
||||
|
||||
String element = "Element: " + spell.element.getFormattingCode() + spell.element.getDisplayName();
|
||||
if(!discovered) element = "Element: ?";
|
||||
this.fontRendererObj.drawString(element, xPos + 17, yPos + 56, 0);
|
||||
this.fontRenderer.drawString(element, xPos + 17, yPos + 56, 0);
|
||||
|
||||
String manaCost = "Mana Cost: " + spell.cost;
|
||||
if(spell.isContinuous) manaCost = "Mana Cost: " + spell.cost + "/second";
|
||||
if(!discovered) manaCost = "Mana Cost: ?";
|
||||
this.fontRendererObj.drawString(manaCost, xPos + 17, yPos + 68, 0);
|
||||
this.fontRenderer.drawString(manaCost, xPos + 17, yPos + 68, 0);
|
||||
|
||||
if(discovered){
|
||||
this.fontRendererObj.drawSplitString(spell.getDescription(), xPos + 17, yPos + 82, 118, 0);
|
||||
this.fontRenderer.drawSplitString(spell.getDescription(), xPos + 17, yPos + 82, 118, 0);
|
||||
}else{
|
||||
this.mc.standardGalacticFontRenderer.drawSplitString(
|
||||
SpellGlyphData.getGlyphDescription(spell, player.world), xPos + 17, yPos + 82, 118, 0);
|
||||
|
||||
@@ -47,10 +47,10 @@ public class GuiSpellDisplay extends Gui {
|
||||
|
||||
ItemStack wand = player.getHeldItemMainhand();
|
||||
|
||||
if(wand == null || !(wand.getItem() instanceof ItemWand)){
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)){
|
||||
wand = player.getHeldItemOffhand();
|
||||
// If the player isn't holding a wand, then nothing else needs to be done.
|
||||
if(wand == null || !(wand.getItem() instanceof ItemWand)) return;
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)) return;
|
||||
}
|
||||
|
||||
int width = event.getResolution().getScaledWidth();
|
||||
@@ -101,7 +101,7 @@ public class GuiSpellDisplay extends Gui {
|
||||
: spell.element.getFormattingCode();
|
||||
if(!discovered) colour = "\u00A79";
|
||||
String spellName = discovered ? spell.getDisplayName() : SpellGlyphData.getGlyphName(spell, player.world);
|
||||
FontRenderer font = discovered ? this.mc.fontRendererObj : this.mc.standardGalacticFontRenderer;
|
||||
FontRenderer font = discovered ? this.mc.fontRenderer : this.mc.standardGalacticFontRenderer;
|
||||
|
||||
int maxWidth = 90;
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString("" + (pageNumber * 2 + 1), xPos + xSize / 4 - 3, yPos + ySize - 20, 0);
|
||||
this.fontRendererObj.drawString("" + (pageNumber * 2 + 2), xPos + 3 * xSize / 4 - 5, yPos + ySize - 20, 0);
|
||||
this.fontRenderer.drawString("" + (pageNumber * 2 + 1), xPos + xSize / 4 - 3, yPos + ySize - 20, 0);
|
||||
this.fontRenderer.drawString("" + (pageNumber * 2 + 2), xPos + 3 * xSize / 4 - 5, yPos + ySize - 20, 0);
|
||||
|
||||
super.drawScreen(mouseX, mouseY, par3);
|
||||
|
||||
@@ -119,11 +119,11 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
for(String paragraph : text.get(pageNumber * 2)){
|
||||
|
||||
this.fontRendererObj.drawSplitString(paragraph, xPos + 17,
|
||||
yPos + 14 + lineNumber * this.fontRendererObj.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
this.fontRenderer.drawSplitString(paragraph, xPos + 17,
|
||||
yPos + 14 + lineNumber * this.fontRenderer.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
|
||||
List<String> list = new ArrayList<String>(
|
||||
this.fontRendererObj.listFormattedStringToWidth(paragraph, GuiWizardHandbook.PAGE_WIDTH));
|
||||
this.fontRenderer.listFormattedStringToWidth(paragraph, GuiWizardHandbook.PAGE_WIDTH));
|
||||
|
||||
lineNumber += list.size();
|
||||
}
|
||||
@@ -137,16 +137,16 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
// First page is centred
|
||||
if(pageNumber == 0){
|
||||
int startX = this.width / 2 + 7 + PAGE_WIDTH / 2
|
||||
- this.fontRendererObj.getStringWidth(paragraph) / 2;
|
||||
this.fontRendererObj.drawSplitString(paragraph, startX,
|
||||
yPos + 14 + lineNumber * this.fontRendererObj.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
- this.fontRenderer.getStringWidth(paragraph) / 2;
|
||||
this.fontRenderer.drawSplitString(paragraph, startX,
|
||||
yPos + 14 + lineNumber * this.fontRenderer.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
}else{
|
||||
this.fontRendererObj.drawSplitString(paragraph, this.width / 2 + 7,
|
||||
yPos + 14 + lineNumber * this.fontRendererObj.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
this.fontRenderer.drawSplitString(paragraph, this.width / 2 + 7,
|
||||
yPos + 14 + lineNumber * this.fontRenderer.FONT_HEIGHT, PAGE_WIDTH, BLACK);
|
||||
}
|
||||
|
||||
List<String> list = new ArrayList<String>(
|
||||
this.fontRendererObj.listFormattedStringToWidth(paragraph, GuiWizardHandbook.PAGE_WIDTH));
|
||||
this.fontRenderer.listFormattedStringToWidth(paragraph, GuiWizardHandbook.PAGE_WIDTH));
|
||||
|
||||
lineNumber += list.size();
|
||||
}
|
||||
@@ -502,17 +502,17 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
for(int i = 0; i < craftingGrid.length; i++){
|
||||
for(int j = 0; j < craftingGrid[i].length; j++){
|
||||
if(craftingGrid[i][j] != null){
|
||||
if(!craftingGrid[i][j].isEmpty()){
|
||||
itemRender.renderItemAndEffectIntoGUI(craftingGrid[i][j], xPos + 18 * i, yPos + 18 * j);
|
||||
itemRender.renderItemOverlays(this.fontRendererObj, craftingGrid[i][j], xPos + 18 * i,
|
||||
itemRender.renderItemOverlays(this.fontRenderer, craftingGrid[i][j], xPos + 18 * i,
|
||||
yPos + 18 * j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(craftingResult != null){
|
||||
if(!craftingResult.isEmpty()){
|
||||
itemRender.renderItemAndEffectIntoGUI(craftingResult, xPos + 86, yPos + 18);
|
||||
itemRender.renderItemOverlays(this.fontRendererObj, craftingResult, xPos + 86, yPos + 18);
|
||||
itemRender.renderItemOverlays(this.fontRenderer, craftingResult, xPos + 86, yPos + 18);
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
@@ -538,14 +538,14 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
for(int i = 0; i < craftingGrid.length; i++){
|
||||
for(int j = 0; j < craftingGrid[i].length; j++){
|
||||
if(craftingGrid[i][j] != null
|
||||
if(!craftingGrid[i][j].isEmpty()
|
||||
&& isPointInRegion(xPos + 18 * i, yPos + 18 * j, 16, 16, mouseX + guiLeft, mouseY + guiTop)){
|
||||
this.renderToolTip(craftingGrid[i][j], mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(craftingResult != null && isPointInRegion(xPos + 86, yPos + 18, 16, 16, mouseX + guiLeft, mouseY + guiTop)){
|
||||
if(!craftingResult.isEmpty() && isPointInRegion(xPos + 86, yPos + 18, 16, 16, mouseX + guiLeft, mouseY + guiTop)){
|
||||
this.renderToolTip(craftingResult, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
sections.add(
|
||||
new Section(paragraph.replace("SECTION ", ""), text.size() + 1, this.width / 2 + 7,
|
||||
this.height / 2 - this.ySize / 2 + 14
|
||||
+ (sections.size() + 2) * this.fontRendererObj.FONT_HEIGHT,
|
||||
+ (sections.size() + 2) * this.fontRenderer.FONT_HEIGHT,
|
||||
nextButtonId++));
|
||||
paragraph = bufferedreader.readLine();
|
||||
|
||||
@@ -682,7 +682,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
paragraph = paragraph.replaceAll("RESET_COLOUR", "\u00A70");
|
||||
paragraph = paragraph.replaceAll("VERSION", Wizardry.VERSION);
|
||||
|
||||
int linesInParagraph = this.fontRendererObj
|
||||
int linesInParagraph = this.fontRenderer
|
||||
.listFormattedStringToWidth(paragraph, GuiWizardHandbook.PAGE_WIDTH).size();
|
||||
|
||||
// Ignores empty lines at the top of a page.
|
||||
@@ -709,7 +709,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
int i = 0;
|
||||
|
||||
List<String> strings = this.fontRendererObj.listFormattedStringToWidth(paragraph,
|
||||
List<String> strings = this.fontRenderer.listFormattedStringToWidth(paragraph,
|
||||
GuiWizardHandbook.PAGE_WIDTH);
|
||||
|
||||
for(Object s : strings){
|
||||
@@ -759,7 +759,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
this.y = y;
|
||||
this.buttonId = id;
|
||||
GuiWizardHandbook.this.buttonList.add(new GuiButtonInvisible(id, x, y, GuiWizardHandbook.PAGE_WIDTH,
|
||||
GuiWizardHandbook.this.fontRendererObj.FONT_HEIGHT));
|
||||
GuiWizardHandbook.this.fontRenderer.FONT_HEIGHT));
|
||||
}
|
||||
|
||||
void hideButton(){
|
||||
@@ -770,20 +770,20 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
GuiWizardHandbook.this.buttonList.get(buttonId).visible = true;
|
||||
|
||||
GuiWizardHandbook.this.fontRendererObj.drawString(name, x, y,
|
||||
GuiWizardHandbook.this.fontRenderer.drawString(name, x, y,
|
||||
GuiWizardHandbook.this.buttonList.get(buttonId).isMouseOver() ? HIGHLIGHT_COLOUR : BLACK);
|
||||
|
||||
int nameWidth = GuiWizardHandbook.this.fontRendererObj.getStringWidth(name);
|
||||
int nameWidth = GuiWizardHandbook.this.fontRenderer.getStringWidth(name);
|
||||
|
||||
String dotsAndNumber = " " + this.pageNumber;
|
||||
|
||||
while(GuiWizardHandbook.this.fontRendererObj.getStringWidth(dotsAndNumber) < GuiWizardHandbook.PAGE_WIDTH
|
||||
while(GuiWizardHandbook.this.fontRenderer.getStringWidth(dotsAndNumber) < GuiWizardHandbook.PAGE_WIDTH
|
||||
- nameWidth - 2){
|
||||
dotsAndNumber = "." + dotsAndNumber;
|
||||
}
|
||||
|
||||
GuiWizardHandbook.this.fontRendererObj.drawString(dotsAndNumber, x + GuiWizardHandbook.PAGE_WIDTH
|
||||
- GuiWizardHandbook.this.fontRendererObj.getStringWidth(dotsAndNumber), y, BLACK);
|
||||
GuiWizardHandbook.this.fontRenderer.drawString(dotsAndNumber, x + GuiWizardHandbook.PAGE_WIDTH
|
||||
- GuiWizardHandbook.this.fontRenderer.getStringWidth(dotsAndNumber), y, BLACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ public class MixedFontRenderer extends FontRenderer {
|
||||
l += Minecraft.getMinecraft().standardGalacticFontRenderer.drawString(section, x, y, colour, shadow);
|
||||
x += Minecraft.getMinecraft().standardGalacticFontRenderer.getStringWidth(section);
|
||||
}else{
|
||||
l += Minecraft.getMinecraft().fontRendererObj.drawString(section, x, y, colour, shadow);
|
||||
x += Minecraft.getMinecraft().fontRendererObj.getStringWidth(section);
|
||||
l += Minecraft.getMinecraft().fontRenderer.drawString(section, x, y, colour, shadow);
|
||||
x += Minecraft.getMinecraft().fontRenderer.getStringWidth(section);
|
||||
}
|
||||
|
||||
string = string.substring(string.indexOf('#') + 1);
|
||||
@@ -47,7 +47,7 @@ public class MixedFontRenderer extends FontRenderer {
|
||||
if(sga){
|
||||
l += Minecraft.getMinecraft().standardGalacticFontRenderer.drawString(string, x, y, colour, shadow);
|
||||
}else{
|
||||
l += Minecraft.getMinecraft().fontRendererObj.drawString(string, x, y, colour, shadow);
|
||||
l += Minecraft.getMinecraft().fontRenderer.drawString(string, x, y, colour, shadow);
|
||||
}
|
||||
|
||||
return l;
|
||||
@@ -67,7 +67,7 @@ public class MixedFontRenderer extends FontRenderer {
|
||||
if(sga){
|
||||
l += Minecraft.getMinecraft().standardGalacticFontRenderer.getStringWidth(section);
|
||||
}else{
|
||||
l += Minecraft.getMinecraft().fontRendererObj.getStringWidth(section);
|
||||
l += Minecraft.getMinecraft().fontRenderer.getStringWidth(section);
|
||||
}
|
||||
|
||||
string = string.substring(string.indexOf('#') + 1);
|
||||
@@ -77,7 +77,7 @@ public class MixedFontRenderer extends FontRenderer {
|
||||
if(sga){
|
||||
l += Minecraft.getMinecraft().standardGalacticFontRenderer.getStringWidth(string);
|
||||
}else{
|
||||
l += Minecraft.getMinecraft().fontRendererObj.getStringWidth(string);
|
||||
l += Minecraft.getMinecraft().fontRenderer.getStringWidth(string);
|
||||
}
|
||||
|
||||
return l;
|
||||
@@ -91,7 +91,7 @@ public class MixedFontRenderer extends FontRenderer {
|
||||
Minecraft.getMinecraft().standardGalacticFontRenderer.drawSplitString(string.substring(1), x, y, width,
|
||||
colour);
|
||||
}else{
|
||||
Minecraft.getMinecraft().fontRendererObj.drawSplitString(string, x, y, width, colour);
|
||||
Minecraft.getMinecraft().fontRenderer.drawSplitString(string, x, y, width, colour);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -79,13 +79,13 @@ public final class WizardryClientEventHandler {
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
ItemStack wand = player.getHeldItemMainhand();
|
||||
|
||||
if(wand == null || !(wand.getItem() instanceof ItemWand)){
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)){
|
||||
wand = player.getHeldItemOffhand();
|
||||
// If the player isn't holding a wand, then nothing else needs to be done.
|
||||
if(wand == null || !(wand.getItem() instanceof ItemWand)) return;
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)) return;
|
||||
}
|
||||
|
||||
if(Minecraft.getMinecraft().inGameHasFocus && wand != null && event.getDwheel() != 0 && player.isSneaking()
|
||||
if(Minecraft.getMinecraft().inGameHasFocus && !wand.isEmpty() && event.getDwheel() != 0 && player.isSneaking()
|
||||
&& Wizardry.settings.enableShiftScrolling){
|
||||
|
||||
event.setCanceled(true);
|
||||
@@ -107,7 +107,7 @@ public final class WizardryClientEventHandler {
|
||||
public static void onFOVUpdateEvent(FOVUpdateEvent event){
|
||||
|
||||
// Bow zoom. Taken directly from AbstractClientPlayer so it works exactly like vanilla.
|
||||
if(event.getEntity().isHandActive() && event.getEntity().getActiveItemStack() != null
|
||||
if(event.getEntity().isHandActive() && !event.getEntity().getActiveItemStack().isEmpty()
|
||||
&& event.getEntity().getActiveItemStack().getItem() instanceof ItemSpectralBow){
|
||||
|
||||
int maxUseTicks = event.getEntity().getItemInUseMaxCount();
|
||||
@@ -223,12 +223,12 @@ public final class WizardryClientEventHandler {
|
||||
|
||||
ItemStack wand = mc.player.getHeldItemMainhand();
|
||||
|
||||
if(wand == null || !(wand.getItem() instanceof ItemWand)){
|
||||
if(wand.isEmpty() || !(wand.getItem() instanceof ItemWand)){
|
||||
wand = mc.player.getHeldItemOffhand();
|
||||
}
|
||||
|
||||
// Target selection pointer
|
||||
if(mc.player.isSneaking() && wand != null && wand.getItem() instanceof ItemWand && rayTrace != null
|
||||
if(mc.player.isSneaking() && !wand.isEmpty() && wand.getItem() instanceof ItemWand && rayTrace != null
|
||||
&& rayTrace.entityHit instanceof EntityLivingBase && rayTrace.entityHit == event.getEntity()
|
||||
&& properties != null && properties.selectedMinion != null){
|
||||
|
||||
@@ -430,7 +430,7 @@ public final class WizardryClientEventHandler {
|
||||
private static void renderShadowWardFirstPerson(EntityPlayer entityplayer){
|
||||
ItemStack wand = entityplayer.getActiveItemStack();
|
||||
if(WizardData.get(entityplayer) != null && WizardData.get(entityplayer).currentlyCasting() instanceof ShadowWard
|
||||
|| (entityplayer.isHandActive() && wand != null && wand.getItemDamage() < wand.getMaxDamage()
|
||||
|| (entityplayer.isHandActive() && !wand.isEmpty() && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& wand.getItem() instanceof ItemWand
|
||||
&& WandHelper.getCurrentSpell(wand) instanceof ShadowWard)){
|
||||
|
||||
@@ -490,7 +490,7 @@ public final class WizardryClientEventHandler {
|
||||
private static void renderShadowWardIfActive(EntityPlayer entityplayer){
|
||||
ItemStack wand = entityplayer.getActiveItemStack();
|
||||
if(WizardData.get(entityplayer).currentlyCasting() instanceof ShadowWard || (entityplayer.isHandActive()
|
||||
&& wand != null && wand.getItemDamage() < wand.getMaxDamage() && wand.getItem() instanceof ItemWand
|
||||
&& !wand.isEmpty() && wand.getItemDamage() < wand.getMaxDamage() && wand.getItem() instanceof ItemWand
|
||||
&& WandHelper.getCurrentSpell(wand) instanceof ShadowWard)){
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -541,7 +541,7 @@ public final class WizardryClientEventHandler {
|
||||
private static void renderWingsIfActive(EntityPlayer entityplayer, float partialTickTime){
|
||||
ItemStack wand = entityplayer.getActiveItemStack();
|
||||
if(WizardData.get(entityplayer).currentlyCasting() instanceof Flight
|
||||
|| (entityplayer.isHandActive() && wand != null && wand.getItemDamage() < wand.getMaxDamage()
|
||||
|| (entityplayer.isHandActive() && !wand.isEmpty() && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& wand.getItem() instanceof ItemWand && WandHelper.getCurrentSpell(wand) instanceof Flight)){
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -620,7 +620,7 @@ public final class WizardryClientEventHandler {
|
||||
ItemStack wand = entityplayer.getActiveItemStack();
|
||||
if(WizardData.get(entityplayer) != null && WizardData.get(entityplayer).shield != null
|
||||
&& (WizardData.get(entityplayer).currentlyCasting() instanceof Shield || (entityplayer.isHandActive()
|
||||
&& wand != null && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& !wand.isEmpty() && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& wand.getItem() instanceof ItemWand && WandHelper.getCurrentSpell(wand) instanceof Shield))){
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
@@ -660,7 +660,7 @@ public final class WizardryClientEventHandler {
|
||||
ItemStack wand = entityplayer.getActiveItemStack();
|
||||
if(WizardData.get(entityplayer).shield != null
|
||||
&& (WizardData.get(entityplayer).currentlyCasting() instanceof Shield || (entityplayer.isHandActive()
|
||||
&& wand != null && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& !wand.isEmpty() && wand.getItemDamage() < wand.getMaxDamage()
|
||||
&& wand.getItem() instanceof ItemWand && WandHelper.getCurrentSpell(wand) instanceof Shield))){
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
Reference in New Issue
Block a user