mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fixed a nasty bug with obfuscation causing some booklet pages to break horribly
This commit is contained in:
parent
18bb252dcf
commit
f16f1e0496
8 changed files with 12 additions and 7 deletions
|
@ -41,7 +41,7 @@ public interface IBookletGui{
|
|||
|
||||
int getGuiTop();
|
||||
|
||||
void drawTexturedModalRect(int startX, int startY, int u, int v, int xSize, int ySize);
|
||||
void drawRect(int startX, int startY, int u, int v, int xSize, int ySize);
|
||||
|
||||
EntrySet getCurrentEntrySet();
|
||||
}
|
||||
|
|
|
@ -456,6 +456,11 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
|
|||
return this.guiTop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawRect(int startX, int startY, int u, int v, int xSize, int ySize){
|
||||
this.drawTexturedModalRect(startX, startY, u, v, xSize, ySize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EntrySet getCurrentEntrySet(){
|
||||
return this.currentEntrySet;
|
||||
|
|
|
@ -38,7 +38,7 @@ public class PageCoffeeRecipe extends BookletPageAA{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60);
|
||||
gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -76,7 +76,7 @@ public class PageCrafting extends BookletPageAA{
|
|||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
if(this.recipes[this.recipePos] != null){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft()+27, gui.getGuiTop()+20, 146, 20, 99, 60);
|
||||
gui.drawRect(gui.getGuiLeft()+27, gui.getGuiTop()+20, 146, 20, 99, 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PageCrusherRecipe extends BookletPageAA{
|
|||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
if(recipe != null){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 60, 180, 60, 60);
|
||||
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 60, 180, 60, 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class PageFurnace extends BookletPageAA{
|
|||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
if(this.input != null || this.getInputForOutput(this.result) != null){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 0, 180, 60, 60);
|
||||
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 0, 180, 60, 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class PagePicture extends PageTextOnly{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(this.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft(), gui.getGuiTop(), 0, 0, gui.getXSize(), gui.getYSize());
|
||||
gui.drawRect(gui.getGuiLeft(), gui.getGuiTop(), 0, 0, gui.getXSize(), gui.getYSize());
|
||||
|
||||
String text = gui.getCurrentEntrySet().page.getText();
|
||||
if(text != null && !text.isEmpty()){
|
||||
|
|
|
@ -62,7 +62,7 @@ public class PageReconstructor extends BookletPageAA{
|
|||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
if(this.recipes[this.recipePos] != null){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 188, 154, 60, 60);
|
||||
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 188, 154, 60, 60);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue