make fixgui more reliable

This commit is contained in:
Bella 2020-03-30 20:05:03 -04:00
parent 3586aeb801
commit 2ea309c4fc
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ public class GuiFrameUtil {
if (kamiGUI == null || mc.player == null) return;
List<Frame> frames = ContainerHelper.getAllChildren(Frame.class, kamiGUI);
for (Frame frame : frames) {
if (frame.getX() < 0) frame.setX(0);
if (frame.getY() < 0) frame.setY(0);
int divider = mc.gameSettings.guiScale;
if (divider == 0) divider = 3;
if (frame.getX() > (Display.getWidth() / divider)) {