mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 22:29:50 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -2,35 +2,36 @@ package noppes.npcs.client.gui.util;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
public class SubGuiInterface extends GuiNPCInterface{
|
||||
public GuiScreen parent;
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
}
|
||||
@Override
|
||||
public void close() {
|
||||
if(parent instanceof ISubGuiListener)
|
||||
((ISubGuiListener)parent).subGuiClosed(this);
|
||||
|
||||
if(parent instanceof GuiNPCInterface)
|
||||
((GuiNPCInterface)parent).closeSubGui(this);
|
||||
else if(parent instanceof GuiContainerNPCInterface)
|
||||
((GuiContainerNPCInterface)parent).closeSubGui(this);
|
||||
else
|
||||
super.close();
|
||||
|
||||
}
|
||||
|
||||
public GuiScreen getParent(){
|
||||
if(parent instanceof SubGuiInterface)
|
||||
return ((SubGuiInterface)parent).getParent();
|
||||
return parent;
|
||||
}
|
||||
public class SubGuiInterface extends GuiNPCInterface {
|
||||
public GuiScreen parent;
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float f){
|
||||
super.drawScreen(i, j, f);
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (parent instanceof ISubGuiListener)
|
||||
((ISubGuiListener) parent).subGuiClosed(this);
|
||||
|
||||
if (parent instanceof GuiNPCInterface)
|
||||
((GuiNPCInterface) parent).closeSubGui(this);
|
||||
else if (parent instanceof GuiContainerNPCInterface)
|
||||
((GuiContainerNPCInterface) parent).closeSubGui(this);
|
||||
else
|
||||
super.close();
|
||||
|
||||
}
|
||||
|
||||
public GuiScreen getParent() {
|
||||
if (parent instanceof SubGuiInterface)
|
||||
return ((SubGuiInterface) parent).getParent();
|
||||
return parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int i, int j, float f) {
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user