aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-03-10 23:13:07 +0900
committersyeyoung <cyong06@naver.com>2021-03-10 23:13:07 +0900
commit99a8a9ab3acad6e282b1f50439028f40215fa77d (patch)
tree10c1428524253614bc065bf044e056eb834c0364 /src/main/java/kr/syeyoung/dungeonsguide/features/impl
parent92ce9024b73df31f3c88ad23a7443dec2578469c (diff)
downloadSkyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.tar.gz
Skyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.tar.bz2
Skyblock-Dungeons-Guide-99a8a9ab3acad6e282b1f50439028f40215fa77d.zip
actually we don't need it
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java2
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java6
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java51
4 files changed, 23 insertions, 40 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
index 5aa8fb4d..15e210c4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/FeatureChestPrice.java
@@ -78,7 +78,7 @@ public class FeatureChestPrice extends SimpleFeature implements GuiBackgroundRen
GlStateManager.pushMatrix();
GlStateManager.translate(left, top, 0);
- RenderUtils.drawRectSafe( 0,0,width, 30, 0xFFDDDDDD);
+ Gui.drawRect( 0,0,width, 30, 0xFFDDDDDD);
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
fr.drawString("BIN/AH Price: ", 5,5, 0xFF000000);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
index 1a686b42..d792a07c 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/boss/terminal/FeatureTerminalSolvers.java
@@ -95,14 +95,14 @@ public class FeatureTerminalSolvers extends SimpleFeature implements GuiOpenList
for (Slot currSlot : solution.getCurrSlots()) {
int x = currSlot.xDisplayPosition;
int y = currSlot.yDisplayPosition;
- RenderUtils.drawRectSafe(x, y, x + 16, y + 16, 0x7700FFFF);
+ Gui.drawRect(x, y, x + 16, y + 16, 0x7700FFFF);
}
}
if (solution.getNextSlots() != null) {
for (Slot nextSlot : solution.getNextSlots()) {
int x = nextSlot.xDisplayPosition;
int y = nextSlot.yDisplayPosition;
- RenderUtils.drawRectSafe(x, y, x + 16, y + 16, 0x77FFFF00);
+ Gui.drawRect(x, y, x + 16, y + 16, 0x77FFFF00);
}
}
GlStateManager.colorMask(true, true, true, true);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
index 2291a0e8..a14b9c99 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonMap.java
@@ -111,11 +111,11 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener,
MapProcessor mapProcessor = context.getMapProcessor();
MapData mapData = mapProcessor.getLastMapData2();
Rectangle featureRect =getFeatureRect().getRectangle();
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
GlStateManager.color(1,1,1,1);
GlStateManager.pushMatrix();;
if (mapData == null) {
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, 0xFFFF0000);
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, 0xFFFF0000);
} else {
renderMap(partialTicks,mapProcessor,mapData,context);
}
@@ -131,7 +131,7 @@ public class FeatureDungeonMap extends GuiFeature implements DungeonEndListener,
return;
}
Rectangle featureRect =getFeatureRect().getRectangle();
- RenderUtils.drawRectSafe(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
+ Gui.drawRect(0,0,featureRect.width, featureRect.height, RenderUtils.getColorAt(featureRect.x, featureRect.y, this.<AColor>getParameter("background_color").getValue()));
FontRenderer fr = getFontRenderer();
fr.drawString("Please join a dungeon to see preview", featureRect.width / 2 - fr.getStringWidth("Please join a dungeon to see preview") / 2, featureRect.height / 2 - fr.FONT_HEIGHT / 2, 0xFFFFFFFF);
GL11.glLineWidth(2);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
index c5779e2c..898c7105 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
@@ -22,10 +22,7 @@ import kr.syeyoung.dungeonsguide.roomprocessor.GeneralRoomProcessor;
import kr.syeyoung.dungeonsguide.utils.RenderUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.GuiIngameMenu;
-import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.gui.*;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.MathHelper;
@@ -75,8 +72,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
if (grp.getPath() == null)
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
@@ -92,8 +89,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
fr.drawString("Open any gui to browse", 2, fr.FONT_HEIGHT + 5, 0xFFAAAAAA);
@@ -102,14 +99,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
@Override
public void onGuiPreRender(GuiScreenEvent.DrawScreenEvent.Pre rendered) {
if (!isEnabled()) return;
- if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonAddSet
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonParameterEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonValueEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiContainer
- || Minecraft.getMinecraft().currentScreen instanceof GuiIngameMenu) return;
+ if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) return;
if (!skyblockStatus.isOnDungeon()) return;
if (skyblockStatus.getContext() == null || !skyblockStatus.getContext().getMapProcessor().isInitialized()) return;
@@ -132,8 +122,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = getFontRenderer();
GlStateManager.translate(feature.x, feature.y, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT + 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1, fr.FONT_HEIGHT + 3, 0xFF262626);
fr.drawString("Selected: ", 2,2, 0xFFAAAAAA);
if (grp.getPath() == null)
fr.drawString("Nothing", fr.getStringWidth("Selected: ") + 2,2, 0xFFAA0000);
@@ -142,8 +132,8 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
fr.drawString(route.getMechanic()+" -> "+route.getState(), fr.getStringWidth("Selected: ") + 2,2, 0xFFFFFF00);
}
GlStateManager.translate(0, fr.FONT_HEIGHT + 4, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, feature.height - fr.FONT_HEIGHT - 4, 0xFF444444);
- RenderUtils.drawRectSafe(1, 1, feature.width - 1,feature.height - fr.FONT_HEIGHT - 5, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, feature.height - fr.FONT_HEIGHT - 4, 0xFF444444);
+ Gui.drawRect(1, 1, feature.width - 1,feature.height - fr.FONT_HEIGHT - 5, 0xFF262626);
clip(new ScaledResolution(Minecraft.getMinecraft()), feature.x, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
GL11.glEnable(GL11.GL_SCISSOR_TEST);
GlStateManager.translate(0, -dy, 0);
@@ -154,9 +144,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
for (int i = 0; i < sortedMechanics.size(); i++) {
Object obj = sortedMechanics.get(i);
if (selected == i) {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
} else if (new Rectangle(feature.x, feature.y + fr.FONT_HEIGHT + 6 - dy + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
}
if (obj instanceof DungeonMechanic) {
String name = sortedMechanicsName.get(i);
@@ -168,7 +158,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
} else if ("$SPECIAL-CANCEL".equals(obj)) {
fr.drawString("Cancel Current", 3, i * fr.FONT_HEIGHT, 0xFF00FFFF);
} else {
- RenderUtils.drawRectSafe(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
+ Gui.drawRect(-1, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF444444);
fr.drawString((String)obj, 3, i * fr.FONT_HEIGHT, 0xFFEEEEEE);
}
}
@@ -177,14 +167,14 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
if (selected != -1) {
clip(new ScaledResolution(Minecraft.getMinecraft()), feature.x + feature.width, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
GlStateManager.translate(feature.width, selected * fr.FONT_HEIGHT, 0);
- RenderUtils.drawRectSafe(0, 0, feature.width, fr.FONT_HEIGHT * possibleStates.size() + 4, 0xFF444444);
- RenderUtils.drawRectSafe(-1, 1, feature.width - 1, fr.FONT_HEIGHT * possibleStates.size() + 3, 0xFF262626);
+ Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT * possibleStates.size() + 4, 0xFF444444);
+ Gui.drawRect(-1, 1, feature.width - 1, fr.FONT_HEIGHT * possibleStates.size() + 3, 0xFF262626);
GlStateManager.translate(2,2, 0);
Point popupStart = new Point(feature.x + feature.width, (selected + 1) * fr.FONT_HEIGHT +6 + feature.y - dy + 2);
for (int i = 0; i < possibleStates.size(); i++) {
if (new Rectangle(feature.x + feature.width, popupStart.y + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
- RenderUtils.drawRectSafe(-2, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
+ Gui.drawRect(-2, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
}
fr.drawString(possibleStates.get(i), 0, i * fr.FONT_HEIGHT, 0xFFFFFFFF);
}
@@ -313,14 +303,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
@Override
public void onMouseInput(GuiScreenEvent.MouseInputEvent.Pre mouseInputEvent) {
if (!isEnabled()) return;
- if (Minecraft.getMinecraft().currentScreen instanceof GuiGuiLocationConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiConfig
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonRoomEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonAddSet
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonParameterEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiDungeonValueEdit
- || Minecraft.getMinecraft().currentScreen instanceof GuiContainer
- || Minecraft.getMinecraft().currentScreen instanceof GuiIngameMenu) return;
+ if (!(Minecraft.getMinecraft().currentScreen instanceof GuiChat)) return;
if (!skyblockStatus.isOnDungeon()) return;