mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
Fix Overlap Mouse Clicked
This commit is contained in:
1 parent
cf48671315
commit
4875123685
1 file changed
+8
-8
@@ -8,7 +8,7 @@ public abstract class GuiNPCInterface2 extends GuiNPCInterface
|
||||
{
|
||||
private ResourceLocation background = new ResourceLocation("customnpcs:textures/gui/menubg.png");
|
||||
private GuiNpcMenu menu;
|
||||
|
||||
|
||||
public GuiNPCInterface2(EntityNPCInterface npc){
|
||||
this(npc, -1);
|
||||
}
|
||||
@@ -17,29 +17,29 @@ public abstract class GuiNPCInterface2 extends GuiNPCInterface
|
||||
xSize = 420;
|
||||
ySize = 200;
|
||||
menu = new GuiNpcMenu(this, activeMenu, npc);
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
menu.initGui(guiLeft, guiTop, xSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int i, int j, int k){
|
||||
super.mouseClicked(i, j, k);
|
||||
if(!hasSubGui())
|
||||
menu.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
super.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
public void delete(){
|
||||
npc.delete();
|
||||
displayGuiScreen(null);
|
||||
mc.setIngameFocus();
|
||||
}
|
||||
public abstract void save();
|
||||
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float f)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ public abstract class GuiNPCInterface2 extends GuiNPCInterface
|
||||
drawDefaultBackground(); //drawDefaultBackground
|
||||
drawBackground();
|
||||
menu.drawElements(getFontRenderer(), i, j, mc, f);
|
||||
|
||||
|
||||
boolean bo = drawDefaultBackground;
|
||||
drawDefaultBackground = false;
|
||||
super.drawScreen(i, j, f);
|
||||
|
||||
Reference in new issue
Block a user