aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-23 17:24:58 +0900
committersyeyoung <cyong06@naver.com>2021-05-23 17:24:58 +0900
commita77ca3e0af83ac2b8a2e2510799f010efc794a22 (patch)
tree00ace7f3bf764060e6b64c42fc77ccac0d164816
parent03c7a600bd1cd038e301e62b98d201e5e25309ce (diff)
downloadSkyblock-Dungeons-Guide-a77ca3e0af83ac2b8a2e2510799f010efc794a22.tar.gz
Skyblock-Dungeons-Guide-a77ca3e0af83ac2b8a2e2510799f010efc794a22.tar.bz2
Skyblock-Dungeons-Guide-a77ca3e0af83ac2b8a2e2510799f010efc794a22.zip
Fix screen turning black
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java14
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java4
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRoomName.java2
3 files changed, 18 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java
index 347483d2..334f9997 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java
@@ -104,6 +104,11 @@ public class DungeonListener {
}
}
GlStateManager.enableBlend();
+ GlStateManager.color(1,1,1,1);
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.popAttrib();
+ GlStateManager.enableAlpha();
} catch (Throwable e2) {e2.printStackTrace();}
}
@SubscribeEvent
@@ -227,7 +232,7 @@ public class DungeonListener {
@SubscribeEvent
public void onRender(RenderGameOverlayEvent.Post postRender) {
try {
- if (postRender.type != RenderGameOverlayEvent.ElementType.TEXT) return;
+ if (postRender.type != RenderGameOverlayEvent.ElementType.ALL) return;
JsonObject obj = DungeonsGuide.getDungeonsGuide().getAuthenticator().getJwtPayload(DungeonsGuide.getDungeonsGuide().getAuthenticator().getToken());
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
@@ -244,6 +249,7 @@ public class DungeonListener {
SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
if (!skyblockStatus.isOnDungeon()) return;
+ GlStateManager.pushAttrib();
if (skyblockStatus.getContext() != null) {
DungeonContext context = skyblockStatus.getContext();
EntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer;
@@ -259,6 +265,12 @@ public class DungeonListener {
}
GlStateManager.enableBlend();
+ GlStateManager.color(1,1,1,1);
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
+ GlStateManager.popAttrib();
+ GlStateManager.enableAlpha();
} catch (Throwable e) {
e.printStackTrace();
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
index 5d2cdb9f..dd4ed7e4 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/GuiFeature.java
@@ -31,6 +31,7 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper;
import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
import org.w3c.dom.css.Rect;
import javax.sound.midi.MidiEvent;
@@ -75,6 +76,9 @@ public abstract class GuiFeature extends AbstractFeature implements ScreenRender
GlStateManager.popAttrib();
GlStateManager.enableBlend();
+ GlStateManager.color(1,1,1,1);
+ GL14.glBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);
}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRoomName.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRoomName.java
index 6a1ff781..54631fcb 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRoomName.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/dungeon/FeatureDungeonRoomName.java
@@ -69,7 +69,7 @@ public class FeatureDungeonRoomName extends TextHUDFeature {
@Override
public List<String> getUsedTextStyle() {
- return Arrays.asList("roomname");
+ return Arrays.asList("roomname", "in");
}
@Override