diff options
author | syeyoung <cyong06@naver.com> | 2021-08-08 18:21:51 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-08 22:02:06 +0900 |
commit | eaaac61857654f7f629fa9ada669f40301009e31 (patch) | |
tree | 98189a04dcb1cd351d8ab30e31e932e65ad9454d /src/main/java/kr/syeyoung/dungeonsguide/party | |
parent | a6eb8b879e8bad88aa334c3e681067e314723c59 (diff) | |
download | Skyblock-Dungeons-Guide-eaaac61857654f7f629fa9ada669f40301009e31.tar.gz Skyblock-Dungeons-Guide-eaaac61857654f7f629fa9ada669f40301009e31.tar.bz2 Skyblock-Dungeons-Guide-eaaac61857654f7f629fa9ada669f40301009e31.zip |
- GameSDK Binding
Welp it was painful writing a tool to generating these bindings, then manually correcting classes
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/party')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java | 15 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java index 2e8c8702..a045ea22 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java @@ -20,7 +20,6 @@ package kr.syeyoung.dungeonsguide.party; import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.utils.TextUtils; -import net.arikia.dev.drpc.DiscordRPC; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -77,7 +76,7 @@ public class PartyInviteViewer { partyJoinRequestList.add(joinRequest); } } else if (!isOnHypixel){ - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); partyJoinRequestList.add(joinRequest); } else if (joinRequest.getExpire() < System.currentTimeMillis()) { partyJoinRequestList.add(joinRequest); @@ -107,21 +106,21 @@ public class PartyInviteViewer { if (joinRequest.getAcceptRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.ACCEPT); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.YES); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.YES); return; } if (joinRequest.getDenyRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.DENY); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); return; } if (joinRequest.getIgnoreRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.IGNORE); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.IGNORE); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.IGNORE); return; } @@ -195,7 +194,7 @@ public class PartyInviteViewer { Gui.drawRect(0, 0,width,height, 0xFF23272a); Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33); { - String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().userId+"/"+partyJoinRequest.getDiscordUser().avatar+".png"; + String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().id.longValue()+"/"+partyJoinRequest.getDiscordUser().avatar+".png"; Future<LoadedImage> loadedImageFuture = loadImage(avatar); LoadedImage loadedImage = null; if (loadedImageFuture.isDone()) { @@ -237,11 +236,11 @@ public class PartyInviteViewer { GlStateManager.pushMatrix(); GlStateManager.scale(3.0,3.0,1.0); - fr.drawString(partyJoinRequest.getDiscordUser().username, 0,0, 0xFFFFFFFF, true); + fr.drawString(partyJoinRequest.getDiscordUser().username+"", 0,0, 0xFFFFFFFF, true); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); - GlStateManager.translate(fr.getStringWidth(partyJoinRequest.getDiscordUser().username) * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0); + GlStateManager.translate(fr.getStringWidth(partyJoinRequest.getDiscordUser().username+"") * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0); fr.drawString("#"+partyJoinRequest.getDiscordUser().discriminator, 0,0,0xFFaaaaaa, true); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java index eb7e8f57..06b04e20 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java @@ -18,14 +18,12 @@ package kr.syeyoung.dungeonsguide.party; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUser; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; -import net.arikia.dev.drpc.DiscordRPC; -import net.arikia.dev.drpc.DiscordUser; import java.awt.*; -import java.time.Instant; @Data public class PartyJoinRequest { |