diff options
Diffstat (limited to 'mod/src/main/java/kr')
-rwxr-xr-x | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java | 13 | ||||
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java index f3c600fc..5ef83afa 100755 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java @@ -51,7 +51,10 @@ import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.gui.*; import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.network.NetworkPlayerInfo; +import net.minecraft.client.renderer.ThreadDownloadImageData; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.ITextureObject; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.IResourcePack; import net.minecraft.command.CommandHandler; @@ -60,6 +63,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraft.network.play.server.S38PacketPlayerListItem; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.client.ClientCommandHandler; import net.minecraftforge.client.event.GuiOpenEvent; @@ -333,6 +337,15 @@ public class DungeonsGuide implements DGInterface { } } + Map<ResourceLocation, ITextureObject> mapTextureObjects = ReflectionHelper.getPrivateValue(TextureManager.class, Minecraft.getMinecraft().getTextureManager(), "mapTextureObjects", "field_110585_a", "b"); + for (ITextureObject value : mapTextureObjects.values()) { + if (value instanceof ThreadDownloadImageData) { + ReflectionHelper.setPrivateValue(ThreadDownloadImageData.class,(ThreadDownloadImageData) value, null, "imageBuffer", "field_110563_c", "k"); + } + } + + + World world = Minecraft.getMinecraft().getRenderManager().worldObj; if (world != null) { for (AbstractClientPlayer entity : world.getEntities(AbstractClientPlayer.class, input -> true)) { diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java index cde3f7e2..c6fecb33 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java @@ -76,7 +76,6 @@ public class GameSDK { public static void cleanup() { // com.sun.jna.CallbackReference has reference of DiscordCallback. idk how i should approach fixing this -> I would better write native lib myself later. if (System.getProperty("dg.safe") == null) return; - Map infos = ReflectionHelper.getPrivateValue(Structure.class, null, "layoutInfo"); infos.clear(); Map options = ReflectionHelper.getPrivateValue(Native.class, null, "options"); |