From 292fbd05e13271ca3ad99ebe00ae4302e04848f3 Mon Sep 17 00:00:00 2001
From: Eryk Ruta <70776766+kingstefan26@users.noreply.github.com>
Date: Tue, 1 Nov 2022 15:51:30 +0100
Subject: 3rd time is the charm (#70)
* Updated some dependencies, used my crusty skytils forgegradle fork + removed the IRRELEVANT hytils fixes. generally made the thing build
* made the logs less annoying
* temp fix so it doesn't throw an exception
* FAT REFACTOR
General refactor on
Authenticator.java
DungeonsGuide.java
Main.java
removed unnecessary imports where not needed
to be removed DGInterface.java (no real reason to exist)
in DungeonsGuide.java made the retry stomp a singe-thread executor, so it doesn't leak when offline
added an "offline mode" so it doesn't just error when server down
TODO: move auth to DungeonsGuide.java and make it retry when network down on launch
* New auth implementation that should replace the old one:
does all the things the old one did
removed progressBar cuz it would make the impl 3x more complicated in the name of a splash screen
added a token changed event (so now it supports re-logging with a different account)
code is (should) be more readable / extensible
TODO: surgically replace Authenticator.java with new impl AND support re-logging
* Made the chat processor logger name less obnoxious
* implemented my implementation of an implementation of auth
can and is very buggy, essentially the loading of the remote classes but the mod works so idk
TODO: MAKE STOMP NOT DO STUFF TILL STOMPCONNECTED IS EMITTED
* fix for stomp client null bc forge events not going tru on pre-init
TODO: make work and test the web loadable classes, then make all the stuff that relies on stomp not throw exceptions when stomp is not connected
* move the create auth method into AuthProvider interface,
so we don't clutter AuthManager with implementation details
* Decouple AuthProviderUtil and DgAuth,
move some stuff around and make it more readable
* moved AuthUtil to make more sense
* de-clutter the tree a little bit
* Inline StompClientStatus.java / refactor
* inline the useless interface
* refactoringgg
* fix ahUtils exeption spam
* small StompClient refactor
* fix GLCursors exeption spam + logger
* make sure we are authenticated when downloading resources
* new .destination("value") instead of .header("destination", "value")
* StompMessageHandler -> StompMessageSubscription
* Introduced StompManager
* fix dungeon map not showing ppl heads
* ehhh
* wip (commit cuz im chekig out)
* fix player profile not never loading in chat
* remove this specific line
* fix player profile not never loading in chat
* cut out hychat like a cancer
* ApiFetchur now caches whole players not single profiles,
added a switch profile button in gui
* ugh git
* Revert "cut out hychat like a cancer"
This reverts commit 2ee11afa
* ugh git x2
* I tried, good luck maintaining this
* forgot to uncomment hychat fix
* make my new party ready work and look ok
* change the look and add some "somewhere" locations
* make stomp connection "null safe"
* i hate git
* introduce callbacks on parameter change for cleaner code
add one example
* impl new system,
half way done
* now shows which profile is now selected
put button on top
a lil refactor
* fix player profile sometimes not loading
* add players knowing who is using dg (try to)
* announcing that we are a dg user will get reworked in the future
* update deps
* make it not spam logs
* sanity check for premium features so it doesn't 403
* add YoMamaOutdated that checks if you are using outdated dg
* hychat?? anyone
* try catch in FeatureRegistry
* added Ether transmission ability
* chat shredder borken, disabled for now
* party deserves its own folder
* dungeon stuff in dungeon folder
* events folders moved
* fix score data collection hanging forever if stomp is not connected
* fix stomp never connecting
* re-add the removed
* fix wonky rendering
* server side implementation is not ready, canning this for a future release
* attempt to fix heads loading on main thread
* discord
* me when sonar lint
* new consumer based stomp subscriptions
* replace old with new subscriptions
* remove the remains of StompSubscription and replace CloseListener with a forge event
* StompSubscription is now a functional interface
* remove unnecessary event message chains,
feature logic should be in the feature
* fix events being set up wrongly
* Revert "fix events being set up wrongly"
This reverts commit e6ea7efa557a5f5c8a3ea33be998717bc024b8cb.
* Revert "remove unnecessary event message chains,"
This reverts commit 96f508bae85b33cdcef6be19226c00fc52a1439b.
* fix stomp client sending payload object instead of the actual payload
* fix null pointer on empty party
* fix players with cosmetics name being white in tab
* added message when not connected to dg
changed YoMamaOutdated to use CloudFlare workers
added client sided message queue
* the mod doesn't init when outdated
* mcmod.info
* dont busy wait in authmenager
* test pepole crusty tests
* chill out the authmanager
* name the thread pool in auth manager
* clear most compiler warnings
* make outdated check allow to play without the mod initialized
* make first startup VERY noticeable, move config creation to main
* major dungeon package refactor
* refactor checkpoint
* refactor checkpoint #1
* final refactor checkpoint #2
* remove the player if from version check, made the version check not nesssery for playing
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* remove trap room fix that didnt fix anything
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* make secret beacons optional
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* make the checkmarks on map align with the rest of everyone
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* removed debug function
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move the menus to make more sense + make destination text on secrets optional
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* improve dungeonMap performance by ~90%
temporarly disabled 9 slot map player location due to bugs
fix DungeonContext not getting player from ScoreBoard
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* add epic countdown on dungeon start (still wip)
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* added a option to cache blockstaes
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* added TabListUtil
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* fixed epic countdown
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* (i want to sleep) made all the dungeon room detection async
TODO: fix ol the bugs i created by doing that
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* stuff still broken but almost playable, unlike last commit
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* upload build jar to discord
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* cache the deps for the love of god
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* who needs linux and 32bit windows anyway
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* only upload to discord on beta branch
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* added "kick" when a member joins party
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move stuff that sends chat to player into a separate class
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* use our chat queue instead of calling `thePlayer.addChatMessage` to proxy ourselves from 1.8 code
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* Added and implemented MortDetector2000.java
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* extract duplicate + make more readable
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* added dummy support in FeatureDebugTrap
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* gradle now puts version in mcmod.info
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* remove side effects from DgAuth.java
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move debug commands into debug CommandDgDebug.java
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* fix key being wrong
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move epic countdown to dungeon huds, clean up
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* Revert "who needs linux and 32bit windows anyway"
This reverts commit 0f3c2d544a70fc799cd3215dad5e997c0c8b6c06.
* make FeatureRegistry not static initialise to get rid of "ClassNotDefined" errors
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* null check on Exception since it threw NullPointers
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* finish up progress bar in DungeonsGuide.java
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* warn about null features
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move stuff around in SkyblockStatus, move the stuff that updates status into SkyblockStatus from DungeonListener
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* rename DungeonGodObject.java to DungeonFacade.java
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* add cleanChat clause in FeatureEpicCountdown
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* implement getPreRequisites and isComplete in ActionBreakWithSuperBoom
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* clean up FeatureParameter
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* eliminate possible state inconsistency in DungeonListener
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move percentage from DungeonFacade to DungeonContext
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move `purge` and `partymax` back into CommandDungeonsGuide
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* stop repeating ReceiveChatQueue in ChatTransmitter
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* Clean up DungeonsGuide
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move `sendDebugChat` to `ChatTransmitter.java`
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* change CommandDgDebug into a `else if` from an `switch` because some bigot decided its better
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* duplicate code since it currently doesn't make sense, to be reworked
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* fix typo
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* remove the trycatch so we fail fast
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* fix null pointer when trying to get fontRenderer before minecraft is initialised
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* broken checkpoint 0
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* broken checkpoint 1
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* Revert "broken checkpoint 1"
This reverts commit 64985e6287c7b5650b509668e42b9803e25c419c.
* Revert "broken checkpoint 0"
This reverts commit 5f62e1345d9c8e7f66f1e5792004a05027913d92.
* Revert "fix null pointer when trying to get fontRenderer before minecraft is initialised"
This reverts commit 57d92a78d31c410f699b58c8995c94055d57e2a4.
* Revert "remove the trycatch so we fail fast"
This reverts commit 12772255ed575e411fb99edf37ec16d0e5f42924.
* Revert "fix typo"
This reverts commit aa96cc2436d3ead42d53ead78f3334fac5100713.
* Revert "duplicate code since it currently doesn't make sense, to be reworked"
This reverts commit 6d71b88e3102d23bcfd90d85e8996327776fd52f.
* Revert "change CommandDgDebug into a `else if` from an `switch` because some bigot decided its better"
This reverts commit ffea84d9b5fd4adbe034a88249bc920eafa7c53a.
* Revert "move `sendDebugChat` to `ChatTransmitter.java`"
This reverts commit 5b8b2e22fff33768134a01c15c7650100ebb9257.
* Revert "Clean up DungeonsGuide"
This reverts commit 2069ad3ebc4344eb1e778954dc1d8f6c9303de69.
* fix typo
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
(cherry picked from commit aa96cc2436d3ead42d53ead78f3334fac5100713)
* duplicate code since it currently doesn't make sense, to be reworked
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
(cherry picked from commit 6d71b88e3102d23bcfd90d85e8996327776fd52f)
* change CommandDgDebug into a `else if` from an `switch` because some bigot decided its better
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
(cherry picked from commit ffea84d9b5fd4adbe034a88249bc920eafa7c53a)
* move debug chat into ChatTransmitter
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* null pointer in SkyblockStatus bc context was not initialised yet
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move dungeon starting door detection up the tree since it was a duplicate in both children, inline MortDetector2000
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move dungeon name to DungeonContext
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* clean up Main
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* separate the "loader" and "mod"
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* separate DungeonsGuide and Main even more
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* change singleton implementation of DungeonsGuide
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move classes since their paths are hardcoded into roomdatas
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* create CatacombsDataProvider.java and implement it
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* remove unnecessary `DungeonsGuide.getDungeonsGuide();` (IntelliJ refactor bug)
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* move `help` text in commands
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* a certain someone hates switch statements
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* remove my version check, since we have to wait for out lord and savior to make his own
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* make `Main` and `DungeonsGuide` compatible with supported jar classloading
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* make the beta upload action run on push
since it didnt get the secret on pull request and failed anyway,
TODO: make the jar name not hardcoded
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
* upload all jar
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
Signed-off-by: kingstefan26 <70776766+kingstefan26@users.noreply.github.com>
Co-authored-by: syeyoung <42869671+cyoung06@users.noreply.github.com>
---
.../syeyoung/dungeonsguide/mod/DungeonsGuide.java | 260 ++++
.../kr/syeyoung/dungeonsguide/mod/Keybinds.java | 47 +
.../syeyoung/dungeonsguide/mod/SkyblockStatus.java | 155 +++
.../dungeonsguide/mod/chat/ChatProcessResult.java | 31 +
.../dungeonsguide/mod/chat/ChatProcessor.java | 118 ++
.../dungeonsguide/mod/chat/ChatSubscriber.java | 26 +
.../dungeonsguide/mod/chat/ChatTransmitter.java | 69 +
.../dungeonsguide/mod/commands/CommandDgDebug.java | 450 +++++++
.../mod/commands/CommandDungeonsGuide.java | 172 +++
.../dungeonsguide/mod/commands/CommandReparty.java | 104 ++
.../syeyoung/dungeonsguide/mod/config/Config.java | 65 +
.../mod/config/guiconfig/ConfigPanelCreator.java | 40 +
.../mod/config/guiconfig/GuiConfigV2.java | 59 +
.../mod/config/guiconfig/MCategory.java | 103 ++
.../mod/config/guiconfig/MCategoryElement.java | 82 ++
.../mod/config/guiconfig/MFeature.java | 154 +++
.../mod/config/guiconfig/MFeatureEdit.java | 113 ++
.../mod/config/guiconfig/MNotFound.java | 38 +
.../mod/config/guiconfig/MPanelCategory.java | 83 ++
.../mod/config/guiconfig/MParameterEdit.java | 219 ++++
.../mod/config/guiconfig/NestedCategory.java | 54 +
.../mod/config/guiconfig/RootConfigPanel.java | 311 +++++
.../guiconfig/location/GuiGuiLocationConfig.java | 166 +++
.../mod/config/guiconfig/location/Marker.java | 45 +
.../config/guiconfig/location/PanelDelegate.java | 403 ++++++
.../dungeonsguide/mod/config/types/AColor.java | 63 +
.../mod/config/types/GUIRectangle.java | 81 ++
.../dungeonsguide/mod/config/types/TCAColor.java | 51 +
.../dungeonsguide/mod/config/types/TCBoolean.java | 39 +
.../dungeonsguide/mod/config/types/TCColor.java | 41 +
.../dungeonsguide/mod/config/types/TCFloat.java | 39 +
.../mod/config/types/TCGUIRectangle.java | 50 +
.../dungeonsguide/mod/config/types/TCInteger.java | 39 +
.../dungeonsguide/mod/config/types/TCKeybind.java | 39 +
.../mod/config/types/TCRectangle.java | 51 +
.../dungeonsguide/mod/config/types/TCString.java | 39 +
.../mod/config/types/TCStringList.java | 51 +
.../mod/config/types/TCTextStyle.java | 52 +
.../mod/config/types/TCTextStyleList.java | 54 +
.../mod/config/types/TypeConverter.java | 29 +
.../mod/config/types/TypeConverterRegistry.java | 52 +
.../mod/cosmetics/ActiveCosmetic.java | 12 +
.../dungeonsguide/mod/cosmetics/CosmeticData.java | 14 +
.../mod/cosmetics/CosmeticsManager.java | 288 ++++
.../mod/cosmetics/CustomNetworkPlayerInfo.java | 108 ++
.../mod/cosmetics/CustomPacketPlayerListItem.java | 38 +
.../dungeonsguide/mod/cosmetics/IChatReplacer.java | 26 +
.../chatreplacers/ChatReplacerChatByMe.java | 106 ++
.../cosmetics/chatreplacers/ChatReplacerCoop.java | 119 ++
.../chatreplacers/ChatReplacerMessage.java | 106 ++
.../cosmetics/chatreplacers/ChatReplacerPV.java | 119 ++
.../chatreplacers/ChatReplacerSocialOptions.java | 117 ++
.../chatreplacers/ChatReplacerViewProfile.java | 130 ++
.../dungeonsguide/mod/discord/gamesdk/GameSDK.java | 87 ++
.../mod/discord/gamesdk/jna/GameSDKTypeMapper.java | 46 +
.../mod/discord/gamesdk/jna/NativeGameSDK.java | 50 +
.../gamesdk/jna/datastruct/DiscordActivity.java | 50 +
.../jna/datastruct/DiscordActivityAssets.java | 42 +
.../jna/datastruct/DiscordActivityParty.java | 40 +
.../jna/datastruct/DiscordActivitySecrets.java | 41 +
.../jna/datastruct/DiscordActivityTimestamps.java | 40 +
.../jna/datastruct/DiscordCreateParams.java | 72 +
.../gamesdk/jna/datastruct/DiscordEntitlement.java | 42 +
.../gamesdk/jna/datastruct/DiscordFileStat.java | 42 +
.../jna/datastruct/DiscordImageDimensions.java | 40 +
.../gamesdk/jna/datastruct/DiscordImageHandle.java | 43 +
.../gamesdk/jna/datastruct/DiscordInputMode.java | 41 +
.../gamesdk/jna/datastruct/DiscordLobby.java | 47 +
.../gamesdk/jna/datastruct/DiscordOAuth2Token.java | 42 +
.../gamesdk/jna/datastruct/DiscordPartySize.java | 40 +
.../gamesdk/jna/datastruct/DiscordPresence.java | 40 +
.../jna/datastruct/DiscordRelationship.java | 41 +
.../discord/gamesdk/jna/datastruct/DiscordSku.java | 44 +
.../gamesdk/jna/datastruct/DiscordSkuPrice.java | 41 +
.../gamesdk/jna/datastruct/DiscordStruct.java | 35 +
.../gamesdk/jna/datastruct/DiscordUser.java | 43 +
.../jna/datastruct/DiscordUserAchievement.java | 44 +
.../enumuration/EDiscordActivityActionType.java | 67 +
.../EDiscordActivityJoinRequestReply.java | 68 +
.../jna/enumuration/EDiscordActivityType.java | 69 +
.../jna/enumuration/EDiscordCreateFlags.java | 67 +
.../jna/enumuration/EDiscordEntitlementType.java | 72 +
.../gamesdk/jna/enumuration/EDiscordImageType.java | 66 +
.../jna/enumuration/EDiscordInputModeType.java | 67 +
.../jna/enumuration/EDiscordLobbySearchCast.java | 67 +
.../enumuration/EDiscordLobbySearchComparison.java | 71 +
.../enumuration/EDiscordLobbySearchDistance.java | 69 +
.../gamesdk/jna/enumuration/EDiscordLobbyType.java | 67 +
.../gamesdk/jna/enumuration/EDiscordLogLevel.java | 69 +
.../jna/enumuration/EDiscordPremiumType.java | 68 +
.../jna/enumuration/EDiscordRelationshipType.java | 71 +
.../gamesdk/jna/enumuration/EDiscordResult.java | 109 ++
.../gamesdk/jna/enumuration/EDiscordSkuType.java | 69 +
.../gamesdk/jna/enumuration/EDiscordStatus.java | 69 +
.../gamesdk/jna/enumuration/EDiscordUserFlag.java | 70 +
.../jna/interfacestruct/GameSDKCallback.java | 30 +
.../interfacestruct/IDiscordAchievementEvents.java | 39 +
.../IDiscordAchievementManager.java | 57 +
.../interfacestruct/IDiscordActivityEvents.java | 50 +
.../interfacestruct/IDiscordActivityManager.java | 63 +
.../IDiscordApplicationManager.java | 60 +
.../gamesdk/jna/interfacestruct/IDiscordCore.java | 91 ++
.../jna/interfacestruct/IDiscordImageManager.java | 52 +
.../jna/interfacestruct/IDiscordLobbyEvents.java | 64 +
.../jna/interfacestruct/IDiscordLobbyManager.java | 148 +++
.../IDiscordLobbyMemberTransaction.java | 42 +
.../interfacestruct/IDiscordLobbySearchQuery.java | 52 +
.../interfacestruct/IDiscordLobbyTransaction.java | 57 +
.../jna/interfacestruct/IDiscordNetworkEvents.java | 45 +
.../interfacestruct/IDiscordNetworkManager.java | 65 +
.../jna/interfacestruct/IDiscordOverlayEvents.java | 38 +
.../interfacestruct/IDiscordOverlayManager.java | 56 +
.../IDiscordRelationshipEvents.java | 42 +
.../IDiscordRelationshipManager.java | 53 +
.../interfacestruct/IDiscordStorageManager.java | 81 ++
.../jna/interfacestruct/IDiscordStoreEvents.java | 43 +
.../jna/interfacestruct/IDiscordStoreManager.java | 73 ++
.../jna/interfacestruct/IDiscordUserEvents.java | 38 +
.../jna/interfacestruct/IDiscordUserManager.java | 53 +
.../jna/interfacestruct/IDiscordVoiceEvents.java | 39 +
.../jna/interfacestruct/IDiscordVoiceManager.java | 72 +
.../gamesdk/jna/typedef/DiscordClientID.java | 28 +
.../jna/typedef/DiscordNetworkChannelId.java | 28 +
.../gamesdk/jna/typedef/DiscordNetworkPeerId.java | 28 +
.../gamesdk/jna/typedef/DiscordSnowflake.java | 28 +
.../gamesdk/jna/typedef/DiscordTimestamp.java | 28 +
.../gamesdk/jna/typedef/DiscordVersion.java | 28 +
.../mod/discord/gamesdk/jna/typedef/Int32.java | 31 +
.../mod/discord/gamesdk/jna/typedef/Int64.java | 31 +
.../mod/discord/gamesdk/jna/typedef/UInt32.java | 31 +
.../mod/discord/gamesdk/jna/typedef/UInt64.java | 31 +
.../mod/discord/gamesdk/jna/typedef/UInt8.java | 31 +
.../mod/discord/rpc/JDiscordActivity.java | 72 +
.../mod/discord/rpc/JDiscordRelation.java | 42 +
.../mod/discord/rpc/JDiscordUser.java | 40 +
.../mod/discord/rpc/RichPresenceManager.java | 251 ++++
.../mod/dungeon/DungeonActionContext.java | 35 +
.../dungeonsguide/mod/dungeon/DungeonContext.java | 218 ++++
.../dungeonsguide/mod/dungeon/DungeonFacade.java | 35 +
.../dungeonsguide/mod/dungeon/MapProcessor.java | 535 ++++++++
.../mod/dungeon/actions/AbstractAction.java | 61 +
.../dungeon/actions/ActionBreakWithSuperBoom.java | 103 ++
.../mod/dungeon/actions/ActionChangeState.java | 75 ++
.../mod/dungeon/actions/ActionClick.java | 82 ++
.../mod/dungeon/actions/ActionClickSet.java | 90 ++
.../mod/dungeon/actions/ActionComplete.java | 41 +
.../mod/dungeon/actions/ActionDropItem.java | 82 ++
.../mod/dungeon/actions/ActionInteract.java | 89 ++
.../mod/dungeon/actions/ActionKill.java | 90 ++
.../mod/dungeon/actions/ActionMove.java | 122 ++
.../mod/dungeon/actions/ActionMoveNearestAir.java | 92 ++
.../mod/dungeon/actions/ActionRoot.java | 47 +
.../mod/dungeon/actions/tree/ActionRoute.java | 136 ++
.../actions/tree/ActionRouteProperties.java | 16 +
.../mod/dungeon/actions/tree/ActionTree.java | 94 ++
.../mod/dungeon/actions/tree/ActionTreeUtil.java | 83 ++
.../mod/dungeon/doorfinder/DungeonDoor.java | 87 ++
.../doorfinder/DungeonSpecificDataProvider.java | 39 +
.../DungeonSpecificDataProviderRegistry.java | 42 +
.../mod/dungeon/doorfinder/EDungeonDoorType.java | 38 +
.../catacombs/CatacombsDataProvider.java | 75 ++
.../catacombs/impl/MasterModeDataProvider.java | 64 +
.../catacombs/impl/NormalModeDataProvider.java | 101 ++
.../mod/dungeon/events/DungeonEvent.java | 41 +
.../mod/dungeon/events/DungeonEventData.java | 25 +
.../mod/dungeon/events/DungeonEventHolder.java | 32 +
.../mod/dungeon/events/SerializableBlockPos.java | 38 +
.../events/impl/DungeonCryptBrokenEvent.java | 35 +
.../mod/dungeon/events/impl/DungeonDeathEvent.java | 36 +
.../dungeon/events/impl/DungeonMapUpdateEvent.java | 34 +
.../dungeon/events/impl/DungeonNodataEvent.java | 29 +
.../events/impl/DungeonPuzzleFailureEvent.java | 34 +
.../events/impl/DungeonRoomDiscoverEvent.java | 46 +
.../events/impl/DungeonSecretCountChangeEvent.java | 37 +
.../events/impl/DungeonStateChangeEvent.java | 40 +
.../mod/dungeon/map/DungeonMapData.java | 121 ++
.../mod/dungeon/pathfinding/AStarCornerCut.java | 189 +++
.../mod/dungeon/pathfinding/AStarFineGrid.java | 182 +++
.../mod/dungeon/pathfinding/CachedWorld.java | 85 ++
.../mod/dungeon/pathfinding/JPSPathfinder.java | 306 +++++
.../pathfinding/NodeProcessorDungeonRoom.java | 144 ++
.../mod/dungeon/pathfinding/ThetaStar.java | 209 +++
.../mod/dungeon/roomedit/EditingContext.java | 83 ++
.../mod/dungeon/roomedit/Parameter.java | 39 +
.../mod/dungeon/roomedit/gui/GuiDungeonAddSet.java | 136 ++
.../roomedit/gui/GuiDungeonParameterEdit.java | 173 +++
.../dungeon/roomedit/gui/GuiDungeonRoomEdit.java | 68 +
.../dungeon/roomedit/gui/GuiDungeonValueEdit.java | 127 ++
.../mechanicedit/ValueEditBreakableWall.java | 143 ++
.../roomedit/mechanicedit/ValueEditDoor.java | 157 +++
.../roomedit/mechanicedit/ValueEditDummy.java | 121 ++
.../roomedit/mechanicedit/ValueEditFairySoul.java | 118 ++
.../roomedit/mechanicedit/ValueEditJournal.java | 122 ++
.../roomedit/mechanicedit/ValueEditLever.java | 133 ++
.../roomedit/mechanicedit/ValueEditNPC.java | 121 ++
.../roomedit/mechanicedit/ValueEditOnewayDoor.java | 143 ++
.../mechanicedit/ValueEditOnewayLever.java | 137 ++
.../mechanicedit/ValueEditPressurePlate.java | 136 ++
.../roomedit/mechanicedit/ValueEditSecret.java | 129 ++
.../roomedit/mechanicedit/ValueEditTomb.java | 118 ++
.../dungeon/roomedit/panes/ActionDisplayPane.java | 82 ++
.../roomedit/panes/ActionTreeDisplayPane.java | 216 +++
.../mod/dungeon/roomedit/panes/DynamicEditor.java | 29 +
.../dungeon/roomedit/panes/GeneralEditPane.java | 286 ++++
.../roomedit/panes/ProcessorParameterEditPane.java | 144 ++
.../roomedit/panes/RoomDataDisplayPane.java | 126 ++
.../roomedit/panes/RoomMatchDisplayPane.java | 152 +++
.../dungeon/roomedit/panes/RoommatchingPane.java | 84 ++
.../mod/dungeon/roomedit/panes/SecretEditPane.java | 156 +++
.../mod/dungeon/roomedit/valueedit/ValueEdit.java | 27 +
.../roomedit/valueedit/ValueEditAColor.java | 339 +++++
.../roomedit/valueedit/ValueEditBoolean.java | 101 ++
.../dungeon/roomedit/valueedit/ValueEditColor.java | 287 ++++
.../roomedit/valueedit/ValueEditCreator.java | 29 +
.../dungeon/roomedit/valueedit/ValueEditFloat.java | 99 ++
.../roomedit/valueedit/ValueEditInteger.java | 99 ++
.../dungeon/roomedit/valueedit/ValueEditNull.java | 38 +
.../roomedit/valueedit/ValueEditOffsetPoint.java | 163 +++
.../valueedit/ValueEditOffsetPointSet.java | 250 ++++
.../roomedit/valueedit/ValueEditRegistry.java | 70 +
.../roomedit/valueedit/ValueEditString.java | 99 ++
.../mod/dungeon/roomfinder/DungeonRoom.java | 381 ++++++
.../roomfinder/DungeonRoomInfoRegistry.java | 163 +++
.../mod/dungeon/roomfinder/RoomMatcher.java | 145 +++
.../roomprocessor/GeneralRoomProcessor.java | 448 +++++++
.../dungeon/roomprocessor/ProcessorFactory.java | 65 +
.../mod/dungeon/roomprocessor/RoomProcessor.java | 49 +
.../roomprocessor/RoomProcessorBlazeSolver.java | 201 +++
.../roomprocessor/RoomProcessorButtonSolver.java | 132 ++
.../roomprocessor/RoomProcessorCreeperSolver.java | 148 +++
.../roomprocessor/RoomProcessorGenerator.java | 25 +
.../roomprocessor/RoomProcessorIcePath.java | 234 ++++
.../roomprocessor/RoomProcessorRedRoom.java | 121 ++
.../dungeon/roomprocessor/RoomProcessorRiddle.java | 121 ++
.../RoomProcessorTeleportMazeSolver.java | 145 +++
.../RoomProcessorTicTacToeSolver.java | 214 +++
.../dungeon/roomprocessor/RoomProcessorTrivia.java | 165 +++
.../bombdefuse/RoomProcessorBombDefuseSolver.java | 441 +++++++
.../bombdefuse/chambers/BDChamber.java | 83 ++
.../chambers/BombDefuseChamberGenerator.java | 30 +
.../bombdefuse/chambers/ChamberProcessor.java | 27 +
.../chambers/DummyDefuseChamberProcessor.java | 32 +
.../chambers/GeneralDefuseChamberProcessor.java | 137 ++
.../chambers/arrow/ArrowLeftProcessor.java | 138 ++
.../chambers/arrow/ArrowProcessorMatcher.java | 52 +
.../chambers/arrow/ArrowRightProcessor.java | 126 ++
.../chambers/bugged/ImpossibleMatcher.java | 47 +
.../chambers/color/ColorLeftProcessor.java | 230 ++++
.../chambers/color/ColorProcessorMatcher.java | 49 +
.../chambers/color/ColorRightProcessor.java | 175 +++
.../chambers/creeper/CreeperLeftProcessor.java | 95 ++
.../chambers/creeper/CreeperProcessorMatcher.java | 52 +
.../chambers/creeper/CreeperRightProcessor.java | 73 ++
.../goldenpath/GoldenPathLeftProcessor.java | 141 ++
.../goldenpath/GoldenPathProcessorMatcher.java | 47 +
.../goldenpath/GoldenPathRightProcessor.java | 97 ++
.../chambers/maze/MazeLeftProcessor.java | 80 ++
.../chambers/maze/MazeProcessorMatcher.java | 47 +
.../chambers/maze/MazeRightProcessor.java | 73 ++
.../chambers/number/NumberLeftProcessor.java | 125 ++
.../chambers/number/NumberProcessorMatcher.java | 53 +
.../chambers/number/NumberRightProcessor.java | 114 ++
.../bossfight/BossfightProcessor.java | 33 +
.../bossfight/BossfightProcessorBonzo.java | 85 ++
.../bossfight/BossfightProcessorLivid.java | 90 ++
.../bossfight/BossfightProcessorNecron.java | 77 ++
.../bossfight/BossfightProcessorProf.java | 144 ++
.../bossfight/BossfightProcessorSadan.java | 144 ++
.../bossfight/BossfightProcessorScarf.java | 134 ++
.../bossfight/BossfightProcessorThorn.java | 103 ++
.../bossfight/GeneralBossfightProcessor.java | 155 +++
.../roomprocessor/bossfight/HealthData.java | 33 +
.../boxpuzzle/BoxPuzzleSolvingThread.java | 182 +++
.../boxpuzzle/RoomProcessorBoxSolver.java | 392 ++++++
.../icefill/RoomProcessorIcePath2.java | 151 +++
.../roomprocessor/waterpuzzle/LeverState.java | 33 +
.../waterpuzzle/LeverStateContradict.java | 25 +
.../waterpuzzle/RoomProcessorWaterPuzzle.java | 124 ++
.../dungeon/roomprocessor/waterpuzzle/Route.java | 60 +
.../roomprocessor/waterpuzzle/SwitchData.java | 46 +
.../roomprocessor/waterpuzzle/WaterBoard.java | 424 ++++++
.../roomprocessor/waterpuzzle/WaterNode.java | 36 +
.../waterpuzzle/nodes/WaterNodeAir.java | 59 +
.../waterpuzzle/nodes/WaterNodeEnd.java | 60 +
.../waterpuzzle/nodes/WaterNodeStart.java | 66 +
.../waterpuzzle/nodes/WaterNodeToggleable.java | 71 +
.../waterpuzzle/nodes/WaterNodeWall.java | 62 +
.../mod/events/impl/AuthChangedEvent.java | 6 +
.../mod/events/impl/BlockUpdateEvent.java | 37 +
.../mod/events/impl/BossroomEnterEvent.java | 24 +
.../events/impl/DiscordUserJoinRequestEvent.java | 33 +
.../mod/events/impl/DiscordUserUpdateEvent.java | 32 +
.../impl/DungeonContextInitializationEvent.java | 24 +
.../mod/events/impl/DungeonEndedEvent.java | 24 +
.../mod/events/impl/DungeonLeftEvent.java | 24 +
.../mod/events/impl/DungeonStartedEvent.java | 24 +
.../mod/events/impl/HypixelJoinedEvent.java | 24 +
.../mod/events/impl/KeyBindPressedEvent.java | 31 +
.../mod/events/impl/PlayerInteractEntityEvent.java | 39 +
.../mod/events/impl/PlayerListItemPacketEvent.java | 32 +
.../mod/events/impl/SkyblockJoinedEvent.java | 24 +
.../mod/events/impl/SkyblockLeftEvent.java | 24 +
.../mod/events/impl/StompConnectedEvent.java | 32 +
.../dungeonsguide/mod/events/impl/TitleEvent.java | 32 +
.../mod/events/impl/WindowUpdateEvent.java | 34 +
.../mod/events/listener/DungeonListener.java | 513 ++++++++
.../mod/events/listener/FeatureListener.java | 512 ++++++++
.../mod/events/listener/PacketListener.java | 191 +++
.../mod/features/AbstractFeature.java | 114 ++
.../mod/features/FeatureParameter.java | 72 +
.../mod/features/FeatureRegistry.java | 337 +++++
.../dungeonsguide/mod/features/GuiFeature.java | 160 +++
.../dungeonsguide/mod/features/SimpleFeature.java | 33 +
.../mod/features/impl/advanced/FeatureDebug.java | 31 +
.../features/impl/advanced/FeatureDebugTrap.java | 80 ++
.../impl/advanced/FeatureDebuggableMap.java | 88 ++
.../impl/advanced/FeatureRoomCoordDisplay.java | 94 ++
.../impl/advanced/FeatureRoomDebugInfo.java | 95 ++
.../features/impl/advanced/FeatureTestPepole.java | 460 +++++++
.../mod/features/impl/boss/FeatureAutoReparty.java | 34 +
.../mod/features/impl/boss/FeatureBossHealth.java | 104 ++
.../features/impl/boss/FeatureBoxRealLivid.java | 54 +
.../mod/features/impl/boss/FeatureChestPrice.java | 174 +++
.../features/impl/boss/FeatureCurrentPhase.java | 74 ++
.../mod/features/impl/boss/FeatureHideAnimals.java | 76 ++
.../features/impl/boss/FeatureTerracotaTimer.java | 77 ++
.../impl/boss/FeatureThornBearPercentage.java | 78 ++
.../impl/boss/FeatureThornSpiritBowTimer.java | 110 ++
.../features/impl/boss/FeatureWarningOnPortal.java | 200 +++
.../terminal/CorrectThePaneSolutionProvider.java | 53 +
.../impl/boss/terminal/FeatureSimonSaysSolver.java | 113 ++
.../impl/boss/terminal/FeatureTerminalSolvers.java | 153 +++
.../terminal/NavigateMazeSolutionProvider.java | 144 ++
.../terminal/SelectAllColorSolutionProivider.java | 60 +
.../terminal/SelectInOrderSolutionProvider.java | 72 +
.../impl/boss/terminal/TerminalSolution.java | 30 +
.../boss/terminal/TerminalSolutionProvider.java | 29 +
.../terminal/WhatStartsWithSolutionProvider.java | 50 +
.../impl/cosmetics/FeatureNicknameColor.java | 49 +
.../impl/cosmetics/FeatureNicknamePrefix.java | 49 +
.../features/impl/cosmetics/PrefixSelectorGUI.java | 188 +++
.../impl/discord/inviteViewer/ImageTexture.java | 118 ++
.../discord/inviteViewer/PartyInviteViewer.java | 314 +++++
.../discord/inviteViewer/PartyJoinRequest.java | 59 +
.../impl/discord/invteTooltip/MTooltipInvite.java | 127 ++
.../invteTooltip/MTooltipInviteElement.java | 109 ++
.../impl/discord/onlinealarm/PlayingDGAlarm.java | 170 +++
.../mod/features/impl/dungeon/FeatureBoxBats.java | 68 +
.../impl/dungeon/FeatureBoxSkelemaster.java | 68 +
.../features/impl/dungeon/FeatureBoxStarMobs.java | 68 +
.../features/impl/dungeon/FeatureCollectScore.java | 77 ++
.../dungeon/FeatureDungeonCurrentRoomSecrets.java | 108 ++
.../impl/dungeon/FeatureDungeonDeaths.java | 168 +++
.../features/impl/dungeon/FeatureDungeonMap.java | 508 ++++++++
.../impl/dungeon/FeatureDungeonMilestone.java | 110 ++
.../impl/dungeon/FeatureDungeonRealTime.java | 91 ++
.../impl/dungeon/FeatureDungeonRoomName.java | 95 ++
.../impl/dungeon/FeatureDungeonSBTime.java | 119 ++
.../features/impl/dungeon/FeatureDungeonScore.java | 351 +++++
.../impl/dungeon/FeatureDungeonSecrets.java | 145 +++
.../features/impl/dungeon/FeatureDungeonTombs.java | 88 ++
.../features/impl/dungeon/FeatureHideNameTags.java | 53 +
.../features/impl/dungeon/FeaturePlayerESP.java | 111 ++
.../dungeon/FeaturePressAnyKeyToCloseChest.java | 89 ++
.../impl/dungeon/FeatureWarnLowHealth.java | 106 ++
.../impl/dungeon/FeatureWatcherWarning.java | 87 ++
.../impl/etc/FeatureAutoAcceptReparty.java | 68 +
.../features/impl/etc/FeatureCooldownCounter.java | 96 ++
.../mod/features/impl/etc/FeatureCopyMessages.java | 42 +
.../impl/etc/FeatureDecreaseExplosionSound.java | 52 +
.../features/impl/etc/FeatureDisableMessage.java | 77 ++
.../features/impl/etc/FeatureEpicCountdown.java | 156 +++
.../mod/features/impl/etc/FeaturePenguins.java | 168 +++
.../features/impl/etc/FeatureRepartyCommand.java | 29 +
.../impl/etc/FeatureTooltipDungeonStat.java | 52 +
.../mod/features/impl/etc/FeatureTooltipPrice.java | 111 ++
.../mod/features/impl/etc/FeatureUpdateAlarm.java | 56 +
.../impl/etc/ability/FeatureAbilityCooldown.java | 402 ++++++
.../features/impl/etc/ability/SkyblockAbility.java | 32 +
.../mod/features/impl/etc/ability/UsedAbility.java | 31 +
.../mod/features/impl/party/APIKey.java | 56 +
.../features/impl/party/FeatureGoodParties.java | 121 ++
.../mod/features/impl/party/FeaturePartyList.java | 97 ++
.../mod/features/impl/party/FeaturePartyReady.java | 180 +++
.../party/customgui/FeatureCustomPartyFinder.java | 110 ++
.../impl/party/customgui/GuiCustomPartyFinder.java | 75 ++
.../impl/party/customgui/PanelPartyFinder.java | 341 +++++
.../party/customgui/PanelPartyFinderSettings.java | 293 +++++
.../party/customgui/PanelPartyListElement.java | 236 ++++
.../impl/party/playerpreview/FakePlayer.java | 101 ++
.../FeatureViewPlayerStatsOnJoin.java | 706 ++++++++++
.../impl/party/playerpreview/api/ApiFetcher.java | 387 ++++++
.../impl/party/playerpreview/api/CachedData.java | 29 +
.../playerpreview/api/PlayerSkyblockData.java | 10 +
.../impl/party/playerpreview/api/SkinFetcher.java | 90 ++
.../api/playerprofile/PlayerProfile.java | 92 ++
.../api/playerprofile/PlayerProfileParser.java | 449 +++++++
.../dataclasses/ClassSpecificData.java | 29 +
.../playerprofile/dataclasses/DungeonClass.java | 46 +
.../dataclasses/DungeonSpecificData.java | 29 +
.../api/playerprofile/dataclasses/DungeonStat.java | 54 +
.../api/playerprofile/dataclasses/DungeonType.java | 39 +
.../dataclasses/FloorSpecificData.java | 29 +
.../api/playerprofile/dataclasses/Pet.java | 31 +
.../api/playerprofile/dataclasses/Skill.java | 31 +
.../datarenders/DataRendererEditor.java | 357 +++++
.../datarenders/DataRendererRegistry.java | 64 +
.../playerpreview/datarenders/IDataRenderer.java | 33 +
.../impl/DataRenderDungeonFloorStat.java | 105 ++
.../impl/DataRenderDungeonHighestFloorStat.java | 107 ++
.../datarenders/impl/DataRendererClassLv.java | 88 ++
.../datarenders/impl/DataRendererDungeonLv.java | 82 ++
.../datarenders/impl/DataRendererFairySouls.java | 50 +
.../datarenders/impl/DataRendererLilyWeight.java | 71 +
.../datarenders/impl/DataRendererSecrets.java | 53 +
.../impl/DataRendererSelectedClassLv.java | 77 ++
.../datarenders/impl/DataRendererSetUrOwn.java | 57 +
.../datarenders/impl/DataRendererSkillLv.java | 80 ++
.../datarenders/impl/DataRendererTalismans.java | 123 ++
.../mod/features/impl/secret/FeatureActions.java | 143 ++
.../mod/features/impl/secret/FeatureBloodRush.java | 45 +
.../impl/secret/FeatureCreateRefreshLine.java | 69 +
.../impl/secret/FeatureFreezePathfind.java | 45 +
.../impl/secret/FeaturePathfindStrategy.java | 106 ++
.../features/impl/secret/FeaturePathfindToAll.java | 45 +
.../impl/secret/FeatureSoulRoomWarning.java | 232 ++++
.../impl/secret/FeatureTogglePathfind.java | 45 +
.../impl/secret/PathfindLineProperties.java | 115 ++
.../mechanicbrowser/FeatureMechanicBrowse.java | 164 +++
.../mechanicbrowser/MGuiMechanicBrowser.java | 45 +
.../mechanicbrowser/MechanicBrowserElement.java | 61 +
.../mechanicbrowser/MechanicBrowserTooltip.java | 68 +
.../mechanicbrowser/PanelMechanicBrowser.java | 343 +++++
.../features/impl/solvers/FeatureSolverBlaze.java | 51 +
.../impl/solvers/FeatureSolverBombdefuse.java | 30 +
.../features/impl/solvers/FeatureSolverBox.java | 57 +
.../impl/solvers/FeatureSolverIcefill.java | 40 +
.../features/impl/solvers/FeatureSolverKahoot.java | 35 +
.../features/impl/solvers/FeatureSolverRiddle.java | 35 +
.../impl/solvers/FeatureSolverSilverfish.java | 44 +
.../impl/solvers/FeatureSolverTeleport.java | 39 +
.../impl/solvers/FeatureSolverTictactoe.java | 39 +
.../features/listener/BossroomEnterListener.java | 23 +
.../mod/features/listener/ChatListener.java | 25 +
.../mod/features/listener/ChatListenerGlobal.java | 25 +
.../listener/DiscordUserJoinRequestListener.java | 25 +
.../listener/DiscordUserUpdateListener.java | 25 +
.../DungeonContextInitializationListener.java | 23 +
.../mod/features/listener/DungeonEndListener.java | 23 +
.../mod/features/listener/DungeonQuitListener.java | 23 +
.../features/listener/DungeonStartListener.java | 23 +
.../listener/EntityLivingRenderListener.java | 26 +
.../listener/GuiBackgroundRenderListener.java | 25 +
.../mod/features/listener/GuiClickListener.java | 25 +
.../mod/features/listener/GuiOpenListener.java | 25 +
.../features/listener/GuiPostRenderListener.java | 25 +
.../features/listener/GuiPreRenderListener.java | 25 +
.../mod/features/listener/GuiUpdateListener.java | 25 +
.../mod/features/listener/InteractListener.java | 25 +
.../mod/features/listener/KeyInputListener.java | 25 +
.../features/listener/KeybindPressedListener.java | 25 +
.../features/listener/PlayerRenderListener.java | 26 +
.../features/listener/ScreenRenderListener.java | 23 +
.../features/listener/SkyblockJoinListener.java | 23 +
.../features/listener/SkyblockLeaveListener.java | 23 +
.../mod/features/listener/SoundListener.java | 25 +
.../features/listener/StompConnectedListener.java | 25 +
.../features/listener/TextureStichListener.java | 25 +
.../mod/features/listener/TickListener.java | 23 +
.../mod/features/listener/TitleListener.java | 25 +
.../mod/features/listener/TooltipListener.java | 25 +
.../mod/features/listener/WorldRenderListener.java | 23 +
.../features/text/PanelTextParameterConfig.java | 283 ++++
.../mod/features/text/StyledText.java | 29 +
.../mod/features/text/StyledTextProvider.java | 30 +
.../mod/features/text/StyledTextRenderer.java | 244 ++++
.../mod/features/text/TextHUDFeature.java | 191 +++
.../dungeonsguide/mod/features/text/TextStyle.java | 34 +
.../kr/syeyoung/dungeonsguide/mod/gui/MGui.java | 247 ++++
.../kr/syeyoung/dungeonsguide/mod/gui/MPanel.java | 296 +++++
.../dungeonsguide/mod/gui/elements/MButton.java | 117 ++
.../mod/gui/elements/MCollapsable.java | 137 ++
.../dungeonsguide/mod/gui/elements/MColor.java | 48 +
.../mod/gui/elements/MEditableAColor.java | 106 ++
.../mod/gui/elements/MFloatSelectionButton.java | 97 ++
.../mod/gui/elements/MIntegerSelectionButton.java | 95 ++
.../mod/gui/elements/MKeyEditButton.java | 147 +++
.../dungeonsguide/mod/gui/elements/MLabel.java | 72 +
.../mod/gui/elements/MLabelAndElement.java | 75 ++
.../dungeonsguide/mod/gui/elements/MList.java | 93 ++
.../dungeonsguide/mod/gui/elements/MModal.java | 92 ++
.../mod/gui/elements/MModalConfirmation.java | 87 ++
.../mod/gui/elements/MModalMessage.java | 77 ++
.../mod/gui/elements/MNavigatingPane.java | 213 +++
.../mod/gui/elements/MPanelScaledGUI.java | 213 +++
.../dungeonsguide/mod/gui/elements/MParameter.java | 90 ++
.../mod/gui/elements/MPassiveLabelAndElement.java | 71 +
.../dungeonsguide/mod/gui/elements/MPopupMenu.java | 97 ++
.../mod/gui/elements/MPortableColorEdit.java | 292 +++++
.../dungeonsguide/mod/gui/elements/MRootPanel.java | 60 +
.../dungeonsguide/mod/gui/elements/MScrollBar.java | 209 +++
.../mod/gui/elements/MScrollablePanel.java | 185 +++
.../dungeonsguide/mod/gui/elements/MSpacer.java | 36 +
.../mod/gui/elements/MStringSelectionButton.java | 94 ++
.../mod/gui/elements/MTabbedPane.java | 160 +++
.../dungeonsguide/mod/gui/elements/MTextField.java | 418 ++++++
.../mod/gui/elements/MToggleButton.java | 96 ++
.../dungeonsguide/mod/gui/elements/MTooltip.java | 107 ++
.../mod/gui/elements/MTooltipText.java | 44 +
.../dungeonsguide/mod/gui/elements/MValue.java | 79 ++
.../dungeonsguide/mod/party/PartyContext.java | 102 ++
.../dungeonsguide/mod/party/PartyManager.java | 626 +++++++++
.../dungeonsguide/mod/resources/DGTexturePack.java | 71 +
.../mod/stomp/FailedWebSocketConnection.java | 7 +
.../dungeonsguide/mod/stomp/StompClient.java | 192 +++
.../dungeonsguide/mod/stomp/StompDiedEvent.java | 15 +
.../dungeonsguide/mod/stomp/StompHeader.java | 24 +
.../dungeonsguide/mod/stomp/StompManager.java | 73 ++
.../dungeonsguide/mod/stomp/StompPayload.java | 96 ++
.../dungeonsguide/mod/stomp/StompSubscription.java | 6 +
.../syeyoung/dungeonsguide/mod/utils/AhUtils.java | 98 ++
.../dungeonsguide/mod/utils/ArrayUtils.java | 40 +
.../dungeonsguide/mod/utils/BlockCache.java | 50 +
.../dungeonsguide/mod/utils/GlStateUtils.java | 68 +
.../syeyoung/dungeonsguide/mod/utils/MapUtils.java | 176 +++
.../dungeonsguide/mod/utils/RenderUtils.java | 1372 ++++++++++++++++++++
.../dungeonsguide/mod/utils/ScoreBoardUtils.java | 58 +
.../dungeonsguide/mod/utils/ShortUtils.java | 47 +
.../dungeonsguide/mod/utils/SkyblockUtils.java | 52 +
.../dungeonsguide/mod/utils/TabListUtil.java | 75 ++
.../dungeonsguide/mod/utils/TextUtils.java | 121 ++
.../dungeonsguide/mod/utils/TimeScoreUtil.java | 82 ++
.../dungeonsguide/mod/utils/TitleRender.java | 139 ++
.../dungeonsguide/mod/utils/VectorUtils.java | 51 +
.../syeyoung/dungeonsguide/mod/utils/XPUtils.java | 222 ++++
.../mod/utils/cursor/CursorReader.java | 95 ++
.../dungeonsguide/mod/utils/cursor/EnumCursor.java | 54 +
.../dungeonsguide/mod/utils/cursor/Foundation.java | 33 +
.../dungeonsguide/mod/utils/cursor/GLCursors.java | 231 ++++
.../dungeonsguide/mod/utils/cursor/User32.java | 67 +
.../dungeonsguide/mod/utils/cursor/X11.java | 37 +
.../mod/wsresource/StaticResource.java | 30 +
.../mod/wsresource/StaticResourceCache.java | 77 ++
543 files changed, 54558 insertions(+)
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/Keybinds.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessResult.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatSubscriber.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatTransmitter.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandReparty.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/Config.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/ConfigPanelCreator.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/GuiConfigV2.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategory.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategoryElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeature.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeatureEdit.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MNotFound.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MPanelCategory.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MParameterEdit.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/NestedCategory.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/RootConfigPanel.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/GuiGuiLocationConfig.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/Marker.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/PanelDelegate.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/AColor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/GUIRectangle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCAColor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCBoolean.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCColor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCFloat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCGUIRectangle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCInteger.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCKeybind.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCRectangle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCString.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCStringList.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyleList.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverter.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverterRegistry.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/ActiveCosmetic.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticsManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomNetworkPlayerInfo.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomPacketPlayerListItem.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/IChatReplacer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerChatByMe.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerCoop.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerMessage.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerPV.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerSocialOptions.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerViewProfile.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonActionContext.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonContext.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonFacade.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/MapProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/AbstractAction.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionBreakWithSuperBoom.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionChangeState.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClick.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClickSet.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionComplete.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionDropItem.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionInteract.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionKill.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionRoot.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRoute.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRouteProperties.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTree.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTreeUtil.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonDoor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProvider.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProviderRegistry.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/EDungeonDoorType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/CatacombsDataProvider.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/MasterModeDataProvider.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/NormalModeDataProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventHolder.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/SerializableBlockPos.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonCryptBrokenEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonDeathEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonMapUpdateEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonNodataEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonPuzzleFailureEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonRoomDiscoverEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonSecretCountChangeEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonStateChangeEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/map/DungeonMapData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarCornerCut.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarFineGrid.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/CachedWorld.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/JPSPathfinder.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/NodeProcessorDungeonRoom.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/ThetaStar.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/EditingContext.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/Parameter.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonAddSet.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonParameterEdit.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonRoomEdit.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonValueEdit.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditBreakableWall.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditDoor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditDummy.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditFairySoul.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditJournal.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditLever.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditNPC.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditOnewayDoor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditOnewayLever.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditPressurePlate.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditSecret.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditTomb.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/ActionDisplayPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/ActionTreeDisplayPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/DynamicEditor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/GeneralEditPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/ProcessorParameterEditPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/RoomDataDisplayPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/RoomMatchDisplayPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/RoommatchingPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/panes/SecretEditPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEdit.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditAColor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditBoolean.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditColor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditCreator.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditFloat.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditInteger.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditNull.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditOffsetPoint.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditOffsetPointSet.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditRegistry.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/valueedit/ValueEditString.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoom.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/DungeonRoomInfoRegistry.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomfinder/RoomMatcher.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/GeneralRoomProcessor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/ProcessorFactory.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorBlazeSolver.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorButtonSolver.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorCreeperSolver.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorGenerator.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorIcePath.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorRedRoom.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorRiddle.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTeleportMazeSolver.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTicTacToeSolver.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/RoomProcessorTrivia.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/RoomProcessorBombDefuseSolver.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/BDChamber.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/BombDefuseChamberGenerator.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/ChamberProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/DummyDefuseChamberProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/GeneralDefuseChamberProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/arrow/ArrowLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/arrow/ArrowProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/arrow/ArrowRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/bugged/ImpossibleMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/color/ColorLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/color/ColorProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/color/ColorRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/creeper/CreeperLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/creeper/CreeperProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/creeper/CreeperRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/goldenpath/GoldenPathRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/maze/MazeLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/maze/MazeProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/maze/MazeRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/number/NumberLeftProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/number/NumberProcessorMatcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bombdefuse/chambers/number/NumberRightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorBonzo.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorLivid.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorNecron.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorProf.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorSadan.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorScarf.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/BossfightProcessorThorn.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/GeneralBossfightProcessor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/bossfight/HealthData.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/boxpuzzle/BoxPuzzleSolvingThread.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/boxpuzzle/RoomProcessorBoxSolver.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/icefill/RoomProcessorIcePath2.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/LeverState.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/LeverStateContradict.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/RoomProcessorWaterPuzzle.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/Route.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/SwitchData.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/WaterBoard.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/WaterNode.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/nodes/WaterNodeAir.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/nodes/WaterNodeEnd.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/nodes/WaterNodeStart.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/nodes/WaterNodeToggleable.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomprocessor/waterpuzzle/nodes/WaterNodeWall.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/AuthChangedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/BlockUpdateEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/BossroomEnterEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserJoinRequestEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DiscordUserUpdateEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DungeonContextInitializationEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DungeonEndedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DungeonLeftEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/DungeonStartedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/HypixelJoinedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/KeyBindPressedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/PlayerInteractEntityEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/PlayerListItemPacketEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/SkyblockJoinedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/SkyblockLeftEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/StompConnectedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/TitleEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/impl/WindowUpdateEvent.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/FeatureListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/AbstractFeature.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureParameter.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/FeatureRegistry.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/GuiFeature.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/SimpleFeature.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureDebug.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureDebugTrap.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureDebuggableMap.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomDebugInfo.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureTestPepole.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureAutoReparty.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureBossHealth.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureBoxRealLivid.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureChestPrice.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureCurrentPhase.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureHideAnimals.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureTerracotaTimer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureThornBearPercentage.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureThornSpiritBowTimer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/FeatureWarningOnPortal.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/CorrectThePaneSolutionProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureSimonSaysSolver.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/FeatureTerminalSolvers.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/NavigateMazeSolutionProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/SelectAllColorSolutionProivider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/SelectInOrderSolutionProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/TerminalSolution.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/TerminalSolutionProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/boss/terminal/WhatStartsWithSolutionProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/cosmetics/FeatureNicknameColor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/cosmetics/FeatureNicknamePrefix.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/cosmetics/PrefixSelectorGUI.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/ImageTexture.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyInviteViewer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/inviteViewer/PartyJoinRequest.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInvite.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/invteTooltip/MTooltipInviteElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/discord/onlinealarm/PlayingDGAlarm.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureBoxBats.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureBoxSkelemaster.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureBoxStarMobs.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureCollectScore.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonCurrentRoomSecrets.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonDeaths.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMap.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonMilestone.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonRealTime.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonRoomName.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonSBTime.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonScore.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonSecrets.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureDungeonTombs.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureHideNameTags.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeaturePlayerESP.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeaturePressAnyKeyToCloseChest.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureWarnLowHealth.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/dungeon/FeatureWatcherWarning.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureAutoAcceptReparty.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureCooldownCounter.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureCopyMessages.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureDecreaseExplosionSound.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureDisableMessage.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureEpicCountdown.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeaturePenguins.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureRepartyCommand.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureTooltipDungeonStat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureTooltipPrice.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/FeatureUpdateAlarm.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/SkyblockAbility.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/UsedAbility.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/APIKey.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/FeatureGoodParties.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/FeaturePartyList.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/FeaturePartyReady.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/FeatureCustomPartyFinder.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/GuiCustomPartyFinder.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinder.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyFinderSettings.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/customgui/PanelPartyListElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/FakePlayer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/FeatureViewPlayerStatsOnJoin.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/ApiFetcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/CachedData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/PlayerSkyblockData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/SkinFetcher.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfile.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/PlayerProfileParser.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/ClassSpecificData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/DungeonClass.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/DungeonSpecificData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/DungeonStat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/DungeonType.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/FloorSpecificData.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/Pet.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/api/playerprofile/dataclasses/Skill.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/DataRendererEditor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/DataRendererRegistry.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/IDataRenderer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRenderDungeonFloorStat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRenderDungeonHighestFloorStat.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererClassLv.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererDungeonLv.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererFairySouls.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererLilyWeight.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererSecrets.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererSelectedClassLv.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererSetUrOwn.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererSkillLv.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/party/playerpreview/datarenders/impl/DataRendererTalismans.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureActions.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureBloodRush.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureCreateRefreshLine.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureFreezePathfind.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindStrategy.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeaturePathfindToAll.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureSoulRoomWarning.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/FeatureTogglePathfind.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/PathfindLineProperties.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/MGuiMechanicBrowser.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/MechanicBrowserElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/MechanicBrowserTooltip.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverBlaze.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverBombdefuse.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverBox.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverIcefill.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverKahoot.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverRiddle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverSilverfish.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverTeleport.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/solvers/FeatureSolverTictactoe.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/BossroomEnterListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/ChatListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/ChatListenerGlobal.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DiscordUserJoinRequestListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DiscordUserUpdateListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DungeonContextInitializationListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DungeonEndListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DungeonQuitListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/DungeonStartListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/EntityLivingRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiBackgroundRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiClickListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiOpenListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiPostRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiPreRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/GuiUpdateListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/InteractListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/KeyInputListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/KeybindPressedListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/PlayerRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/ScreenRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/SkyblockJoinListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/SkyblockLeaveListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/SoundListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/StompConnectedListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/TextureStichListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/TickListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/TitleListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/TooltipListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/listener/WorldRenderListener.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/PanelTextParameterConfig.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/StyledText.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/StyledTextProvider.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/StyledTextRenderer.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextHUDFeature.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/features/text/TextStyle.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/MGui.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/MPanel.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MButton.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MCollapsable.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MColor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MEditableAColor.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MFloatSelectionButton.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MIntegerSelectionButton.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MKeyEditButton.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MLabel.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MLabelAndElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MList.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MModal.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MModalConfirmation.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MModalMessage.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MNavigatingPane.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MPanelScaledGUI.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MParameter.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MPassiveLabelAndElement.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MPopupMenu.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MPortableColorEdit.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MRootPanel.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MScrollBar.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MScrollablePanel.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MSpacer.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MStringSelectionButton.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MTabbedPane.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MTextField.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MToggleButton.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MTooltip.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MTooltipText.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/gui/elements/MValue.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyContext.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/party/PartyManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/resources/DGTexturePack.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/FailedWebSocketConnection.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompClient.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompDiedEvent.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompHeader.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompManager.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompPayload.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/stomp/StompSubscription.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/AhUtils.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/ArrayUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/BlockCache.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/GlStateUtils.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/MapUtils.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/RenderUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/ScoreBoardUtils.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/ShortUtils.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/SkyblockUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/TabListUtil.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/TextUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/TimeScoreUtil.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/TitleRender.java
create mode 100755 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/VectorUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/XPUtils.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/CursorReader.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/EnumCursor.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/Foundation.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/GLCursors.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/User32.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/utils/cursor/X11.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/wsresource/StaticResource.java
create mode 100644 src/main/java/kr/syeyoung/dungeonsguide/mod/wsresource/StaticResourceCache.java
(limited to 'src/main/java/kr/syeyoung/dungeonsguide/mod')
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
new file mode 100755
index 00000000..45c403fd
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/DungeonsGuide.java
@@ -0,0 +1,260 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod;
+
+import com.google.common.collect.Sets;
+import kr.syeyoung.dungeonsguide.IDungeonGuide;
+import kr.syeyoung.dungeonsguide.Main;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatProcessor;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.commands.CommandDgDebug;
+import kr.syeyoung.dungeonsguide.mod.commands.CommandDungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.commands.CommandReparty;
+import kr.syeyoung.dungeonsguide.mod.config.Config;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonFacade;
+import kr.syeyoung.dungeonsguide.mod.events.listener.FeatureListener;
+import kr.syeyoung.dungeonsguide.mod.events.listener.PacketListener;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.resources.DGTexturePack;
+import kr.syeyoung.dungeonsguide.mod.utils.AhUtils;
+import kr.syeyoung.dungeonsguide.mod.utils.BlockCache;
+import kr.syeyoung.dungeonsguide.mod.utils.TimeScoreUtil;
+import kr.syeyoung.dungeonsguide.mod.utils.TitleRender;
+import kr.syeyoung.dungeonsguide.mod.utils.cursor.GLCursors;
+import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.*;
+import net.minecraft.client.resources.IReloadableResourceManager;
+import net.minecraft.client.resources.IResourcePack;
+import net.minecraft.launchwrapper.LaunchClassLoader;
+import net.minecraftforge.client.ClientCommandHandler;
+import net.minecraftforge.client.event.GuiOpenEvent;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.ProgressManager;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.relauncher.ReflectionHelper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Set;
+
+public class DungeonsGuide implements IDungeonGuide {
+
+ @Getter
+ private static boolean firstTimeUsingDG = false;
+ Logger logger = LogManager.getLogger("DungeonsGuide");
+
+ public boolean verbose = false;
+ private SkyblockStatus skyblockStatus;
+
+ @Getter
+ private CosmeticsManager cosmeticsManager;
+ @Getter
+ private DungeonFacade dungeonFacade;
+
+ @Getter
+ private BlockCache blockCache;
+
+ public DungeonsGuide(){
+ instance = this;
+ }
+ private static DungeonsGuide instance;
+
+ public static DungeonsGuide getDungeonsGuide() {
+ return instance;
+ }
+
+ @Getter
+ CommandReparty commandReparty;
+
+
+
+
+ public void init() {
+ ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4);
+ MinecraftForge.EVENT_BUS.register(this);
+
+ progressbar.step("Registering Events & Commands");
+
+ skyblockStatus = new SkyblockStatus();
+
+ MinecraftForge.EVENT_BUS.register(skyblockStatus);
+
+
+ (new FeatureRegistry()).init();
+
+ new ChatTransmitter();
+
+ try {
+ Set invalid = ReflectionHelper.getPrivateValue(LaunchClassLoader.class, (LaunchClassLoader) Main.class.getClassLoader(), "invalidClasses");
+ ((LaunchClassLoader) Main.class.getClassLoader()).clearNegativeEntries(Sets.newHashSet("org.slf4j.LoggerFactory"));
+ invalid.clear();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ this.blockCache = new BlockCache();
+
+ this.dungeonFacade = new DungeonFacade();
+ dungeonFacade.init();
+
+
+
+ TitleRender.getInstance();
+
+ CommandDungeonsGuide commandDungeonsGuide = new CommandDungeonsGuide();
+ CommandDgDebug command = new CommandDgDebug();
+
+ ClientCommandHandler.instance.registerCommand(commandDungeonsGuide);
+ ClientCommandHandler.instance.registerCommand(command);
+
+ MinecraftForge.EVENT_BUS.register(command);
+ MinecraftForge.EVENT_BUS.register(commandDungeonsGuide);
+
+ commandReparty = new CommandReparty();
+ MinecraftForge.EVENT_BUS.register(commandReparty);
+
+ MinecraftForge.EVENT_BUS.register(new FeatureListener());
+ MinecraftForge.EVENT_BUS.register(new PacketListener());
+ MinecraftForge.EVENT_BUS.register(new Keybinds());
+
+ MinecraftForge.EVENT_BUS.register(PartyManager.INSTANCE);
+ MinecraftForge.EVENT_BUS.register(ChatProcessor.INSTANCE);
+ MinecraftForge.EVENT_BUS.register(StaticResourceCache.INSTANCE);
+
+ MinecraftForge.EVENT_BUS.register(new AhUtils());
+
+
+ progressbar.step("Opening connection");
+ cosmeticsManager = new CosmeticsManager();
+ MinecraftForge.EVENT_BUS.register(cosmeticsManager);
+
+
+ progressbar.step("Loading Config");
+ try {
+ Config.loadConfig(null);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+
+ if (FeatureRegistry.ETC_REPARTY.isEnabled()) {
+ ClientCommandHandler.instance.registerCommand(commandReparty);
+ }
+
+ if (FeatureRegistry.DISCORD_DONOTUSE.isEnabled()) {
+ System.setProperty("dg.safe", "true");
+ }
+
+ MinecraftForge.EVENT_BUS.register(RichPresenceManager.INSTANCE);
+ TimeScoreUtil.init();
+
+ Main.finishUpProgressBar(progressbar);
+
+ ProgressManager.pop(progressbar);
+
+ ((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(resourceManager -> GLCursors.setupCursors());
+ }
+
+ private boolean showedStartUpGuide;
+ @SubscribeEvent
+ public void onGuiOpen(GuiOpenEvent guiOpenEvent){
+ if(!showedStartUpGuide){
+ showedStartUpGuide = true;
+
+ if(isFirstTimeUsingDG()){
+ GuiScreen originalGUI = guiOpenEvent.gui;
+ guiOpenEvent.gui = new GuiScreen() {
+ final String welcomeText = "Thank you for installing §eDungeonsGuide§f, the most intelligent skyblock dungeon mod!\nThe gui for relocating GUI Elements and enabling or disabling features can be opened by typing §e/dg\nType §e/dg help §fto view full list of commands offered by dungeons guide!";
+
+ @Override
+ public void initGui() {
+ ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
+ this.buttonList.add(new GuiButton(0, sr.getScaledWidth()/2-100,sr.getScaledHeight()-70 ,"Continue"));
+ }
+
+ @Override
+ protected void actionPerformed(GuiButton button) throws IOException {
+ super.actionPerformed(button);
+ if (button.id == 0) {
+ Minecraft.getMinecraft().displayGuiScreen(originalGUI);
+ }
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ super.drawBackground(1);
+
+ ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
+ FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
+ fontRenderer.drawString("§eWelcome To DungeonsGuide", (sr.getScaledWidth()-fontRenderer.getStringWidth("Welcome To DungeonsGuide"))/2,40,0xFFFF0000);
+ int tenth = sr.getScaledWidth() / 10;
+ Gui.drawRect(tenth, 70,sr.getScaledWidth()-tenth, sr.getScaledHeight()-80, 0xFF5B5B5B);
+
+ String[] split = welcomeText.split("\n");
+ for (int i = 0; i < split.length; i++) {
+ fontRenderer.drawString(split[i].replace("\t", " "), tenth + 2,i*fontRenderer.FONT_HEIGHT + 72, 0xFFFFFFFF);
+ }
+
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+
+ };
+ }
+
+ }
+ }
+
+
+ public void preinit(){
+
+ File configFile = new File(Main.getConfigDir(), "config.json");
+ if (!configFile.exists()) {
+ Main.getConfigDir().mkdirs();
+ firstTimeUsingDG = true;
+ }
+
+ Config.f = configFile;
+ Minecraft.getMinecraft().getFramebuffer().enableStencil();
+
+ try {
+ List resourcePackList = ReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(), "defaultResourcePacks", "aA", "field_110449_ao");
+ resourcePackList.add(new DGTexturePack());
+ Minecraft.getMinecraft().refreshResources();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ public SkyblockStatus getSkyblockStatus() {
+ return skyblockStatus;
+ }
+
+
+
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/Keybinds.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/Keybinds.java
new file mode 100755
index 00000000..39f89834
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/Keybinds.java
@@ -0,0 +1,47 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod;
+
+import kr.syeyoung.dungeonsguide.mod.events.impl.KeyBindPressedEvent;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.InputEvent;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.input.Mouse;
+
+public class Keybinds
+{
+
+ @SubscribeEvent
+ public void onTogglePathfindStatus(InputEvent.KeyInputEvent keyInputEvent) {
+ if (Keyboard.getEventKeyState()) {
+ int key = Keyboard.getEventKey() == 0 ? Keyboard.getEventCharacter() + 256 : Keyboard.getEventKey();
+ KeyBindPressedEvent keyBindPressedEvent = new KeyBindPressedEvent(key);
+ MinecraftForge.EVENT_BUS.post(keyBindPressedEvent);
+ }
+ }
+ @SubscribeEvent
+ public void onMousePressed(InputEvent.MouseInputEvent mouseInputEvent) {
+ if (Mouse.getEventButtonState()) {
+ int key = Mouse.getEventButton() - 100;
+ KeyBindPressedEvent keyBindPressedEvent = new KeyBindPressedEvent(key);
+ MinecraftForge.EVENT_BUS.post(keyBindPressedEvent);
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
new file mode 100755
index 00000000..4cd4e3ee
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/SkyblockStatus.java
@@ -0,0 +1,155 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod;
+
+import com.google.common.collect.Sets;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DungeonLeftEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.HypixelJoinedEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.SkyblockJoinedEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.SkyblockLeftEvent;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.scoreboard.Score;
+import net.minecraft.scoreboard.ScoreObjective;
+import net.minecraft.scoreboard.ScorePlayerTeam;
+import net.minecraft.scoreboard.Scoreboard;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+import net.minecraftforge.fml.relauncher.Side;
+
+import java.util.Collection;
+import java.util.Set;
+
+public class SkyblockStatus {
+ boolean wasOnHypixel = false;
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent ev) {
+ if (ev.side == Side.SERVER || ev.phase != TickEvent.Phase.START) return;
+
+ SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
+ boolean isOnDungeonPrev = isOnDungeon();
+ boolean isOnSkyblockPrev = isOnSkyblock();
+ skyblockStatus.updateStatus();
+
+ if (!wasOnHypixel && skyblockStatus.isOnHypixel()) {
+ MinecraftForge.EVENT_BUS.post(new HypixelJoinedEvent());
+ }
+ wasOnHypixel = skyblockStatus.isOnHypixel();
+
+ if (isOnSkyblockPrev && !isOnSkyblock()) {
+ MinecraftForge.EVENT_BUS.post(new SkyblockLeftEvent());
+ } else if (!isOnSkyblockPrev && isOnSkyblock()) {
+ MinecraftForge.EVENT_BUS.post(new SkyblockJoinedEvent());
+ }
+
+ if (isOnDungeonPrev && !isOnDungeon()) {
+ MinecraftForge.EVENT_BUS.post(new DungeonLeftEvent());
+ }
+
+
+
+ }
+
+
+ public static boolean isOnSkyblock(){
+ SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
+
+ return skyblockStatus != null && skyblockStatus.isOnSkyblock;
+ }
+
+ public static boolean isOnDungeon() {
+ SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
+
+
+
+ return skyblockStatus != null && (skyblockStatus.forceIsOnDungeon || skyblockStatus.isOnDungeon);
+ }
+
+
+ private boolean isOnSkyblock;
+ private boolean isOnDungeon;
+
+ @Getter @Setter
+ private boolean forceIsOnDungeon;
+
+ public boolean isOnHypixel() {
+ Minecraft mc = Minecraft.getMinecraft();
+ if (mc == null || mc.thePlayer == null) return false;
+ if (!mc.isSingleplayer() && mc.thePlayer.getClientBrand() != null) {
+ return mc.thePlayer.getClientBrand().startsWith("Hypixel BungeeCord");
+ }
+ return false;
+ }
+
+ private static final Set SKYBLOCK_IN_ALL_LANGUAGES = Sets.newHashSet("SKYBLOCK");
+
+ public void updateStatus() {
+ if (!isOnHypixel()) {
+ isOnDungeon = false;
+ isOnSkyblock = false;
+ return;
+ }
+
+ Scoreboard scoreboard = Minecraft.getMinecraft().thePlayer.getWorldScoreboard();
+ ScoreObjective scoreObjective = scoreboard.getObjectiveInDisplaySlot(1);
+ if (scoreObjective == null) return;
+
+ String objectiveName = TextUtils.stripColor(scoreObjective.getDisplayName());
+ boolean skyblockFound = false;
+ for (String skyblock : SKYBLOCK_IN_ALL_LANGUAGES) {
+ if (objectiveName.startsWith(skyblock)) {
+ skyblockFound = true;
+ isOnSkyblock = true;
+ break;
+ }
+ }
+
+ if (!skyblockFound) {
+ isOnSkyblock = false;
+ isOnDungeon = false;
+ return;
+ }
+
+ Collection scores = scoreboard.getSortedScores(scoreObjective);
+ boolean foundDungeon = false;
+ for (Score sc : scores) {
+ ScorePlayerTeam scorePlayerTeam = scoreboard.getPlayersTeam(sc.getPlayerName());
+ String strippedLine = TextUtils.keepScoreboardCharacters(TextUtils.stripColor(ScorePlayerTeam.formatPlayerName(scorePlayerTeam, sc.getPlayerName()))).trim();
+ if (strippedLine.contains("Cleared: ")) {
+ foundDungeon = true;
+
+ DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
+ if(context != null){
+ context.setPercentage(Integer.parseInt(strippedLine.substring(9).split(" ")[0]));
+ }
+ }
+ if (ScorePlayerTeam.formatPlayerName(scorePlayerTeam, sc.getPlayerName()).startsWith(" §7⏣")) {
+ DungeonContext.setDungeonName(strippedLine.trim());
+ }
+ }
+
+ isOnDungeon = foundDungeon;
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessResult.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessResult.java
new file mode 100644
index 00000000..bacd7c4b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessResult.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.chat;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum ChatProcessResult {
+ NONE(false, false), REMOVE_LISTENER(true, false), REMOVE_LISTENER_AND_CHAT(true, true), REMOVE_CHAT(false, true);
+
+ private boolean removeListener;
+ private boolean removeChat;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
new file mode 100644
index 00000000..b65e64aa
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatProcessor.java
@@ -0,0 +1,118 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.chat;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiNewChat;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.Tuple;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.fml.common.eventhandler.Event;
+import net.minecraftforge.fml.common.eventhandler.EventPriority;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.simple.SimpleLogger;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public class ChatProcessor {
+ public static final ChatProcessor INSTANCE = new ChatProcessor();
+
+ private static final Logger logger = LogManager.getLogger("DG-ChatProcessor");
+ private ChatProcessor() {
+ Logger l = LogManager.getLogger(GuiNewChat.class);
+ if (l instanceof SimpleLogger) {
+ ((SimpleLogger) l).setLevel(Level.OFF);
+ } else if (l instanceof org.apache.logging.log4j.core.Logger) {
+ ((org.apache.logging.log4j.core.Logger) l).setLevel(Level.OFF);
+ }
+ }
+
+ private Queue chatSubscriberQueue = new ConcurrentLinkedQueue<>();
+ private Queue> chatQueue = new ConcurrentLinkedQueue<>();
+
+
+ public void subscribe(ChatSubscriber chatSubscribed) {
+ chatSubscriberQueue.add(chatSubscribed);
+ }
+ public void addToChatQueue(String chat, Runnable onSend, boolean noDupe) {
+ if (noDupe && chatQueue.stream().anyMatch(a -> a.getFirst().trim().equalsIgnoreCase(chat.trim()))) return;
+ chatQueue.add(new Tuple<>(chat, onSend));
+ }
+
+
+ private long minimumNext = 0;
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent clientTickEvent) {
+ try {
+ if (clientTickEvent.phase == TickEvent.Phase.START && Minecraft.getMinecraft().thePlayer != null && minimumNext < System.currentTimeMillis()) {
+ if (!chatQueue.isEmpty()) {
+ Tuple tuple = chatQueue.poll();
+ Minecraft.getMinecraft().thePlayer.sendChatMessage(tuple.getFirst());
+ if (tuple.getSecond() != null)
+ tuple.getSecond().run();
+ minimumNext = System.currentTimeMillis() + 200;
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Sending " + tuple.getFirst() + " Secretly"));
+ }
+
+ }
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+
+ @SubscribeEvent(priority = EventPriority.HIGHEST, receiveCanceled = true)
+ public void onMessage(ClientChatReceivedEvent chatReceivedEvent) {
+ if (chatReceivedEvent.type == 2) return;
+ String txt = chatReceivedEvent.message.getFormattedText();
+ logger.info("[CHAT] {}", txt);
+
+ int processed = 0;
+ int listenened = 0;
+ Map context = new HashMap<>();
+ Iterator it = chatSubscriberQueue.iterator();
+ while (it.hasNext()) {
+ ChatSubscriber chatSubscribed = it.next();
+ context.put("removed", processed);
+ context.put("onceListenered", listenened);
+ ChatProcessResult chatProcessResult = chatSubscribed.process(txt, context);
+ if (chatProcessResult.isRemoveChat()) processed++;
+ if (chatProcessResult.isRemoveListener()) listenened++;
+
+ if (chatProcessResult.isRemoveChat()) chatReceivedEvent.setResult(Event.Result.DENY);
+ if (chatProcessResult.isRemoveListener()) it.remove();
+ }
+ }
+
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void cancelMessage(ClientChatReceivedEvent chatReceivedEvent) {
+ if (chatReceivedEvent.getResult() == Event.Result.DENY)
+ chatReceivedEvent.setCanceled(true);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatSubscriber.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatSubscriber.java
new file mode 100644
index 00000000..fa7e70af
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatSubscriber.java
@@ -0,0 +1,26 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.chat;
+
+import java.util.Map;
+
+@FunctionalInterface
+public interface ChatSubscriber {
+ ChatProcessResult process(String txt, Map context);
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatTransmitter.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatTransmitter.java
new file mode 100644
index 00000000..bfdbd5db
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/chat/ChatTransmitter.java
@@ -0,0 +1,69 @@
+package kr.syeyoung.dungeonsguide.mod.chat;
+
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IChatComponent;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+public class ChatTransmitter {
+
+ public static final String PREFIX = "§eDungeons Guide §7:: ";
+ public static String prefix = "§eDungeons Guide §7:: ";
+
+ public ChatTransmitter() {
+ MinecraftForge.EVENT_BUS.register(this);
+ }
+
+ static Queue receiveQueue = new ConcurrentLinkedQueue<>();
+
+ public static void addToQueue(String chat, boolean noDupe) {
+ addToQueue(new ChatComponentText(chat), noDupe);
+ }
+
+ public static void addToQueue(ChatComponentText chat) {
+ addToQueue(chat, false);
+ }
+ public static void addToQueue(ChatComponentText chat, boolean noDupe) {
+ if(noDupe && receiveQueue.stream().anyMatch(a -> a.equals(chat))) return;
+ receiveQueue.add(chat);
+ }
+
+ public static void addToQueue(String s) {
+ addToQueue(s, false);
+ }
+
+ public static void sendDebugChat(IChatComponent iChatComponent) {
+ if(FeatureRegistry.DEBUG == null) return;
+ if (FeatureRegistry.DEBUG.isEnabled())
+ addToQueue((ChatComponentText) iChatComponent);
+ }
+
+ public static void sendDebugChat(String text) {
+ sendDebugChat(new ChatComponentText(text));
+ }
+
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent clientTickEvent) {
+ if(clientTickEvent.phase != TickEvent.Phase.START && Minecraft.getMinecraft().thePlayer == null) return;
+
+ if (!receiveQueue.isEmpty()) {
+ ClientChatReceivedEvent event = new ClientChatReceivedEvent((byte) 1, receiveQueue.poll());
+ MinecraftForge.EVENT_BUS.post(event);
+ if (!event.isCanceled()) {
+ Minecraft.getMinecraft().thePlayer.addChatMessage(event.message);
+ }
+ }
+
+
+ }
+
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
new file mode 100644
index 00000000..b3f8dd19
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDgDebug.java
@@ -0,0 +1,450 @@
+package kr.syeyoung.dungeonsguide.mod.commands;
+
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.Main;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.config.guiconfig.NestedCategory;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.mod.dungeon.MapProcessor;
+import kr.syeyoung.dungeonsguide.dungeon.data.DungeonRoomInfo;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProviderRegistry;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventHolder;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.*;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.dunegonmechanic.DungeonMechanic;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.EditingContext;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui.GuiDungeonRoomEdit;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoomInfoRegistry;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.GeneralRoomProcessor;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.BossfightProcessor;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DungeonLeftEvent;
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.party.PartyContext;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.utils.*;
+import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
+import net.minecraft.block.Block;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.CommandException;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.nbt.CompressedStreamTools;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.Tuple;
+import net.minecraft.world.World;
+import net.minecraftforge.common.MinecraftForge;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.vecmath.Vector2d;
+import java.awt.*;
+import java.io.*;
+import java.nio.file.Files;
+import java.security.*;
+import java.security.cert.CertificateException;
+import java.util.List;
+import java.util.*;
+import java.util.regex.Pattern;
+
+public class CommandDgDebug extends CommandBase {
+ @Override
+ public String getCommandName() {
+ return "dgdebug";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "dgdebug";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) throws CommandException {
+ if (args.length == 0) return;
+ String arg = args[0].toLowerCase();
+
+
+ if ("scoreboard".equals(arg)) {
+ ScoreBoardUtils.forEachLine(l -> {
+ ChatTransmitter.addToQueue("LINE: " + l, false);
+ });
+ } else if ("scoreboardclean".equals(arg)) {
+ ScoreBoardUtils.forEachLineClean(l -> {
+ ChatTransmitter.addToQueue("LINE: " + l, false);
+ });
+ } else if ("title".equals(arg)) {
+ if (args.length == 2) {
+ System.out.println("Displayuing title:" + args[1]);
+ TitleRender.displayTitle(args[1], "", 10, 40, 20);
+ }
+ } else if ("mockdungeonstart".equals(arg)) {
+ if (!Minecraft.getMinecraft().isSingleplayer()) {
+ ChatTransmitter.addToQueue("This only works in singlepauer", false);
+ return;
+ }
+
+ if (args.length == 2) {
+ int time = Integer.parseInt(args[1]);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in " + time + " seconds.§r", false);
+ return;
+ }
+
+
+ (new Thread(() -> {
+ try {
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 15 seconds.§r", false);
+ Thread.sleep(6000);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 10 seconds.§r", false);
+ Thread.sleep(700);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 5 seconds.§r", false);
+ Thread.sleep(1000);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 4 seconds.§r", false);
+ Thread.sleep(1000);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 3 seconds.§r", false);
+ Thread.sleep(1000);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 2 seconds.§r", false);
+ Thread.sleep(1000);
+ ChatTransmitter.addToQueue("§r§aDungeon starts in 1 seconds.§r", false);
+ } catch (InterruptedException ignored) {
+ }
+ })).start();
+ } else if ("saverooms".equals(arg)) {
+ DungeonRoomInfoRegistry.saveAll(Main.getConfigDir());
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully saved user generated roomdata"));
+ } else if ("loadrooms".equals(arg)) {
+ try {
+ DungeonRoomInfoRegistry.loadAll(Main.getConfigDir());
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully loaded roomdatas"));
+ return;
+ } catch (BadPaddingException | InvalidKeyException | InvalidAlgorithmParameterException |
+ NoSuchAlgorithmException | IOException | IllegalBlockSizeException |
+ NoSuchPaddingException e) {
+ e.printStackTrace();
+ }
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cAn error has occurred while loading roomdata"));
+ } else if ("reloadah".equals(arg)) {
+ try {
+ AhUtils.loadAuctions();
+ } catch (CertificateException | NoSuchAlgorithmException | InvalidKeyException |
+ InvalidAlgorithmParameterException | NoSuchPaddingException | BadPaddingException |
+ KeyStoreException | IllegalBlockSizeException | KeyManagementException e) {
+ e.printStackTrace();
+ }
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fReloaded Ah data"));
+ } else if ("brand".equals(arg)) {
+ String serverBrand = Minecraft.getMinecraft().thePlayer.getClientBrand();
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e" + serverBrand));
+ } else if ("pathfind".equals(arg)) {
+ try {
+ DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
+ EntityPlayerSP thePlayer = Minecraft.getMinecraft().thePlayer;
+ if (thePlayer == null) return;
+ if (context.getBossfightProcessor() != null) context.getBossfightProcessor().tick();
+ Point roomPt = context.getMapProcessor().worldPointToRoomPoint(thePlayer.getPosition());
+
+ DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt);
+ GeneralRoomProcessor grp = (GeneralRoomProcessor) dungeonRoom.getRoomProcessor();
+ grp.pathfind("COMMAND", args[1], args[2], FeatureRegistry.SECRET_LINE_PROPERTIES_GLOBAL.getRouteProperties());
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ } else if ("process".equals(arg)) {
+ File fileRoot = Main.getConfigDir();
+ File dir = new File(fileRoot, "processorinput");
+ File outsecret = new File(fileRoot, "processoroutsecret");
+ for (File f : dir.listFiles()) {
+ if (!f.getName().endsWith(".roomdata")) continue;
+ try {
+ InputStream fis = new FileInputStream(f);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject();
+ ois.close();
+ fis.close();
+ dri.setUserMade(false);
+
+ FileOutputStream fos = new FileOutputStream(new File(outsecret, dri.getUuid().toString() + ".roomdata"));
+ ObjectOutputStream oos = new ObjectOutputStream(fos);
+ oos.writeObject(dri);
+ oos.flush();
+ oos.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ } else if ("check".equals(arg)) {
+ File fileroot = Main.getConfigDir();
+ for (File f : fileroot.listFiles()) {
+ if (!f.getName().endsWith(".roomdata")) continue;
+ try {
+ InputStream fis = new FileInputStream(f);
+ ObjectInputStream ois = new ObjectInputStream(fis);
+ DungeonRoomInfo dri = (DungeonRoomInfo) ois.readObject();
+ ois.close();
+ fis.close();
+ System.out.println("Starting at " + dri.getName() + " - " + dri.getUuid());
+ for (Map.Entry value2 : dri.getMechanics().entrySet()) {
+ DungeonMechanic value = value2.getValue();
+ if (value instanceof DungeonSecret &&
+ (((DungeonSecret) value).getSecretType() == DungeonSecret.SecretType.BAT
+ || ((DungeonSecret) value).getSecretType() == DungeonSecret.SecretType.CHEST)
+ && ((DungeonSecret) value).getSecretPoint().getY() == 0) {
+ OffsetPoint offsetPoint = ((DungeonSecret) value).getSecretPoint();
+ if (dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] != -1) {
+ dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] = -1;
+ System.out.println("Fixing " + value2.getKey() + " - as secret " + ((DungeonSecret) value).getSecretType() + " - at " + ((DungeonSecret) value).getSecretPoint());
+ }
+ } else if (value instanceof DungeonOnewayDoor) {
+ for (OffsetPoint offsetPoint : ((DungeonOnewayDoor) value).getSecretPoint().getOffsetPointList()) {
+ if (offsetPoint.getY() == 0 && dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] != -1) {
+ dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] = -1;
+ System.out.println("Fixing " + value2.getKey() + " - o-door - at " + offsetPoint);
+ }
+ }
+ } else if (value instanceof DungeonDoor) {
+ for (OffsetPoint offsetPoint : ((DungeonDoor) value).getSecretPoint().getOffsetPointList()) {
+ if (offsetPoint.getY() == 0 && dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] != -1) {
+ dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] = -1;
+ System.out.println("Fixing " + value2.getKey() + " - door - at " + offsetPoint);
+ }
+ }
+ } else if (value instanceof DungeonBreakableWall) {
+ for (OffsetPoint offsetPoint : ((DungeonBreakableWall) value).getSecretPoint().getOffsetPointList()) {
+ if (offsetPoint.getY() == 0 && dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] != -1) {
+ dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] = -1;
+ System.out.println("Fixing " + value2.getKey() + " - wall - at " + offsetPoint);
+ }
+ }
+ } else if (value instanceof DungeonTomb) {
+ for (OffsetPoint offsetPoint : ((DungeonTomb) value).getSecretPoint().getOffsetPointList()) {
+ if (offsetPoint.getY() == 0 && dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] != -1) {
+ dri.getBlocks()[offsetPoint.getZ()][offsetPoint.getX()] = -1;
+ System.out.println("Fixing " + value2.getKey() + " - crypt - at " + offsetPoint);
+ }
+ }
+ }
+ }
+ FileOutputStream fos = new FileOutputStream(f);
+ ObjectOutputStream oos = new ObjectOutputStream(fos);
+ oos.writeObject(dri);
+ oos.flush();
+ oos.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ } else if ("reloaddungeon".equals(arg)) {
+ try {
+ MinecraftForge.EVENT_BUS.post(new DungeonLeftEvent());
+
+ DungeonsGuide.getDungeonsGuide().getDungeonFacade().setContext(null);
+ MapUtils.clearMap();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ } else if ("partyid".equals(arg)) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fInternal Party id: " + Optional.ofNullable(PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyID).orElse(null)));
+ } else if ("loc".equals(arg)) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fYou're in " + DungeonContext.getDungeonName()));
+ } else if ("saverun".equals(arg)) {
+ try {
+ File f = Main.getConfigDir();
+ File runDir = new File(f, "dungeonruns");
+ runDir.mkdirs();
+
+ File runFile = new File(runDir, UUID.randomUUID() + ".dgrun");
+
+ DungeonContext dungeonContext = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
+ if (dungeonContext == null) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cCouldn't find dungeon to save!"));
+ return;
+ }
+ DungeonEventHolder dungeonEventHolder = new DungeonEventHolder();
+ dungeonEventHolder.setDate(dungeonContext.getInit());
+ dungeonEventHolder.setPlayers(dungeonContext.getPlayers());
+ dungeonEventHolder.setEventDataList(dungeonContext.getEvents());
+
+
+ ObjectOutputStream oos = new ObjectOutputStream(Files.newOutputStream(runFile.toPath()));
+ oos.writeObject(dungeonEventHolder);
+ oos.flush();
+ oos.close();
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully saved dungeon run to " + runFile.getAbsolutePath()));
+ } catch (Exception e) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cAn error occured while writing rundata " + e.getMessage()));
+ e.printStackTrace();
+ }
+ } else if ("requeststaticresource".equals(arg)) {
+ UUID uid = UUID.fromString(args[1]);
+ StaticResourceCache.INSTANCE.getResource(uid).thenAccept(a -> {
+ sender.addChatMessage(new ChatComponentText(a.getResourceID() + ": " + a.getValue() + ": " + a.isExists()));
+ });
+ } else if ("createfakeroom".equals(arg)) {// load schematic
+ File f = new File(Main.getConfigDir(), "schematics/new roonm-b2df250c-4af2-4201-963c-0ee1cb6bd3de-5efb1f0c-c05f-4064-bde7-cad0874fdf39.schematic");
+ NBTTagCompound compound;
+ try {
+ compound = CompressedStreamTools.readCompressed(new FileInputStream(f));
+ } catch (IOException e) {
+ e.printStackTrace();
+ return;
+ }
+
+ byte[] blocks = compound.getByteArray("Blocks");
+ byte[] meta = compound.getByteArray("Data");
+ for (int x = 0; x < compound.getShort("Width"); x++) {
+ for (int y = 0; y < compound.getShort("Height"); y++) {
+ for (int z = 0; z < compound.getShort("Length"); z++) {
+ int index = x + (y * compound.getShort("Length") + z) * compound.getShort("Width");
+ BlockPos pos = new BlockPos(x, y, z);
+ World w = MinecraftServer.getServer().getEntityWorld();
+ w.setBlockState(pos, Block.getBlockById(blocks[index] & 0xFF).getStateFromMeta(meta[index] & 0xFF), 2);
+ }
+ }
+ }
+
+
+ DungeonSpecificDataProviderRegistry.doorFinders.put(Pattern.compile("TEST DG"), new DungeonSpecificDataProvider() {
+ @Override
+ public BlockPos findDoor(World w, String dungeonName) {
+ return new BlockPos(0, 0, 0);
+ }
+
+ @Override
+ public Vector2d findDoorOffset(World w, String dungeonName) {
+ return null;
+ }
+
+ @Override
+ public BossfightProcessor createBossfightProcessor(World w, String dungeonName) {
+ return null;
+ }
+
+ @Override
+ public boolean isTrapSpawn(String dungeonName) {
+ return false;
+ }
+
+ @Override
+ public double secretPercentage(String dungeonName) {
+ return 0;
+ }
+
+ @Override
+ public int speedSecond(String dungeonName) {
+ return 0;
+ }
+ });
+ DungeonContext.setDungeonName("TEST DG");
+ DungeonContext fakeContext = new DungeonContext(Minecraft.getMinecraft().theWorld);
+ DungeonsGuide.getDungeonsGuide().getDungeonFacade().setContext(fakeContext);
+ DungeonsGuide.getDungeonsGuide().getSkyblockStatus().setForceIsOnDungeon(true);
+ MapProcessor mapProcessor = fakeContext.getMapProcessor();
+ mapProcessor.setUnitRoomDimension(new Dimension(16, 16));
+ mapProcessor.setBugged(false);
+ mapProcessor.setDoorDimensions(new Dimension(4, 4));
+ mapProcessor.setTopLeftMapPoint(new Point(0, 0));
+ fakeContext.setDungeonMin(new BlockPos(0, 70, 0));
+
+ DungeonRoom dungeonRoom = new DungeonRoom(Arrays.asList(new Point(0, 0)), ShortUtils.topLeftifyInt((short) 1), (byte) 63, new BlockPos(0, 70, 0), new BlockPos(31, 70, 31), fakeContext, Collections.emptySet());
+
+ fakeContext.getDungeonRoomList().add(dungeonRoom);
+ for (Point p : Arrays.asList(new Point(0, 0))) {
+ fakeContext.getRoomMapper().put(p, dungeonRoom);
+ }
+
+ EditingContext.createEditingContext(dungeonRoom);
+ EditingContext.getEditingContext().openGui(new GuiDungeonRoomEdit(dungeonRoom));
+ } else if ("closecontext".equals(arg)) {
+ DungeonsGuide.getDungeonsGuide().getSkyblockStatus().setForceIsOnDungeon(false);
+
+ DungeonsGuide.getDungeonsGuide().getDungeonFacade().setContext(null);
+ } else if ("dumpsettings".equals(arg)) {
+ NestedCategory nestedCategory = new NestedCategory("ROOT");
+ for (AbstractFeature abstractFeature : FeatureRegistry.getFeatureList()) {
+ String category = abstractFeature.getCategory();
+ NestedCategory currentRoot = nestedCategory;
+ for (String s : category.split("\\.")) {
+ NestedCategory finalCurrentRoot = currentRoot;
+ if (currentRoot.children().containsKey(s))
+ currentRoot = currentRoot.children().get(s);
+ else {
+ currentRoot.child(currentRoot = new NestedCategory(finalCurrentRoot.categoryFull() + "." + s));
+ }
+ }
+ }
+
+ StringBuilder stringBuilder = new StringBuilder();
+ StringBuilder stringBuilder2 = new StringBuilder();
+
+ Stack> stak = new Stack<>();
+ stak.push(new Tuple<>(nestedCategory, 0));
+ Set discovered = new HashSet<>();
+ while (!stak.isEmpty()) {
+ Tuple n = stak.pop();
+ if (discovered.contains(n.getFirst())) continue;
+ discovered.add(n.getFirst());
+ for (Map.Entry stringNestedCategoryEntry : n.getFirst().children().entrySet()) {
+ stak.push(new Tuple<>(stringNestedCategoryEntry.getValue(), n.getSecond() + 1));
+ }
+
+ if (n.getFirst().categoryFull().equals("ROOT")) continue;
+
+ String prefix = "";
+ for (int i = 0; i < n.getSecond() - 1; i++) {
+ prefix += " ";
+ }
+
+ List abstractFeatureList = FeatureRegistry.getFeaturesByCategory().getOrDefault(n.getFirst().categoryFull().substring(5), Collections.emptyList());
+ stringBuilder.append(prefix).append("- C ").append(n.getFirst().categoryFull()).append("\n");
+ stringBuilder2.append(n.getFirst().categoryFull()).append("\n");
+ for (AbstractFeature abstractFeature : abstractFeatureList) {
+ stringBuilder.append(prefix).append(" - F ").append(abstractFeature.getName()).append(" / ").append(abstractFeature.getDescription().replace("\n", "$NEW_LINE$")).append("\n");
+ }
+ }
+ System.out.println(stringBuilder.toString());
+ System.out.println(stringBuilder2.toString());
+ } else if ("readmap".equals(arg)) {
+ try {
+ int fromX = Integer.parseInt(args[1]);
+ int fromY = Integer.parseInt(args[2]);
+ sender.addChatMessage(new ChatComponentText(MapUtils.readDigit(MapUtils.getColors(), fromX, fromY) + "-"));
+// int cntY = Integer.parseInt(args[3]);
+// int target = Integer.parseInt(args[4]);
+// StringBuilder sb = new StringBuilder("{");
+// for (int y = fromY; y < fromY + cntY; y++) {
+// int curr = 0;
+// for (int x = fromX; x < fromX+8; x++) {
+// byte clr = MapUtils.getMapColorAt(MapUtils.getColors(), x,y);
+// if (clr == target) curr = (curr << 1) | 1;
+// else curr <<= 1;
+// }
+// sb.append("0x").append(Integer.toHexString(curr).toUpperCase());
+// if (y != fromY + cntY - 1) sb.append(", ");
+// }
+// sb.append("}");
+// System.out.println("\n"+sb.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else {
+ sender.addChatMessage(new ChatComponentText("ain't gonna find much anything here"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg loadrooms §7-§f Reloads dungeon roomdata."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg brand §7-§f View server brand."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg info §7-§f View Current DG User info."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg saverun §7-§f Save run to be sent to developer."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg saverooms §7-§f Saves usergenerated dungeon roomdata."));
+ }
+ }
+
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
new file mode 100644
index 00000000..9b9811cd
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandDungeonsGuide.java
@@ -0,0 +1,172 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.commands;
+
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.config.guiconfig.GuiConfigV2;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.discord.rpc.RichPresenceManager;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.features.impl.party.playerpreview.FeatureViewPlayerStatsOnJoin;
+import kr.syeyoung.dungeonsguide.mod.features.impl.party.playerpreview.api.ApiFetcher;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.stomp.StompManager;
+import kr.syeyoung.dungeonsguide.mod.stomp.StompPayload;
+import kr.syeyoung.dungeonsguide.mod.wsresource.StaticResourceCache;
+import net.minecraft.client.Minecraft;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.ChatStyle;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.common.gameevent.TickEvent;
+import org.json.JSONObject;
+
+public class CommandDungeonsGuide extends CommandBase {
+ private boolean openConfig = false;
+
+ @Override
+ public String getCommandName() {
+ return "dg";
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return "dg";
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ if (args.length == 0) {
+ openConfig = true;
+ } else if (args[0].equalsIgnoreCase("reparty")) {
+ if (!DungeonsGuide.getDungeonsGuide().getCommandReparty().requestReparty(false)) {
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cCurrently Repartying"));
+ }
+ } else if (args[0].equalsIgnoreCase("gui")) {
+ openConfig = true;
+ } else if (args[0].equalsIgnoreCase("pvall")) {
+ PartyManager.INSTANCE.requestPartyList((context) -> {
+ if (context == null) {
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cNot in Party"));
+ return;
+ }
+ FeatureViewPlayerStatsOnJoin.processPartyMembers(context);
+ });
+ } else if (args[0].equalsIgnoreCase("asktojoin") || args[0].equalsIgnoreCase("atj")) {
+ if (RichPresenceManager.INSTANCE.getLastSetupCode() == -9999) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cDiscord GameSDK has been disabled, or it failed to load!"));
+ return;
+ }
+ if (!PartyManager.INSTANCE.canInvite()) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cYou don't have perms in the party to invite people!"));
+ } else {
+ PartyManager.INSTANCE.toggleAllowAskToJoin();
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fToggled Ask to join to " + (PartyManager.INSTANCE.getAskToJoinSecret() != null ? "§eon" : "§coff")));
+ }
+
+ if (!FeatureRegistry.DISCORD_RICHPRESENCE.isEnabled()) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cDiscord Rich Presence is disabled! Enable at /dg -> Discord "));
+ }
+ if (!FeatureRegistry.DISCORD_ASKTOJOIN.isEnabled()) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cDiscord Invite Viewer is disabled! Enable at /dg -> Discord ")); // how
+ }
+ } else if (args[0].equals("pv")) {
+ try {
+ ApiFetcher.fetchUUIDAsync(args[1])
+ .thenAccept(a -> {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e" + args[1] + "§f's Profile ").appendSibling(new ChatComponentText("§7view").setChatStyle(new ChatStyle().setChatHoverEvent(new FeatureViewPlayerStatsOnJoin.HoverEventRenderPlayer(a.orElse(null))))));
+ });
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ } else if (args[0].equals("purge")) {
+ ApiFetcher.purgeCache();
+ CosmeticsManager cosmeticsManager = DungeonsGuide.getDungeonsGuide().getCosmeticsManager();
+ cosmeticsManager.requestPerms();
+ cosmeticsManager.requestCosmeticsList();
+ cosmeticsManager.requestActiveCosmetics();
+ StaticResourceCache.INSTANCE.purgeCache();
+ FeatureRegistry.DISCORD_ASKTOJOIN.imageMap.clear();
+ FeatureRegistry.DISCORD_ASKTOJOIN.futureMap.clear();
+
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully purged API Cache!"));
+ } else if (args[0].equals("pbroadcast")) {
+ try {
+ String[] payload = new String[args.length - 1];
+ System.arraycopy(args, 1, payload, 0, payload.length);
+ String actualPayload = String.join(" ", payload).replace("$C$", "§");
+ StompManager.getInstance().send(new StompPayload().header("destination", "/app/party.broadcast").payload(
+ new JSONObject().put("partyID", PartyManager.INSTANCE.getPartyContext().getPartyID())
+ .put("payload", actualPayload).toString()
+ ));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ } else if (args[0].equals("partymax") || args[0].equals("pm")) {
+ if (args.length == 1) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fCurrent party max is §e" + PartyManager.INSTANCE.getMaxParty()));
+ } else if (args.length == 2) {
+ try {
+ int partyMax = Integer.parseInt(args[1]);
+ if (partyMax < 2) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §cparty max can't be smaller than 2"));
+ return;
+ }
+
+ PartyManager.INSTANCE.setMaxParty(partyMax);
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §fSuccessfully set partymax to §e" + PartyManager.INSTANCE.getMaxParty()));
+ } catch (Exception e) {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §c" + args[1] + " is not valid number."));
+ }
+ }
+ } else {
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg §7-§fOpens configuration gui"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg gui §7-§fOpens configuration gui"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg help §7-§fShows command help"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg reloadah §7-§f Reloads price data from server."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg reparty §7-§f Reparty."));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg asktojoin or /dg atj §7-§f Toggle ask to join §cRequires Discord Rich Presence enabled. (/dg -> Advanced)"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg partymax [number] or /dg pm [number] §7-§f Sets partymax §7(maximum amount people in party, for discord rpc)"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg pv [ign] §7-§f Profile Viewer"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg pvall §7-§f Profile Viewer For all people on party"));
+ sender.addChatMessage(new ChatComponentText("§eDungeons Guide §7:: §e/dg purge §7-§f Purge api cache."));
+ }
+ }
+
+ @SubscribeEvent
+ public void onTick(TickEvent.ClientTickEvent e) {
+ try {
+ if (openConfig && e.phase == TickEvent.Phase.START) {
+ openConfig = false;
+ Minecraft.getMinecraft().displayGuiScreen(new GuiConfigV2());
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandReparty.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandReparty.java
new file mode 100644
index 00000000..65eccb3b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/commands/CommandReparty.java
@@ -0,0 +1,104 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.commands;
+
+import kr.syeyoung.dungeonsguide.mod.chat.ChatProcessor;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import net.minecraft.client.Minecraft;
+import net.minecraft.command.CommandBase;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.util.ChatComponentText;
+
+import java.util.stream.Collectors;
+
+public class CommandReparty extends CommandBase {
+ private String command;
+ public CommandReparty() {
+ command = FeatureRegistry.ETC_REPARTY.getParameter("command").getValue();
+ command = command.replace(" ", "");
+ }
+
+ @Override
+ public String getCommandName() {
+ return command;
+ }
+
+ @Override
+ public String getCommandUsage(ICommandSender sender) {
+ return command;
+ }
+
+ @Override
+ public void processCommand(ICommandSender sender, String[] args) {
+ if (!requestReparty(false)) {
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cCurrently Repartying"));
+ }
+ }
+
+ private boolean reparting = false;
+
+
+ public boolean requestReparty(boolean noerror) {
+ if (reparting) {
+ return false;
+ }
+ reparting = true;
+
+ PartyManager.INSTANCE.requestPartyList(pc -> {
+ if (pc == null) {
+ if (!noerror)
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cNot in Party"));
+ reparting = false;
+ return;
+ }
+ if (!pc.hasLeader(Minecraft.getMinecraft().getSession().getUsername())) {
+ if (!noerror)
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cYou're not leader"));
+ reparting = false;
+ return;
+ }
+ if (pc.isSelfSolo()) {
+ if (!noerror)
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §cYou can not reparty yourself"));
+ reparting = false;
+ return;
+ }
+ String members = pc.getPartyRawMembers().stream().filter(a -> !a.equalsIgnoreCase(Minecraft.getMinecraft().getSession().getUsername())).collect(Collectors.joining(" "));
+ String command = "/p invite "+members;
+
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §eDisbanding Party..."));
+ ChatProcessor.INSTANCE.addToChatQueue("/p disband", () -> {
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §eRunning invite command §f"+command));
+ ChatProcessor.INSTANCE.addToChatQueue(command, () -> {
+ ChatTransmitter.addToQueue(new ChatComponentText("§eDungeons Guide §7:: §eSuccessfully repartied!§f"));
+
+ reparting = false;
+ }, false);
+ }, false);
+ });
+ return true;
+ }
+
+ @Override
+ public int getRequiredPermissionLevel() {
+ return 0;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/Config.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/Config.java
new file mode 100644
index 00000000..0e1bf7fd
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/Config.java
@@ -0,0 +1,65 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+
+import java.io.*;
+
+public class Config {
+ public static JsonObject configuration;
+
+ public static File f;
+
+ public static void loadConfig(File f) throws IOException {
+ try {
+ configuration = (JsonObject) new JsonParser().parse(new InputStreamReader(new FileInputStream(Config.f = f == null ? Config.f : f)));
+ } catch (Exception e) {
+ configuration = new JsonObject();
+ }
+ for (AbstractFeature feature : FeatureRegistry.getFeatureList()) {
+ JsonObject object = configuration.getAsJsonObject(feature.getKey());
+ if (object != null) feature.loadConfig(object);
+ }
+
+ saveConfig();
+ }
+
+ public static void saveConfig() throws IOException {
+ for (AbstractFeature feature : FeatureRegistry.getFeatureList()) {
+ JsonObject object = feature.saveConfig();
+ configuration.add(feature.getKey(), object);
+ }
+
+ String str = new Gson().toJson(configuration);
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(f);
+ BufferedWriter bos = new BufferedWriter(new OutputStreamWriter(fos));
+ bos.write(str);
+ bos.flush();
+ } finally {
+ fos.close();
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/ConfigPanelCreator.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/ConfigPanelCreator.java
new file mode 100644
index 00000000..da3974a3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/ConfigPanelCreator.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import com.google.common.base.Function;
+import com.google.common.base.Supplier;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class ConfigPanelCreator implements Function {
+ public static final ConfigPanelCreator INSTANCE = new ConfigPanelCreator();
+
+ public static final Map> map = new HashMap>();
+
+ @Nullable
+ @Override
+ public MPanel apply(@Nullable String input) {
+ if (!map.containsKey(input)) return null;
+ return map.get(input).get();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/GuiConfigV2.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/GuiConfigV2.java
new file mode 100644
index 00000000..0f6be522
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/GuiConfigV2.java
@@ -0,0 +1,59 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.MathHelper;
+
+import java.awt.*;
+
+public class GuiConfigV2 extends MGui {
+
+ @Getter
+ private RootConfigPanel rootConfigPanel;
+
+ public GuiConfigV2() {
+ rootConfigPanel = new RootConfigPanel(this);
+ getMainPanel().add(rootConfigPanel);
+ }
+
+
+ @Override
+ public void initGui() {
+ super.initGui();
+ int dw = Minecraft.getMinecraft().displayWidth;
+ int dh = Minecraft.getMinecraft().displayHeight;
+ int width = MathHelper.clamp_int(dw - 200, 1250, 1500), height = MathHelper.clamp_int(dh - 200, 600, 800);
+ double scale = 2.0;
+ if (dw <= width || dh <= height) {
+ width = width/2; height = height/2;
+ scale = 1.0;
+ }
+ rootConfigPanel.setBounds(new Rectangle((dw-width)/2, (dh-height)/2, width,height));
+ rootConfigPanel.setScale(scale);
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ super.drawDefaultBackground();
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategory.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategory.java
new file mode 100644
index 00000000..c4561c09
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategory.java
@@ -0,0 +1,103 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import kr.syeyoung.dungeonsguide.mod.utils.cursor.EnumCursor;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.PositionedSoundRecord;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
+
+import java.awt.*;
+
+public class MCategory extends MPanel {
+
+ private NestedCategory nestedCategory;
+ private RootConfigPanel rootConfigPanel;
+ @Getter
+ @Setter
+ private Color hover = new Color(94, 94, 94, 255);
+ public MCategory(NestedCategory nestedCategory, RootConfigPanel rootConfigPanel) {
+ this.nestedCategory = nestedCategory;
+ this.rootConfigPanel = rootConfigPanel;
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+ int border = RenderUtils.blendAlpha(0x141414, 0.12f);
+ if (!rootConfigPanel.getSearchWord().isEmpty() && (nestedCategory.categoryName().toLowerCase().contains(rootConfigPanel.getSearchWord()))) {
+ border = 0xFF02EE67;
+ }
+
+ Gui.drawRect(0,0,getBounds().width, getBounds().height,border);
+ if (getBounds().height >= 28)
+ Gui.drawRect(1,18,getBounds().width -1, getBounds().height-1, RenderUtils.blendAlpha(0x141414, 0.15f));
+ Gui.drawRect(1,1,getBounds().width-1, 18, RenderUtils.blendAlpha(0x141414, 0.12f));
+
+
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(5,5,0);
+ GlStateManager.scale(1.0,1.0,0);
+ GlStateManager.enableBlend();
+ 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);
+
+ fr.drawString((lastAbsClip.contains(absMousex, absMousey) ? "§n" : "") + nestedCategory.categoryName(), 0,0, 0xFFFFFFFF);
+ GlStateManager.popMatrix();
+
+ fr.drawSplitString(FeatureRegistry.getCategoryDescription().getOrDefault(nestedCategory.categoryFull(), ""), 5, 23, getBounds().width -10, 0xFFBFBFBF);
+ }
+
+
+ @Override
+ public Dimension getPreferredSize() {
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+
+ int descriptionHeight =
+ FeatureRegistry.getCategoryDescription().containsKey(nestedCategory.categoryFull()) ?
+ fr.listFormattedStringToWidth(FeatureRegistry.getCategoryDescription().get(nestedCategory.categoryFull()), Math.max(100, getBounds().width - 10)).size() * fr.FONT_HEIGHT
+ : -9;
+
+ return new Dimension(100, descriptionHeight + 28);
+ }
+
+ @Override
+ public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
+ if (lastAbsClip.contains(absMouseX, absMouseY)) {
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ rootConfigPanel.setCurrentPageAndPushHistory(nestedCategory.categoryFull());
+ }
+ }
+
+ @Override
+ public void mouseMoved(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0) {
+ if (lastAbsClip.contains(absMouseX, absMouseY))
+ setCursor(EnumCursor.POINTING_HAND);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategoryElement.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategoryElement.java
new file mode 100644
index 00000000..74f5f352
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MCategoryElement.java
@@ -0,0 +1,82 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import kr.syeyoung.dungeonsguide.mod.utils.cursor.EnumCursor;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.audio.PositionedSoundRecord;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.util.ResourceLocation;
+
+import java.awt.*;
+
+public class MCategoryElement extends MPanel {
+ private String category;
+ private Runnable onClick;
+ private int leftPad = 0;
+ private int offsetX;
+ private RootConfigPanel rootConfigPanel;
+ public MCategoryElement(String category, Runnable onClick, int leftPad, int offsetX, RootConfigPanel rooot) {
+ this.category = category;
+ this.onClick = onClick;
+ this.leftPad = leftPad;
+ this.offsetX = offsetX;
+ this.rootConfigPanel = rooot;
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+ if (rootConfigPanel.getCurrentPage().equals(category)) {
+ clip(0,scissor.y, Minecraft.getMinecraft().displayWidth, scissor.height);
+ Gui.drawRect(leftPad - offsetX, 0, getBounds().width, getBounds().height, RenderUtils.blendAlpha(0x141414, 0.13f));
+ } else if (lastAbsClip.contains(absMousex, absMousey) && getTooltipsOpen() == 0) {
+ clip(0,scissor.y, Minecraft.getMinecraft().displayWidth, scissor.height);
+ Gui.drawRect(leftPad - offsetX, 0, getBounds().width, getBounds().height, RenderUtils.blendAlpha(0x141414, 0.09f));
+ }
+ clip(scissor.x, scissor.y, scissor.width, scissor.height);
+
+
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ String name = category.substring(category.lastIndexOf(".")+1);
+ fr.drawString(name, leftPad,2,-1);
+
+ }
+
+ @Override
+ public Dimension getPreferredSize() {
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ return new Dimension(fr.getStringWidth(category.substring(category.lastIndexOf(".")+1)) + leftPad+10, fr.FONT_HEIGHT+4);
+ }
+
+ @Override
+ public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
+ if (!lastAbsClip.contains(absMouseX, absMouseY) || getTooltipsOpen() > 0) { return; }
+ if (onClick != null) onClick.run();
+ Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+
+ }
+ @Override
+ public void mouseMoved(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0) {
+ if (lastAbsClip.contains(absMouseX, absMouseY))
+ setCursor(EnumCursor.POINTING_HAND);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeature.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeature.java
new file mode 100644
index 00000000..070f4fce
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeature.java
@@ -0,0 +1,154 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.config.guiconfig.location.GuiGuiLocationConfig;
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.GuiFeature;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MToggleButton;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.GlStateManager;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GL14;
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.List;
+
+public class MFeature extends MPanel {
+
+ @Getter
+ private final AbstractFeature feature;
+
+ private final List addons = new ArrayList();
+
+ @Getter @Setter
+ private Color hover;
+
+ private final RootConfigPanel panel;
+
+ public MFeature(final AbstractFeature abstractFeature, final RootConfigPanel panel) {
+ this.panel = panel;
+ this.feature = abstractFeature;
+
+ if (abstractFeature.isDisyllable()) {
+ final MToggleButton mStringSelectionButton = new MToggleButton();
+ mStringSelectionButton.setOnToggle(new Runnable() {
+ @Override
+ public void run() {
+ boolean selected = mStringSelectionButton.isEnabled();
+ feature.setEnabled(selected);
+ }
+ });
+ mStringSelectionButton.setBackground(RenderUtils.blendAlpha(0x141414, 0.07f));
+ addons.add(mStringSelectionButton);
+ mStringSelectionButton.setEnabled(feature.isEnabled());
+ mStringSelectionButton.setSize(new Dimension(40, 15));
+ add(mStringSelectionButton);
+ }
+ if (abstractFeature.getParameters().size() != 0) {
+ MButton button = new MButton();
+ button.setText("Settings");
+ button.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ panel.setCurrentPageAndPushHistory(abstractFeature.getEditRoute(panel));
+ }
+ });
+ button.setBackground(RenderUtils.blendAlpha(0x141414, 0.07f));
+ button.setClicked(RenderUtils.blendAlpha(0x141414, 0.17f));
+ button.setHover(RenderUtils.blendAlpha(0x141414, 0.17f));
+ addons.add(button);
+ button.setSize(new Dimension(50, 15));
+ add(button);
+ }
+ if (abstractFeature instanceof GuiFeature) {
+ MButton button = new MButton();
+ button.setText("Relocate");
+ button.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiGuiLocationConfig(Minecraft.getMinecraft().currentScreen, abstractFeature));
+ button.setIsclicked(false);
+ }
+ });
+ button.setBackground(RenderUtils.blendAlpha(0x141414, 0.07f));
+ button.setClicked(RenderUtils.blendAlpha(0x141414, 0.17f));
+ button.setHover(RenderUtils.blendAlpha(0x141414, 0.17f));
+ addons.add(button);
+ button.setSize(new Dimension(75, 15));
+ add(button);
+ }
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+
+ int border = RenderUtils.blendAlpha(0x141414, 0.12f);
+ if (!panel.getSearchWord().isEmpty() && (feature.getName().toLowerCase().contains(panel.getSearchWord()) || feature.getDescription().toLowerCase().contains(panel.getSearchWord()))) {
+ border = 0xFF02EE67;
+ }
+
+ Gui.drawRect(0,0,getBounds().width, getBounds().height,border);
+ Gui.drawRect(1,18,getBounds().width -1, getBounds().height-1, RenderUtils.blendAlpha(0x141414, 0.15f));
+ Gui.drawRect(1,1,getBounds().width-1, 18, RenderUtils.blendAlpha(0x141414, 0.12f));
+
+
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(5,5,0);
+ GlStateManager.scale(1.0,1.0,0);
+ GlStateManager.enableBlend();
+ 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);
+ fr.drawString(feature.getName(), 0,0, 0xFFFFFFFF);
+ GlStateManager.popMatrix();
+
+ fr.drawSplitString(feature.getDescription(), 5, 23, getBounds().width -10, 0xFFBFBFBF);
+ }
+
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ this.setSize(new Dimension(parentWidth, getBounds().height));
+ }
+
+ @Override
+ public Dimension getPreferredSize() {
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ int descriptionHeight = fr.listFormattedStringToWidth(feature.getDescription(), Math.max(100, getBounds().width - 10)).size() * fr.FONT_HEIGHT;
+
+ return new Dimension(100, descriptionHeight + 28);
+ }
+
+ @Override
+ public void onBoundsUpdate() {
+ int x = getBounds().width - 5;
+ for (MPanel panel : addons) {
+ panel.setBounds(new Rectangle(x - panel.getPreferredSize().width, 3, panel.getPreferredSize().width, 12));
+ x -= panel.getPreferredSize().width + 5;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeatureEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeatureEdit.java
new file mode 100644
index 00000000..87e1b6f1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MFeatureEdit.java
@@ -0,0 +1,113 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MButton;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MList;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MModalConfirmation;
+
+import java.awt.*;
+import java.util.HashMap;
+import java.util.Map;
+
+public class MFeatureEdit extends MPanel {
+ private MList list;
+ private MButton goBack, resetToDefault;
+ private RootConfigPanel rootConfigPanel;
+ private AbstractFeature abstractFeature;
+
+ private Map parameterEdits = new HashMap<>();
+
+ public MFeatureEdit(AbstractFeature abstractFeature, RootConfigPanel rootConfigPanel) {
+ this.abstractFeature = abstractFeature;
+ this.rootConfigPanel = rootConfigPanel;
+ list = new MList();
+ list.setGap(5);
+ list.setDrawLine(false);
+ add(list);
+
+ goBack = new MButton();
+ goBack.setText("< Go Back");
+ goBack.setOnActionPerformed(rootConfigPanel::goBack);
+ add(goBack);
+ resetToDefault = new MButton();
+ resetToDefault.setText("Reset To Default");
+ resetToDefault.setForeground(Color.red);
+ resetToDefault.setOnActionPerformed(() -> {
+ openResetConfirmation();
+ });
+ add(resetToDefault);
+ }
+
+ public void openResetConfirmation() {
+ MModalConfirmation mModal = new MModalConfirmation("Are you sure?",
+ "Resetting to default will reset your configuration for the selected feature to default",
+ () -> {
+ for (FeatureParameter parameter : abstractFeature.getParameters()) {
+ parameter.setToDefault();
+ }
+ abstractFeature.onParameterReset();
+ rootConfigPanel.invalidatePage(abstractFeature.getEditRoute(rootConfigPanel));
+ }, () -> {});
+ mModal.setScale(getScale());
+ mModal.getYes().setBorder(0xFFFF0000);
+ mModal.getYes().setText("Yes, Reset it");
+ mModal.getNo().setText("Cancel");
+ mModal.open(MFeatureEdit.this);
+ }
+
+ public void addParameterEdit(String name, MPanel paramEdit) {
+ parameterEdits.put(name, paramEdit);
+ list.add(paramEdit);
+ }
+ public MPanel removeParameterEdit(String name) {
+ MPanel panel = parameterEdits.remove(name);
+ list.remove(panel);
+ return panel;
+ }
+
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ super.resize(parentWidth, parentHeight);
+ setBounds(new Rectangle(0,0,parentWidth,parentHeight));
+ Dimension prefSize = getPreferredSize();
+ int hei = prefSize.height;
+ setBounds(new Rectangle(0,0,parentWidth,hei));
+ }
+
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ goBack.setBounds(new Rectangle(5,5,75,15));
+ resetToDefault.setBounds(new Rectangle(bounds.width - 105, 5, 100, 15));
+
+ list.setBounds(new Rectangle(5,25,bounds.width - 10, bounds.height - 10));
+ list.realignChildren();
+
+ }
+
+ @Override
+ public Dimension getPreferredSize() {
+ Dimension listPref = list.getPreferredSize();
+ return new Dimension(listPref.width + 10, listPref.height + 30);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MNotFound.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MNotFound.java
new file mode 100644
index 00000000..b63c4e90
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MNotFound.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+
+import java.awt.*;
+
+public class MNotFound extends MPanel {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0,0,parentWidth,parentHeight));
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ fr.drawString("404 Not Found", (getBounds().width - fr.getStringWidth("404 Not Found")) / 2, (getBounds().height - fr.FONT_HEIGHT) / 2, -1);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MPanelCategory.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MPanelCategory.java
new file mode 100644
index 00000000..435940d3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MPanelCategory.java
@@ -0,0 +1,83 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MList;
+
+import java.awt.*;
+
+public class MPanelCategory extends MPanel {
+
+ private NestedCategory key;
+ private RootConfigPanel rootConfigPanel;
+
+ private MList list;
+
+ public MPanelCategory(NestedCategory nestedCategory, RootConfigPanel rootConfigPanel) {
+ this.key = nestedCategory;
+ this.rootConfigPanel = rootConfigPanel;
+
+ list = new MList();
+ list.setDrawLine(false);
+ list.setGap(5);
+ add(list);
+
+ for (NestedCategory value : nestedCategory.children().values()) {
+ list.add(new MCategory(value, rootConfigPanel));
+ }
+ if (nestedCategory.parent() != null) {
+ String actualCategory = nestedCategory.categoryFull().substring(5);
+ if (FeatureRegistry.getFeaturesByCategory().containsKey(actualCategory))
+ for (AbstractFeature abstractFeature : FeatureRegistry.getFeaturesByCategory().get(actualCategory)) {
+ MFeature mFeature = new MFeature(abstractFeature, rootConfigPanel);
+ list.add(mFeature);
+ mFeature.setHover(new Color(94, 94, 94, 255));
+ }
+ }
+ list.realignChildren();
+
+ }
+
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ super.resize(parentWidth, parentHeight);
+ setBounds(new Rectangle(0,0,parentWidth,parentHeight));
+ Dimension prefSize = getPreferredSize();
+ int hei = prefSize.height;
+ setBounds(new Rectangle(0,0,parentWidth,hei));
+ }
+
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ list.setBounds(new Rectangle(5,5,bounds.width- 10, bounds.height - 10));
+ list.realignChildren();
+ }
+
+ @Override
+ public Dimension getPreferredSize() {
+ Dimension prefSize = list.getPreferredSize();
+ int wid = prefSize.width + 10;
+ int hei = prefSize.height + 10;
+ return new Dimension(wid, hei);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MParameterEdit.java
new file mode 100644
index 00000000..e73e851b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/MParameterEdit.java
@@ -0,0 +1,219 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import kr.syeyoung.dungeonsguide.mod.config.types.AColor;
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureParameter;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+
+import java.awt.*;
+import java.util.function.Predicate;
+
+public class MParameterEdit extends MPanel {
+ private AbstractFeature abstractFeature;
+ private FeatureParameter featureParameter;
+ private RootConfigPanel rootConfigPanel;
+ private MPanel valueEditHolder;
+ private MPanel valueEdit;
+
+ private Predicate isDisabled ;
+
+ public MParameterEdit(AbstractFeature abstractFeature, FeatureParameter parameter, RootConfigPanel rootConfigPanel) {
+ this(abstractFeature, parameter, rootConfigPanel, (a) -> false);
+ }
+
+ public MParameterEdit(AbstractFeature abstractFeature, FeatureParameter parameter, RootConfigPanel rootConfigPanel, Predicate isDisabled ) {
+ this.abstractFeature = abstractFeature;
+ this.featureParameter = parameter;
+ this.rootConfigPanel = rootConfigPanel;
+ this.isDisabled = isDisabled;
+
+ if (parameter.getValue_type().equals("string")) {
+ valueEdit = new MTextField() {
+ @Override
+ public void edit(String str) {
+ parameter.setValue(str);
+ }
+ };
+ ((MTextField)valueEdit).setText((String) parameter.getValue());
+ } else if (parameter.getValue_type().equals("integer")) {
+ valueEdit = new MIntegerSelectionButton((Integer) parameter.getValue());
+ ((MIntegerSelectionButton)valueEdit).setOnUpdate(() -> {
+ parameter.setValue(((MIntegerSelectionButton) valueEdit).getData());
+ });
+ } else if (parameter.getValue_type().equals("float")) {
+ valueEdit = new MFloatSelectionButton((Float) parameter.getValue());
+ ((MFloatSelectionButton)valueEdit).setOnUpdate(() -> {
+ parameter.setValue(((MFloatSelectionButton) valueEdit).getData());
+ });
+ } else if (parameter.getValue_type().equals("acolor")) {
+ valueEdit = new MEditableAColor();
+ ((MEditableAColor)valueEdit).setColor((AColor) parameter.getValue());
+ ((MEditableAColor)valueEdit).setEnableEdit(true);
+ ((MEditableAColor)valueEdit).setOnUpdate(() -> {
+ parameter.setValue(((MEditableAColor) valueEdit).getColor());
+ });
+ } else if (parameter.getValue_type().equals("color")) {
+ valueEdit = new MEditableAColor();
+ ((MEditableAColor)valueEdit).setColor(new AColor(((Color) parameter.getValue()).getRGB(), true));
+ ((MEditableAColor)valueEdit).setEnableEdit(true);
+ ((MEditableAColor)valueEdit).setOnUpdate(() -> {
+ parameter.setValue(((MEditableAColor) valueEdit).getColor());
+ });
+ } else if (parameter.getValue_type().equals("boolean")) {
+ valueEdit = new MToggleButton();
+ ((MToggleButton)valueEdit).setEnabled((Boolean) parameter.getValue());
+ ((MToggleButton)valueEdit).setOnToggle(() -> {
+ parameter.setValue(((MToggleButton) valueEdit).isEnabled());
+ });
+ } else if (parameter.getValue_type().equals("keybind")) {
+ valueEdit = new MKeyEditButton();
+ ((MKeyEditButton)valueEdit).setKey((Integer) parameter.getValue());
+ ((MKeyEditButton)valueEdit).setOnKeyEdit(() -> {
+ parameter.setValue(((MKeyEditButton) valueEdit).getKey());
+ });
+ ((MKeyEditButton)valueEdit).setBorder(RenderUtils.blendTwoColors(0xFF141414,0x7702EE67));
+ }else {
+ valueEdit = new MLabel();
+ ((MLabel)valueEdit).setText("????");
+ }
+
+
+ valueEditHolder = new MPanel() {
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ Dimension dimension = valueEdit.getPreferredSize();
+ if (dimension.width <= 0) dimension.width = bounds.width/2;
+ if (dimension.height <= 0) dimension.height = bounds.height/2;
+ valueEdit.setBounds(new Rectangle((bounds.width - dimension.width)/2,(bounds.height - dimension.height)/2,dimension.width, dimension.height));
+ }
+ };
+ add(valueEditHolder);
+ valueEditHolder.add(valueEdit);
+ }
+ public MParameterEdit(AbstractFeature abstractFeature, FeatureParameter parameter, RootConfigPanel rootConfigPanel, MPanel valueEdit, Predicate isDisabled) {
+ this.abstractFeature = abstractFeature;
+ this.featureParameter = parameter;
+ this.rootConfigPanel = rootConfigPanel;
+ this.isDisabled = isDisabled;
+
+
+ valueEditHolder = new MPanel() {
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ Dimension dimension = valueEdit.getPreferredSize();
+ if (dimension.width <= 0) dimension.width = bounds.width/2;
+ if (dimension.height <= 0) dimension.height = bounds.height/2;
+ valueEdit.setBounds(new Rectangle((bounds.width - dimension.width)/2,(bounds.height - dimension.height)/2,dimension.width, dimension.height));
+ }
+ };
+ add(valueEditHolder);
+ valueEditHolder.add(valueEdit);
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+ Gui.drawRect(0,0,getBounds().width, getBounds().height, RenderUtils.blendAlpha(0x141414, 0.12f));
+ Gui.drawRect(2*bounds.width / 3,1,getBounds().width -1, getBounds().height-1, RenderUtils.blendAlpha(0x141414, 0.15f));
+ Gui.drawRect(4, 15,2*bounds.width / 3-5, 16, RenderUtils.blendAlpha(0x141414, 0.3f));
+
+
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ fr.drawString(featureParameter.getName(), 5,5, 0xFFFFFFFF);
+ fr.drawSplitString(featureParameter.getDescription(), 5,18, 2*bounds.width /3-10, 0xFFAAAAAA);
+
+ }
+
+ @Override
+ public void render0(double scale, Point parentPoint, Rectangle parentClip, int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks) {
+ super.render0(scale, parentPoint, parentClip, absMousex, absMousey, relMousex0, relMousey0, partialTicks);
+ if (isDisabled.test(featureParameter)) {
+ Gui.drawRect(0,0, getBounds().width, getBounds().height, 0x55000000);
+ }
+ }
+
+ @Override
+ public Dimension getPreferredSize() {
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ int descriptionHeight = fr.listFormattedStringToWidth(featureParameter.getDescription(), Math.max(50, 2*bounds.width/3-10)).size() * fr.FONT_HEIGHT;
+ return new Dimension(100, Math.max(30, descriptionHeight + 23));
+ }
+
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ valueEditHolder.setBounds(new Rectangle(2*bounds.width / 3, 0, bounds.width / 3, bounds.height));
+ }
+
+ @Override
+ public void keyPressed0(char typedChar, int keyCode) {
+ if (isDisabled.test(featureParameter)) return;
+ super.keyPressed0(typedChar, keyCode);
+ }
+
+ @Override
+ public void keyHeld0(char typedChar, int keyCode) {
+ if (isDisabled.test(featureParameter)) return;
+ super.keyHeld0(typedChar, keyCode);
+ }
+
+ @Override
+ public void keyReleased0(char typedChar, int keyCode) {
+ if (isDisabled.test(featureParameter)) return;
+ super.keyReleased0(typedChar, keyCode);
+ }
+
+ @Override
+ public boolean mouseClicked0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int mouseButton) {
+ if (isDisabled.test(featureParameter)) return false;
+ return super.mouseClicked0(absMouseX, absMouseY, relMouseX0, relMouseY0, mouseButton);
+ }
+
+ @Override
+ public void mouseReleased0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int state) {
+ if (isDisabled.test(featureParameter)) return ;
+ super.mouseReleased0(absMouseX, absMouseY, relMouseX0, relMouseY0, state);
+ }
+
+ @Override
+ public void mouseClickMove0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int clickedMouseButton, long timeSinceLastClick) {
+ if (isDisabled.test(featureParameter)) return ;
+ super.mouseClickMove0(absMouseX, absMouseY, relMouseX0, relMouseY0, clickedMouseButton, timeSinceLastClick);
+ }
+
+ @Override
+ public void mouseScrolled0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0, int scrollAmount) {
+ if (isDisabled.test(featureParameter)) return ;
+ super.mouseScrolled0(absMouseX, absMouseY, relMouseX0, relMouseY0, scrollAmount);
+ }
+
+ @Override
+ public void mouseMoved0(int absMouseX, int absMouseY, int relMouseX0, int relMouseY0) {
+ if (isDisabled.test(featureParameter)) return ;
+ super.mouseMoved0(absMouseX, absMouseY, relMouseX0, relMouseY0);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/NestedCategory.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/NestedCategory.java
new file mode 100644
index 00000000..28a3d4d1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/NestedCategory.java
@@ -0,0 +1,54 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+@Data
+@Accessors(chain = true, fluent = true)
+public
+class NestedCategory {
+ private final String categoryFull;
+ @EqualsAndHashCode.Exclude
+ private String categoryName;
+ @EqualsAndHashCode.Exclude
+ @ToString.Exclude
+ private NestedCategory parent;
+
+ public NestedCategory(String categoryFull) {
+ this.categoryFull = categoryFull;
+ this.categoryName = categoryFull.substring(categoryFull.lastIndexOf(".") + 1);
+ }
+
+ @EqualsAndHashCode.Exclude
+ @ToString.Exclude
+ private Map children = new LinkedHashMap<>();
+
+ public NestedCategory child(NestedCategory child) {
+ this.children.put(child.categoryName, child);
+ child.parent = this;
+ return this;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/RootConfigPanel.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/RootConfigPanel.java
new file mode 100644
index 00000000..d4d7dcf9
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/RootConfigPanel.java
@@ -0,0 +1,311 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig;
+
+import com.google.common.base.Function;
+import kr.syeyoung.dungeonsguide.auth.AuthManager;
+import kr.syeyoung.dungeonsguide.mod.config.guiconfig.location.GuiGuiLocationConfig;
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.Gui;
+
+import java.awt.*;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.*;
+
+public class RootConfigPanel extends MPanelScaledGUI {
+ private MScrollablePanel navigationScroll;
+
+ private MList navigation = new MList();
+
+ private MScrollablePanel contentScroll;
+
+
+ private final Map pages = new HashMap();
+ @Getter
+ @Setter
+ private Function pageGenerator = ConfigPanelCreator.INSTANCE;
+ @Getter
+ private String currentPage = "";
+
+ private GuiConfigV2 gui;
+
+ private long lastPageSet = System.currentTimeMillis();
+
+ private MTextField search;
+ private MButton guiRelocate;
+
+ private MButton github, discord;
+
+ private final Stack history = new Stack();
+
+ public String getSearchWord() {
+ return search.getText().trim().toLowerCase();
+ }
+
+ public RootConfigPanel(GuiConfigV2 guiConfigV2) {
+ this.gui = guiConfigV2;
+
+ search = new MTextField() {
+ @Override
+ public void edit(String str) {
+ setupNavigation();
+
+ setCurrentPageAndPushHistory("");
+ if (!categoryMap.containsKey(lastOpenCategory)) {
+ for (Map.Entry nestedCategoryMPanelEntry : categoryMap.entrySet()) {
+ if (nestedCategoryMPanelEntry.getValue() instanceof MCategoryElement) {
+ setCurrentPageAndPushHistory(nestedCategoryMPanelEntry.getKey().categoryFull());
+ lastOpenCategory = nestedCategoryMPanelEntry.getKey();
+ break;
+ }
+ }
+ }
+ for (Map.Entry nestedCategoryMPanelEntry : categoryMap.entrySet()) {
+ if (nestedCategoryMPanelEntry.getValue() instanceof MCollapsable) {
+ ((MCollapsable) nestedCategoryMPanelEntry.getValue()).setCollapsed(false);
+ }
+ }
+ rePlaceElements();
+ }
+ };
+ search.setPlaceHolder("Search...");
+ add(search);
+ guiRelocate = new MButton();
+ guiRelocate.setText("Edit Gui Locations");
+ guiRelocate.setOnActionPerformed(() -> {
+ Minecraft.getMinecraft().displayGuiScreen(new GuiGuiLocationConfig(gui, null));
+ guiRelocate.setIsclicked(false);
+ });
+ guiRelocate.setBorder(RenderUtils.blendTwoColors(0xFF141414,0x7702EE67));
+ add(guiRelocate);
+
+ discord = new MButton(); github = new MButton();
+ discord.setText("Discord"); github.setText("Github");
+ discord.setBorder(RenderUtils.blendTwoColors(0xFF141414,0x7702EE67));
+ github.setBorder(RenderUtils.blendTwoColors(0xFF141414,0x7702EE67));
+ github.setOnActionPerformed(() -> {
+ try {
+ Desktop.getDesktop().browse(new URI("https://github.com/Dungeons-Guide/Skyblock-Dungeons-Guide/"));
+ } catch (IOException | URISyntaxException e) {
+ e.printStackTrace();
+ }
+ });
+ discord.setOnActionPerformed(() -> {
+ try {
+ Desktop.getDesktop().browse(new URI("https://discord.gg/VuxayCWGE8"));
+ } catch (IOException | URISyntaxException e) {
+ e.printStackTrace();
+ }
+ });
+ add(discord); add(github);
+
+ navigationScroll = new MScrollablePanel(1);
+ navigationScroll.setHideScrollBarWhenNotNecessary(false);
+
+
+ add(navigationScroll);
+ navigationScroll.add(navigation);
+
+ contentScroll = new MScrollablePanel(3);
+ contentScroll.setHideScrollBarWhenNotNecessary(true);
+ add(contentScroll);
+
+ setupNavigation();
+ navigation.setGap(0);
+ navigation.setDrawLine(false);
+
+ setCurrentPageAndPushHistory("ROOT");
+ rePlaceElements();
+
+ search.setFocused(true);
+ }
+
+
+ private Map categoryMap = new HashMap<>();
+ private NestedCategory lastOpenCategory;
+ private void setupNavigation() {
+ categoryMap.clear();
+ for (MPanel childComponent : navigation.getChildComponents()) {
+ navigation.remove(childComponent);
+ }
+ NestedCategory root = new NestedCategory("ROOT");
+ Set categoryAllowed = new HashSet<>();
+ String search = this.search.getText().trim().toLowerCase();
+ for (AbstractFeature abstractFeature : FeatureRegistry.getFeatureList()) {
+ if (search.isEmpty()) {
+ categoryAllowed.add("ROOT."+abstractFeature.getCategory()+".");
+ } else if (abstractFeature.getName().toLowerCase().contains(search)) {
+ categoryAllowed.add("ROOT."+abstractFeature.getCategory()+".");
+ } else if (abstractFeature.getDescription().toLowerCase().contains(search)) {
+ categoryAllowed.add("ROOT."+abstractFeature.getCategory()+".");
+ }
+ }
+ for (AbstractFeature abstractFeature : FeatureRegistry.getFeatureList()) {
+ String category = abstractFeature.getCategory();
+ boolean test =false;
+ for (String s : categoryAllowed) {
+ if (s.startsWith("ROOT."+category+".")) {
+ test = true;
+ break;
+ }
+ }
+ if (!test) continue;
+
+ NestedCategory currentRoot = root;
+ for (String s : category.split("\\.")) {
+ NestedCategory finalCurrentRoot = currentRoot;
+ if (currentRoot.children().containsKey(s))
+ currentRoot = currentRoot.children().get(s);
+ else {
+ currentRoot.child(currentRoot = new NestedCategory(finalCurrentRoot.categoryFull()+"."+s));
+ }
+ }
+
+ }
+
+ for (NestedCategory value : root.children().values()) {
+ setupNavigationRecursive(value, navigation, 0, 17);
+ }
+ ConfigPanelCreator.map.put("ROOT", () -> new MPanelCategory(root, this));
+ }
+ private void setupNavigationRecursive(NestedCategory nestedCategory, MPanel parent, int depth, int offset) {
+ ConfigPanelCreator.map.put(nestedCategory.categoryFull(), () -> new MPanelCategory(nestedCategory, this));
+
+ if (nestedCategory.children().size() == 0) {
+ MCategoryElement current = new MCategoryElement(nestedCategory.categoryFull(),() -> {
+ setCurrentPageAndPushHistory(nestedCategory.categoryFull());
+ lastOpenCategory = nestedCategory;
+ }, 13 * depth + 17, offset, this);
+ parent.add(current);
+ categoryMap.put(nestedCategory, current);
+ } else {
+ MCategoryElement current = new MCategoryElement(nestedCategory.categoryFull(),() -> {
+ setCurrentPageAndPushHistory(nestedCategory.categoryFull());
+ lastOpenCategory = nestedCategory;
+ }, 3,offset, this);
+ MCollapsable mCollapsable = new MCollapsable(current, this::rePlaceElements);
+ mCollapsable.setLeftPad(offset-13);
+ mCollapsable.getLowerElements().setDrawLine(false);
+ mCollapsable.getLowerElements().setGap(0);
+ mCollapsable.setLeftPadElements(0);
+ parent.add(mCollapsable);
+ categoryMap.put(nestedCategory, mCollapsable);
+
+ for (NestedCategory value : nestedCategory.children().values()) {
+ setupNavigationRecursive(value, mCollapsable, depth+1, offset+13);
+ }
+ }
+ }
+
+
+ public void setCurrentPageAndPushHistory(String currentPage) {
+ if (!this.currentPage.equals(currentPage))
+ history.push(this.currentPage);
+ lastOpenCategory = null;
+ this.currentPage = currentPage;
+ setupPage();
+ }
+ public void goBack() {
+ if (history.size() == 0) return;
+ this.currentPage = history.pop();
+ setupPage();
+ }
+
+ private void setupPage() {
+ contentScroll.getContentArea().getChildComponents().forEach(contentScroll.getContentArea()::remove);
+ if (!pages.containsKey(currentPage)) {
+ MPanel page = pageGenerator.apply(currentPage);
+ if (page == null) page = new MNotFound();
+ pages.put(currentPage, page);
+ }
+ contentScroll.getContentArea().add(pages.get(currentPage));
+ rePlaceElements();
+ }
+
+ public void invalidatePage(String page) {
+ pages.remove(page);
+ if (page.equals(currentPage))
+ setupPage();
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) {
+ Dimension effectiveDim = getEffectiveDimension();
+ Gui.drawRect(0,0, (int) (effectiveDim.width), (int) (effectiveDim.height), RenderUtils.blendAlpha(0x141414, 0.00f));
+ Gui.drawRect(0,0, (int) (effectiveDim.width), 25, RenderUtils.blendAlpha(0x0, 0.20f));
+// Gui.drawRect(navigationScroll.getBounds().x + navigationScroll.getBounds().width - 10, 25, navigationScroll.getBounds().x + navigationScroll.getBounds().width , 50, RenderUtils.blendAlpha(0xFF141414, 0.04f));
+ Gui.drawRect(0, 25,navigationScroll.getBounds().x + navigationScroll.getBounds().width , 50, RenderUtils.blendAlpha(0xFF141414, 0.08f));
+
+
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+
+ if(AuthManager.getInstance().getToken() == null) {
+ fr.drawString("ERROR CONNECTING TO DG, YOUR COSMETICS ARE NOT VISIBLE",(effectiveDim.width - fr.getStringWidth("ERROR CONNECTING TO DG, YOUR COSMETICS ARE NOT VISIBLE"))/2, (10 - fr.FONT_HEIGHT)/2, 0xFFFF0000);
+ }
+
+ fr.drawString("DungeonsGuide By syeyoung", (effectiveDim.width - fr.getStringWidth("DungeonsGuide By syeyoung"))/2, (25 - fr.FONT_HEIGHT)/2, 0xFF02EE67);
+ }
+
+ @Override
+ public void render0(double parentScale, Point parentPoint, Rectangle parentClip, int absMousex0, int absMousey0, int relMousex0, int relMousey0, float partialTicks) {
+ super.render0(parentScale, parentPoint, parentClip, absMousex0, absMousey0, relMousex0, relMousey0, partialTicks);
+ Dimension effectiveDim = getEffectiveDimension();
+ Gui.drawRect(0,24, (int) (Double.min(1, (System.currentTimeMillis() - lastPageSet)/1000.0) * effectiveDim.width), 25, 0xFF02EE67);
+ }
+
+ @Override
+ public void setBounds(Rectangle bounds) {
+ super.setBounds(bounds);
+ rePlaceElements();
+ }
+
+ @Override
+ public void setScale(double scale) {
+ super.setScale(scale);
+ rePlaceElements();
+ }
+
+ private void rePlaceElements() {
+ Dimension effectiveDim = getEffectiveDimension();
+
+ navigation.setBounds(new Rectangle(new Point(0,1), new Dimension(Math.max(100, Math.max(navigation.getPreferredSize().width, navigationScroll.getBounds().width-10)), navigation.getPreferredSize().height)));
+ navigation.realignChildren();
+
+ navigationScroll.evalulateContentArea();
+ Rectangle navBound;
+ navigationScroll.setBounds(navBound = new Rectangle(0,50, navigation.getBounds().width+10, effectiveDim.height-50));
+ contentScroll.setBounds(new Rectangle(navBound.x + navBound.width, 25, effectiveDim.width - navBound.x - navBound.width, effectiveDim.height-25));
+
+ search.setBounds(new Rectangle(5,30,navBound.x + navBound.width - 10,15));
+
+ guiRelocate.setBounds(new Rectangle(5,5,100,15));
+ github.setBounds(new Rectangle(effectiveDim.width - 80,5,75,15));
+ discord.setBounds(new Rectangle(effectiveDim.width - 160,5,75,15));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/GuiGuiLocationConfig.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/GuiGuiLocationConfig.java
new file mode 100755
index 00000000..0b4193da
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/GuiGuiLocationConfig.java
@@ -0,0 +1,166 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig.location;
+
+import kr.syeyoung.dungeonsguide.mod.features.AbstractFeature;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.features.GuiFeature;
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.FontRenderer;
+import net.minecraft.client.gui.GuiScreen;
+import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.util.Vec3;
+import org.lwjgl.opengl.GL11;
+
+import java.awt.*;
+import java.io.IOException;
+import java.util.*;
+import java.util.List;
+
+public class GuiGuiLocationConfig extends MGui {
+
+ @Getter
+ private final GuiScreen before;
+
+ @Getter
+ private TreeMap> markerTreeMapByX = new TreeMap<>();
+ @Getter
+ private TreeMap> markerTreeMapByY = new TreeMap<>();
+ @Getter
+ private Set markerSet = new HashSet<>();
+
+
+ Marker[] markers = new Marker[4];
+
+
+ public GuiGuiLocationConfig(final GuiScreen before, AbstractFeature featureWhitelist) {
+ this.before = before;
+ for (AbstractFeature feature : FeatureRegistry.getFeatureList()) {
+ if (feature instanceof GuiFeature && feature.isEnabled()) {
+ getMainPanel().add(new PanelDelegate((GuiFeature) feature, featureWhitelist == null || feature == featureWhitelist, this));
+ }
+ }
+
+ getMainPanel().setBackgroundColor(new Color(0,0,0, 100));
+ }
+
+ public static final Vec3[] facing = new Vec3[] {
+ new Vec3(0, 0.5, 2),
+ new Vec3(0.5, 0, 1),
+ new Vec3(0.5, 1, 3),
+ new Vec3(1, 0.5, 4),
+ };
+
+ public void removeAndAddMarker(Marker prev, Marker newM) {
+ if (prev != null) {
+ markerTreeMapByX.computeIfPresent(prev.getX(),(k,v) -> {
+ v.remove(prev);
+ if (v.isEmpty()) return null;
+ else return v;
+ });
+ markerTreeMapByY.computeIfPresent(prev.getY(),(k,v) -> {
+ v.remove(prev);
+ if (v.isEmpty()) return null;
+ else return v;
+ });
+ markerSet.remove(prev);
+ }
+ if (newM != null) {
+ markerTreeMapByX.compute(newM.getX(), (k,v) -> {
+ if (v == null) {
+ return new ArrayList<>(Arrays.asList(newM));
+ } else {
+ v.add(newM);
+ return v;
+ }
+ });
+ markerTreeMapByY.compute(newM.getY(), (k,v) -> {
+ if (v == null) {
+ return new ArrayList<>(Arrays.asList(newM));
+ } else {
+ v.add(newM);
+ return v;
+ }
+ });
+ markerSet.add(newM);
+ }
+ }
+
+ public void setupMarkers() {
+ for (int i1 = 0; i1 < markers.length; i1++) {
+ Marker orig = markers[i1];
+ Vec3 pt = facing[i1];
+ markers[i1] = new Marker((int) (pt.xCoord * getMainPanel().getBounds().width), (int) (pt.yCoord * getMainPanel().getBounds().height), (int) pt.zCoord, this);
+
+ removeAndAddMarker(orig, markers[i1]);
+ }
+ }
+
+ @Override
+ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
+ GlStateManager.pushMatrix();
+ ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
+ GlStateManager.translate(scaledResolution.getScaledWidth()/2, scaledResolution.getScaledHeight()/2, 0);
+ FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
+ GlStateManager.enableBlend();
+ GlStateManager.enableAlpha();
+ GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
+ GlStateManager.color(1, 1, 1, 1);
+ fr.drawString("Right Click On Elements to Open Popup Menu",
+ -fr.getStringWidth("Right Click On Elements to Open Popup Menu")/2
+ ,-fr.FONT_HEIGHT/2, -1);
+ GlStateManager.popMatrix();
+ super.drawScreen(mouseX, mouseY, partialTicks);
+ }
+
+ @Override
+ public void keyTyped(char typedChar, int keyCode) throws IOException {
+ try {
+ getMainPanel().keyPressed0(typedChar, keyCode);
+
+ if (keyCode == 1) {
+ Minecraft.getMinecraft().displayGuiScreen(before);
+ }
+ } catch (Throwable e) {
+ if (!e.getMessage().contains("hack to stop"))
+ e.printStackTrace();
+ }
+ }
+
+ @Override
+ public void initGui() {
+ super.initGui();
+ getMainPanel().setBounds(new Rectangle(0,0,Minecraft.getMinecraft().displayWidth,Minecraft.getMinecraft().displayHeight));
+ markerTreeMapByX.clear();
+ markerTreeMapByY.clear();
+ markerSet.clear();
+ setupMarkers();
+ for (MPanel childComponent : getMainPanel().getChildComponents()) {
+ if (childComponent instanceof PanelDelegate) {
+ ((PanelDelegate) childComponent).rebuildMarker();
+ }
+ }
+
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/Marker.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/Marker.java
new file mode 100644
index 00000000..10683425
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/Marker.java
@@ -0,0 +1,45 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig.location;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.ToString;
+
+@Getter
+@ToString
+@AllArgsConstructor
+public class Marker {
+ private final int x;
+ private final int y;
+ /**
+ * 0xABCDEFGH
+ * A: ?
+ * B: ?
+ * C: ?
+ * D: ?
+ * EF: 0~3 (TC 0x00 CL 0x01 BC 0x10 CR 0x11)
+ */
+ private final int type;
+ private final Object parent;
+
+ public int distanceSQ(Marker m2) {
+ return (m2.x - x)*(m2.x - x) + (m2.y - y)*(m2.y - y);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/PanelDelegate.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/PanelDelegate.java
new file mode 100644
index 00000000..3c03fb73
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/guiconfig/location/PanelDelegate.java
@@ -0,0 +1,403 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.guiconfig.location;
+
+import kr.syeyoung.dungeonsguide.mod.config.types.GUIRectangle;
+import kr.syeyoung.dungeonsguide.mod.features.GuiFeature;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MPopupMenu;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MTooltip;
+import kr.syeyoung.dungeonsguide.mod.utils.cursor.EnumCursor;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.Gui;
+import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.WorldRenderer;
+import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.Tuple;
+import net.minecraft.util.Vec3;
+import org.lwjgl.opengl.GL11;
+
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+
+public class PanelDelegate extends MPanel {
+ private final GuiFeature guiFeature;
+ private boolean draggable = false;
+ private GuiGuiLocationConfig guiGuiLocationConfig;
+
+ private Set markerSet = new HashSet<>();
+ public PanelDelegate(GuiFeature guiFeature, boolean draggable, GuiGuiLocationConfig guiGuiLocationConfig) {
+ this.guiFeature = guiFeature;
+ this.draggable = draggable;
+ this.guiGuiLocationConfig = guiGuiLocationConfig;
+ }
+
+ public void rebuildMarker() {
+ internallyThinking = guiFeature.getFeatureRect().getRectangleNoScale();
+ applyConstraint();
+ }
+
+ @Override
+ public Rectangle getBounds() {
+ Rectangle rectangle = guiFeature.getFeatureRect().getRectangle();
+ return new Rectangle(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
+ }
+
+ @Override
+ public void render(int absMousex, int absMousey, int relMouseX, int relMouseY, float partialTicks, Rectangle scissor) {
+ if (!guiFeature.isEnabled()) return;
+
+ GlStateManager.pushMatrix();
+ guiFeature.drawDemo(partialTicks);
+ GlStateManager.popMatrix();
+ if (!draggable) return;
+ Gui.drawRect(0,0, 4, 4, 0xFFBBBBBB);
+ Gui.drawRect(0, getBounds().height - 4, 4, getBounds().height, 0xFFBBBBBB);
+ Gui.drawRect(getBounds().width - 4,0, getBounds().width, 4, 0xFFBBBBBB);
+ Gui.drawRect(getBounds().width - 4,getBounds().height - 4, getBounds().width, getBounds().height, 0xFFBBBBBB);
+ if (lastAbsClip.contains(absMousex, absMousey)) {
+ if (relMouseX < 4 && relMouseY < 4) {
+ Gui.drawRect(0,0, 4, 4, 0x55FFFFFF);
+ } else if (relMouseX < 4 && relMouseY > getBounds().height - 4) {
+ Gui.drawRect(0, getBounds().height - 4, 4, getBounds().height, 0x55FFFFFF);
+ } else if (relMouseX > getBounds().width - 4 && relMouseY > getBounds().height - 4) {
+ Gui.drawRect(getBounds().width - 4,getBounds().height - 4, getBounds().width, getBounds().height, 0x55FFFFFF);
+ } else if (relMouseX > getBounds().width - 4 && relMouseY < 4) {
+ Gui.drawRect(getBounds().width - 4,0, getBounds().width, 4, 0x55FFFFFF);
+ } else if (selectedPart == -2){
+ Gui.drawRect(0,0, getBounds().width, getBounds().height, 0x55FFFFFF);
+ }
+ }
+ GlStateManager.enableBlend();
+ }
+
+ @Override
+ public void render0(double scale, Point parentPoint, Rectangle parentClip, int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks) {
+ GlStateManager.pushMatrix();
+ super.render0(scale, parentPoint, parentClip, absMousex, absMousey, relMousex0, relMousey0, partialTicks);
+ GlStateManager.popMatrix();
+
+ if (snapped != null && selectedPart != -2) {
+ Tessellator tessellator = Tessellator.getInstance();
+ GlStateManager.disableTexture2D();
+ WorldRenderer worldRenderer = tessellator.getWorldRenderer();
+ worldRenderer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION_COLOR);
+ GL11.glLineWidth(1);
+ for (Tuple markerAxisTuple : snapped) {
+ if (markerAxisTuple.getSecond() == EnumFacing.Axis.X) {
+ worldRenderer.pos(markerAxisTuple.getFirst()[0].getX(), 0, 0).color(0,255,0,255).endVertex();
+ worldRenderer.pos(markerAxisTuple.getFirst()[0].getX(), Minecraft.getMinecraft().displayHeight, 0).color(0,255,0,255).endVertex();
+ } else {
+ worldRenderer.pos(0, markerAxisTuple.getFirst()[0].getY(), 0).color(0,255,0,255).endVertex();
+ worldRenderer.pos(Minecraft.getMinecraft().displayWidth, markerAxisTuple.getFirst()[0].getY(), 0).color(0,255,0,255).endVertex();
+ }
+ }
+ tessellator.draw();
+ for (Marker marker : guiGuiLocationConfig.getMarkerSet()) {
+ Gui.drawRect(marker.getX(),marker.getY(), marker.getX()+1, marker.getY()+1, 0xFFFF0000);
+ }
+ }
+ }
+
+ private int selectedPart = -2;
+
+ private int lastX = 0;
+ private int lastY = 0;
+
+ private Rectangle internallyThinking;
+ private Rectangle constraintApplied;
+
+ private Set> snapped = new HashSet<>();
+
+ public void applyConstraint() {
+ constraintApplied = internallyThinking.getBounds();
+
+ // SNAP Moving Point.
+ snapped.clear();
+ int scailingThreshold = 5;
+ if (selectedPart == 0){
+ Point snapPt = new Point(constraintApplied.x +constraintApplied.width, constraintApplied.y + constraintApplied.height);
+ Optional snapX, snapY;
+ SortedMap> markerSortedMap = guiGuiLocationConfig.getMarkerTreeMapByX().subMap(snapPt.x-scailingThreshold, snapPt.x +scailingThreshold);
+ snapX = markerSortedMap.values().stream()
+ .filter(Objects::nonNull)
+ .flatMap(Collection::stream)
+ .filter(a -> a.getParent() != this)
+ .min(Comparator.comparingInt(a -> (int) snapPt.distanceSq(a.getX(), a.getY())));
+ markerSortedMap = guiGuiLocationConfig.getMarkerTreeMapByY().subMap(snapPt.y-scailingThreshold, snapPt.y +scailingThreshold);
+ snapY = markerSortedMap.values().stream()
+ .filter(Objects::nonNull)
+ .flatMap(Collection::stream)
+ .filter(a -> a.getParent() != this)
+ .min(Comparator.comparingInt(a -> (int) snapPt.distanceSq(a.getX(), a.getY())));
+ snapX.ifPresent(a -> {
+ snapPt.x = a.getX();
+ });
+ snapY.ifPresent(a -> {
+ snapPt.y = a.getY();
+ });
+
+ constraintApplied = new Rectangle(constraintApplied.x, constraintApplied.y, snapPt.x - constraintApplied.x, snapPt.y - constraintApplied.y);
+
+
+
+ int minWidth;
+ int minHeight;
+ if (guiFeature.isKeepRatio()) {
+ if (guiFeature.getDefaultRatio() >= 1) {
+ minHeight = constraintApplied.height < 0 ? -8 : 8;
+ minWidth = (int) (guiFeature.getDefaultRatio() * minHeight);
+ } else {
+ minWidth = constraintApplied.width < 0 ? -8 : 8;
+ minHeight = (int) (minWidth / guiFeature.getDefaultRatio());
+ }
+ } else {
+ minWidth = constraintApplied.width < 0 ? -8 : 8;
+ minHeight = constraintApplied.height < 0 ? -8 : 8;
+ }
+
+
+ constraintApplied.width = Math.abs(constraintApplied.width) > Math.abs(minWidth) ? constraintApplied.width :
+ Math.abs(internallyThinking.width) > Math.abs(minWidth) ? internallyThinking.width : minWidth;
+ constraintApplied.height = Math.abs(constraintApplied.height) > Math.abs(minHeight) ? constraintApplied.height :
+ Math.abs(internallyThinking.height) > Math.abs(minHeight) ? internallyThinking.height : minHeight;
+
+ if (guiFeature.isKeepRatio()) {
+ double ratio = guiFeature.getDefaultRatio();
+
+ int heightWhenWidthFix = (int) Math.abs(constraintApplied.width / ratio);
+ int widthWhenHeightFix = (int) Math.abs(ratio * constraintApplied.height);
+ if (Math.abs(heightWhenWidthFix) <= Math.abs(constraintApplied.height)) {
+ constraintApplied.height = constraintApplied.height < 0 ? -heightWhenWidthFix : heightWhenWidthFix;
+ } else if (Math.abs(widthWhenHeightFix) <= Math.abs(constraintApplied.width)) {
+ constraintApplied.width =constraintApplied.width < 0 ? - widthWhenHeightFix : widthWhenHeightFix;
+ }
+ }
+
+
+ snapX.ifPresent(a -> {
+ if (snapPt.x - constraintApplied.x == constraintApplied.width) {
+ Marker m = new Marker((int) (GuiGuiLocationConfig.facing[3].xCoord * constraintApplied.width) + constraintApplied.x, (int) (GuiGuiLocationConfig.facing[3].yCoord * constraintApplied.height) + constraintApplied.y, (int) GuiGuiLocationConfig.facing[3].zCoord, this);
+ snapped.add(new Tuple<>(new Marker[]{a, m}, EnumFacing.Axis.X));
+ }
+ });
+ snapY.ifPresent(a -> {
+ if (snapPt.y - constraintApplied.y == constraintApplied.height) {
+ Marker m = new Marker((int) (GuiGuiLocationConfig.facing[2].xCoord * constraintApplied.width) + constraintApplied.x, (int) (GuiGuiLocationConfig.facing[2].yCoord * constraintApplied.height) + constraintApplied.y, (int) GuiGuiLocationConfig.facing[2].zCoord, this);
+ snapped.add(new Tuple<>(new Marker[]{a, m}, EnumFacing.Axis.Y));
+ }
+ });
+
+ if (constraintApplied.height < 0) {
+ constraintApplied.height = -constraintApplied.height;
+ constraintApplied.y -= constraintApplied.height;
+ }
+
+ if (constraintApplied.width < 0) {
+ constraintApplied.width = -constraintApplied.width;
+ constraintApplied.x -= constraintApplied.width;
+ }
+ } else if (selectedPart == -1) {
+ for (int i : Arrays.asList(0,3,1,2)) {
+ Vec3 pt = GuiGuiLocationConfig.facing[i];
+ Marker m = new Marker((int) (pt.xCoord * constraintApplied.width) + constraintApplied.x, (int) (pt.yCoord * constraintApplied.height) + constraintApplied.y, (int) pt.zCoord, this);
+ Optional result = guiGuiLocationConfig.getMarkerTreeMapByX().subMap(m.getX()-scailingThreshold, m.getX() +scailingThreshold).values().stream()
+ .filter(Objects::nonNull)
+ .flatMap(Collection::stream)
+ .filter(a -> a.getParent() != this)
+ .filter(a -> Math.abs(a.getX() - m.getX()) < scailingThreshold)
+ .filter(a -> ((a.getX() - pt.xCoord * constraintApplied.width) >= 0
+ && (a.getX() - pt.xCoord * constraintApplied.width + constraintApplied.width) <= Minecraft.getMinecraft().displayWidth))
+ .min(Comparator.comparingInt(a -> a.distanceSQ(m)));
+ if (result.isPresent()) {
+ int x = result.get().getX();
+ constraintApplied.x = (int) (x - pt.xCoord * constraintApplied.width);
+
+ snapped.add(new Tuple<>(new Marker[] {result.get(), m}, EnumFacing.Axis.X));
+ break;
+ }
+ }
+ for (int i : Arrays.asList(1,2,0,3)) {
+ Vec3 pt = GuiGuiLocationConfig.facing[i];
+ Marker m = new Marker((int) (pt.xCoord * constraintApplied.width) + constraintApplied.x, (int) (pt.yCoord * constraintApplied.height) + constraintApplied.y, (int) pt.zCoord, this);
+ Optional result = guiGuiLocationConfig.getMarkerTreeMapByY().subMap(m.getY()-scailingThreshold, m.getY() +scailingThreshold).values().stream()
+ .filter(Objects::nonNull)
+ .flatMap(Collection::stream)
+ .filter(a -> a.getParent() != this)
+ .filter(a -> Math.abs(a.getY() - m.getY()) < scailingThreshold)
+ .filter(a -> ((a.getY() - pt.yCoord * constraintApplied.height) >= 0
+ && (a.getY() - pt.yCoord * constraintApplied.height+ constraintApplied.height) <= Minecraft.getMinecraft().displayHeight))
+ .min(Comparator.comparingInt(a -> a.distanceSQ(m)));
+ if (result.isPresent()) {
+ int y = result.get().getY();
+ constraintApplied.y = (int) (y - pt.yCoord * constraintApplied.height);
+ snapped.add(new Tuple<>(new Marker[] {result.get(), m}, EnumFacing.Axis.Y));
+ break;
+ }
+ }
+ }
+
+ if (constraintApplied.x < 0) constraintApplied.x = 0;
+ if (constraintApplied.y < 0) constraintApplied.y = 0;
+ if (constraintApplied.x + constraintApplied.width + 1 >=Minecraft.getMinecraft().displayWidth) constraintApplied.x = Minecraft.getMinecraft().displayWidth - constraintApplied.width - 1;
+ if (constraintApplied.y + constraintApplied.height + 1>= Minecraft.getMinecraft().displayHeight) constraintApplied.y = Minecraft.getMinecraft().displayHeight - constraintApplied.height - 1;
+
+
+ setupMarkers();
+ }
+
+ Marker[] markers = new Marker[4];
+ public void setupMarkers() {
+ for (int i1 = 0; i1 < markers.length; i1++) {
+ Marker orig = markers[i1];
+
+ Vec3 pt = GuiGuiLocationConfig.facing[i1];
+ markers[i1] = new Marker((int) (pt.xCoord * constraintApplied.width) + constraintApplied.x, (int) (pt.yCoord * constraintApplied.height) + constraintApplied.y, (int) pt.zCoord, this);
+
+ guiGuiLocationConfig.removeAndAddMarker(orig, markers[i1]);
+ }
+ }
+
+ MTooltip mTooltip;
+
+ @Override
+ public void mouseClicked(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int mouseButton) {
+ if (!draggable) return;
+ if (!guiFeature.isEnabled()) return;
+ if (getTooltipsOpen() > 0) return;
+ if (!lastAbsClip.contains(absMouseX, absMouseY)) return;
+ if (mouseButton == 0) {
+ internallyThinking = guiFeature.getFeatureRect().getRectangleNoScale();
+ if (relMouseX < 4 && relMouseY < 4) { // TL
+ selectedPart = 0;
+ internallyThinking.y += internallyThinking.height;
+ internallyThinking.height = -internallyThinking.height;
+ internallyThinking.x += internallyThinking.width;
+ internallyThinking.width = -internallyThinking.width;
+ } else if (relMouseX < 4 && relMouseY > getBounds().height - 4) { // BL
+ selectedPart = 0;
+ internallyThinking.x += internallyThinking.width;
+ internallyThinking.width = -internallyThinking.width;
+ } else if (relMouseX > getBounds().width - 4 && relMouseY > getBounds().height - 4) { // BR
+ selectedPart = 0;
+ } else if (relMouseX > getBounds().width - 4 && relMouseY < 4) { // TR
+ selectedPart = 0;
+ internallyThinking.y += internallyThinking.height;
+ internallyThinking.height = -internallyThinking.height;
+ } else {
+ selectedPart = -1;
+ }
+ lastX = absMouseX;
+ lastY = absMouseY;
+ applyConstraint();
+
+ } else if (getTooltipsOpen() == 0){
+ if (mTooltip != null) mTooltip.close();
+ mTooltip = new MPopupMenu(absMouseX, absMouseY, guiFeature.getTooltipForEditor(guiGuiLocationConfig));
+ mTooltip.setScale(2.0f);
+ mTooltip.open(this);
+ }
+ throw new IllegalArgumentException("bruh, a hack to stop event progress");
+ }
+
+ @Override
+ public void mouseReleased(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int state) {
+ if (!draggable) return;
+ if (!guiFeature.isEnabled()) return;
+ if (selectedPart >= -1) {
+ guiFeature.setFeatureRect(new GUIRectangle(constraintApplied));
+ }
+
+ selectedPart = -2;
+ }
+
+ @Override
+ public void mouseClickMove(int absMouseX, int absMouseY, int relMouseX, int relMouseY, int clickedMouseButton, long timeSinceLastClick) {
+ if (!draggable) return;
+ if (!guiFeature.isEnabled()) return;
+ int dx = (absMouseX - lastX);
+ int dy = (absMouseY - lastY);
+ if (selectedPart >= 0) {
+ Rectangle rectangle = internallyThinking;
+
+ int prevWidth = rectangle.width;
+ int prevHeight= rectangle.height;
+
+ rectangle.width = prevWidth + dx;
+ rectangle.height = prevHeight + dy;
+
+ if (rectangle.height * prevHeight <= 0 && prevHeight != rectangle.height) {
+ rectangle.height += prevHeight < 0 ? 4 : -4;
+ }
+ if (rectangle.width * prevWidth <= 0 && prevWidth != rectangle.width) {
+ rectangle.width += prevWidth < 0 ? 4 : -4;
+ }
+
+
+ applyConstraint();
+ guiFeature.setFeatureRect(new GUIRectangle(constraintApplied));
+ lastX = absMouseX;
+ lastY = absMouseY;
+ throw new IllegalArgumentException("bruh, a hack to stop event progress");
+ } else if (selectedPart == -1){
+ Rectangle rectangle = internallyThinking;
+ rectangle.translate(dx, dy);
+ applyConstraint();
+ guiFeature.setFeatureRect(new GUIRectangle(constraintApplied));
+ lastX = absMouseX;
+ lastY = absMouseY;
+ }
+ }
+
+ @Override
+ public void mouseMoved(int absMouseX, int absMouseY, int relMouseX, int relMouseY) {
+ if (!draggable) return;
+ if (!guiFeature.isEnabled()) return;
+ if (getTooltipsOpen() > 0) return;
+
+ if (selectedPart == -1) {
+ setCursor(EnumCursor.CLOSED_HAND);
+ } else if (selectedPart >= 0) {
+ if (internallyThinking.width < 0 && internallyThinking.height < 0) {
+ setCursor(EnumCursor.RESIZE_TL);
+ } else if (internallyThinking.width < 0 && internallyThinking.height >= 0) {
+ setCursor(EnumCursor.RESIZE_DL);
+ } else if (internallyThinking.width >= 0 && internallyThinking.height >= 0) {
+ setCursor(EnumCursor.RESIZE_DR);
+ } else if (internallyThinking.width >= 0 && internallyThinking.height < 0) {
+ setCursor(EnumCursor.RESIZE_TR);
+ }
+ } else if (lastAbsClip.contains(absMouseX, absMouseY)) {
+ if (relMouseX < 4 && relMouseY < 4) {
+ setCursor(EnumCursor.RESIZE_TL);
+ } else if (relMouseX < 4 && relMouseY > getBounds().height - 4) {
+ setCursor(EnumCursor.RESIZE_DL);
+ } else if (relMouseX > getBounds().width - 4 && relMouseY > getBounds().height - 4) {
+ setCursor(EnumCursor.RESIZE_DR);
+ } else if (relMouseX > getBounds().width - 4 && relMouseY < 4) {
+ setCursor(EnumCursor.RESIZE_TR);
+ } else {
+ setCursor(EnumCursor.OPEN_HAND);
+ }
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/AColor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/AColor.java
new file mode 100644
index 00000000..3b5f3d36
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/AColor.java
@@ -0,0 +1,63 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.awt.*;
+
+@Getter
+@Setter
+public class AColor extends Color {
+ private boolean chroma;
+ private float chromaSpeed;
+
+ public AColor(int r, int g, int b, int a) {
+ super(r, g, b, a);
+ }
+
+ public AColor(int rgba, boolean hasalpha) {
+ super(rgba, hasalpha);
+ }
+
+ public AColor(AColor clone) {
+ super(clone.getRGB(), true);
+ chroma = clone.isChroma();
+ chromaSpeed = clone.getChromaSpeed();
+ }
+
+ public AColor multiplyAlpha(double multiplier) {
+ AColor aColor = new AColor(getRed(), getGreen(), getBlue(), (int) (getAlpha() * multiplier));
+ aColor.chroma = this.chroma;
+ aColor.chromaSpeed = this.chromaSpeed;
+ return aColor;
+ }
+
+ @Override
+ public String toString() {
+ return "AColor{" +
+ ", r="+getRed()+
+ ", g="+getGreen()+
+ ", b="+getBlue()+
+ ", a="+getAlpha()+
+ ", chromaSpeed=" + chromaSpeed +
+ '}';
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/GUIRectangle.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/GUIRectangle.java
new file mode 100644
index 00000000..cf43fbfb
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/GUIRectangle.java
@@ -0,0 +1,81 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import net.minecraft.client.Minecraft;
+
+import java.awt.*;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class GUIRectangle {
+ public GUIRectangle(Rectangle rectangle) {
+ if (rectangle.x < Minecraft.getMinecraft().displayWidth / 2) {
+ this.x = rectangle.x;
+ this.width = rectangle.width;
+ } else {
+ this.x = rectangle.x + rectangle.width - Minecraft.getMinecraft().displayWidth;
+ this.width = -rectangle.width;
+ }
+
+ if (rectangle.y < Minecraft.getMinecraft().displayHeight / 2) {
+ this.y = rectangle.y;
+ this.height = rectangle.height;
+ } else {
+ this.y = rectangle.y +rectangle.height - Minecraft.getMinecraft().displayHeight;
+ this.height = -rectangle.height;
+ }
+ }
+
+ private int x;
+ private int y;
+ private int width;
+ private int height;
+
+ public Rectangle getRectangle() {
+ return getRectangleNoScale();
+ }
+// public Rectangle getRectangle(ScaledResolution scaledResolution) {
+// double realX = (int) (x < 0 ? scaledResolution.getScaledWidth() + x : x);
+// double realY = (int) (y < 0 ? scaledResolution.getScaledHeight() + y : y);
+//
+// return new Rectangle((int)Math.min(realX + width, realX), (int)Math.min(realY + height, realY),
+// (int)Math.abs(width), (int)Math.abs(height));
+// }
+ public Rectangle getRectangleNoScale() {
+ int x = this.x, y = this.y;
+ if (Math.abs(x) > Minecraft.getMinecraft().displayWidth / 2) {
+ x = x < 0 ? -Minecraft.getMinecraft().displayWidth/2 : Minecraft.getMinecraft().displayWidth/2;
+ }
+ if (Math.abs(y) > Minecraft.getMinecraft().displayHeight / 2) {
+ y = y < 0 ? -Minecraft.getMinecraft().displayHeight/2 : Minecraft.getMinecraft().displayHeight/2;
+ }
+
+
+ double realX = (int) (x < 0 ? Minecraft.getMinecraft().displayWidth + x : x);
+ double realY = (int) (y < 0 ? Minecraft.getMinecraft().displayHeight + y : y);
+
+ return new Rectangle((int)Math.min(realX + width, realX), (int)Math.min(realY + height, realY),
+ (int)Math.abs(width), (int)Math.abs(height));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCAColor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCAColor.java
new file mode 100644
index 00000000..dfc2d461
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCAColor.java
@@ -0,0 +1,51 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+
+public class TCAColor implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "acolor";
+ }
+
+ @Override
+ public AColor deserialize(JsonElement element) {
+ if (element instanceof JsonPrimitive)
+ return new AColor(element.getAsInt(), true);
+
+ JsonObject object = element.getAsJsonObject();
+ AColor color = new AColor(object.get("color").getAsInt(), true);
+ color.setChroma(object.get("chroma").getAsBoolean());
+ color.setChromaSpeed(object.get("chromaSpeed").getAsFloat());
+ return color;
+ }
+
+ @Override
+ public JsonElement serialize(AColor element) {
+ JsonObject object = new JsonObject();
+ object.addProperty("color", element.getRGB());
+ object.addProperty("chroma", element.isChroma());
+ object.addProperty("chromaSpeed", element.getChromaSpeed());
+ return object;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCBoolean.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCBoolean.java
new file mode 100644
index 00000000..f973f495
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCBoolean.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+public class TCBoolean implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "boolean";
+ }
+
+ @Override
+ public Boolean deserialize(JsonElement element) {
+ return element.getAsBoolean();
+ }
+
+ @Override
+ public JsonElement serialize(Boolean element) {
+ return new JsonPrimitive(element);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCColor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCColor.java
new file mode 100644
index 00000000..2544a4f3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCColor.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+import java.awt.*;
+
+public class TCColor implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "color";
+ }
+
+ @Override
+ public Color deserialize(JsonElement element) {
+ return new Color(element.getAsInt());
+ }
+
+ @Override
+ public JsonElement serialize(Color element) {
+ return new JsonPrimitive(element.getRGB());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCFloat.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCFloat.java
new file mode 100644
index 00000000..2f2aa72f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCFloat.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+public class TCFloat implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "float";
+ }
+
+ @Override
+ public Float deserialize(JsonElement element) {
+ return element.getAsFloat();
+ }
+
+ @Override
+ public JsonElement serialize(Float element) {
+ return new JsonPrimitive(element);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCGUIRectangle.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCGUIRectangle.java
new file mode 100644
index 00000000..8d34b013
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCGUIRectangle.java
@@ -0,0 +1,50 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+public class TCGUIRectangle implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "guirect";
+ }
+
+ @Override
+ public GUIRectangle deserialize(JsonElement element) {
+ if (element == null) return null;
+ GUIRectangle rectangle = new GUIRectangle();
+ rectangle.setX(((JsonObject)element).get("x").getAsInt());
+ rectangle.setY(((JsonObject)element).get("y").getAsInt());
+ rectangle.setWidth(((JsonObject)element).get("width").getAsInt());
+ rectangle.setHeight(((JsonObject)element).get("height").getAsInt());
+ return rectangle;
+ }
+
+ @Override
+ public JsonElement serialize(GUIRectangle element) {
+ JsonObject object = new JsonObject();
+ object.addProperty("x", element.getX());
+ object.addProperty("y", element.getY());
+ object.addProperty("width", element.getWidth());
+ object.addProperty("height", element.getHeight());
+ return object;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCInteger.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCInteger.java
new file mode 100644
index 00000000..e895345d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCInteger.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+public class TCInteger implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "integer";
+ }
+
+ @Override
+ public Integer deserialize(JsonElement element) {
+ return element.getAsInt();
+ }
+
+ @Override
+ public JsonElement serialize(Integer element) {
+ return new JsonPrimitive(element);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCKeybind.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCKeybind.java
new file mode 100644
index 00000000..5b3bb09b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCKeybind.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+public class TCKeybind implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "keybind";
+ }
+
+ @Override
+ public Integer deserialize(JsonElement element) {
+ return element.getAsInt();
+ }
+
+ @Override
+ public JsonElement serialize(Integer element) {
+ return new JsonPrimitive(element);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCRectangle.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCRectangle.java
new file mode 100644
index 00000000..37736d44
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCRectangle.java
@@ -0,0 +1,51 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+import java.awt.*;
+
+public class TCRectangle implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "rect";
+ }
+
+ @Override
+ public Rectangle deserialize(JsonElement element) {
+ Rectangle rectangle = new Rectangle();
+ rectangle.x = ((JsonObject)element).get("x").getAsInt();
+ rectangle.y = ((JsonObject)element).get("y").getAsInt();
+ rectangle.width = ((JsonObject)element).get("width").getAsInt();
+ rectangle.height = ((JsonObject)element).get("height").getAsInt();
+ return rectangle;
+ }
+
+ @Override
+ public JsonElement serialize(Rectangle element) {
+ JsonObject object = new JsonObject();
+ object.addProperty("x", element.x);
+ object.addProperty("y", element.y);
+ object.addProperty("width", element.width);
+ object.addProperty("height", element.height);
+ return object;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCString.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCString.java
new file mode 100644
index 00000000..b2f9dab4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCString.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+public class TCString implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "string";
+ }
+
+ @Override
+ public String deserialize(JsonElement element) {
+ return element.getAsString();
+ }
+
+ @Override
+ public JsonElement serialize(String element) {
+ return new JsonPrimitive(element);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCStringList.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCStringList.java
new file mode 100644
index 00000000..90d78d2a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCStringList.java
@@ -0,0 +1,51 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonPrimitive;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TCStringList implements TypeConverter> {
+ @Override
+ public String getTypeString() {
+ return "stringlist";
+ }
+
+ @Override
+ public List deserialize(JsonElement element) {
+ List strList = new ArrayList<>();
+ for (JsonElement jsonElement : element.getAsJsonArray()) {
+ strList.add(jsonElement.getAsString());
+ }
+ return strList;
+ }
+
+ @Override
+ public JsonElement serialize(List element) {
+ JsonArray jsonElements = new JsonArray();
+ for (String s : element) {
+ jsonElements.add(new JsonPrimitive(s));
+ }
+ return jsonElements;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyle.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyle.java
new file mode 100644
index 00000000..78f03ae0
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyle.java
@@ -0,0 +1,52 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import kr.syeyoung.dungeonsguide.mod.features.text.TextStyle;
+
+public class TCTextStyle implements TypeConverter {
+ @Override
+ public String getTypeString() {
+ return "textstyle";
+ }
+
+ @Override
+ public TextStyle deserialize(JsonElement element) {
+ TextStyle textStyle = new TextStyle();
+ textStyle.setColor(TypeConverterRegistry.getTypeConverter("acolor", AColor.class).deserialize(element.getAsJsonObject().get("color")));
+ textStyle.setBackground(element.getAsJsonObject().has("background") ? TypeConverterRegistry.getTypeConverter("acolor", AColor.class).deserialize(element.getAsJsonObject().get("background"))
+ : new AColor(0x00777777, true));
+ textStyle.setGroupName(element.getAsJsonObject().get("group").getAsString());
+ if (element.getAsJsonObject().has("shadow"))
+ textStyle.setShadow(element.getAsJsonObject().get("shadow").getAsBoolean());
+ return textStyle;
+ }
+
+ @Override
+ public JsonElement serialize(TextStyle element) {
+ JsonObject jsonObject = new JsonObject();
+ jsonObject.add("color", TypeConverterRegistry.getTypeConverter("acolor", AColor.class).serialize(element.getColor()));
+ jsonObject.add("background", TypeConverterRegistry.getTypeConverter("acolor", AColor.class).serialize(element.getBackground()));
+ jsonObject.addProperty("group", element.getGroupName());
+ jsonObject.addProperty("shadow", element.isShadow());
+ return jsonObject;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyleList.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyleList.java
new file mode 100644
index 00000000..50455dd2
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TCTextStyleList.java
@@ -0,0 +1,54 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import kr.syeyoung.dungeonsguide.mod.features.text.TextStyle;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TCTextStyleList implements TypeConverter> {
+ @Override
+ public String getTypeString() {
+ return "list_textStyle";
+ }
+
+ @Override
+ public List deserialize(JsonElement element) {
+ JsonArray arr = element.getAsJsonArray();
+ TypeConverter conv = TypeConverterRegistry.getTypeConverter("textstyle", TextStyle.class);
+ List texts = new ArrayList();
+ for (JsonElement element2:arr) {
+ texts.add(conv.deserialize(element2));
+ }
+ return texts;
+ }
+
+ @Override
+ public JsonElement serialize(List element) {
+ JsonArray array = new JsonArray();
+ TypeConverter conv = TypeConverterRegistry.getTypeConverter("textstyle", TextStyle.class);
+ for (TextStyle st:element) {
+ array.add(conv.serialize(st));
+ }
+ return array;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverter.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverter.java
new file mode 100644
index 00000000..eb4c7a27
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverter.java
@@ -0,0 +1,29 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import com.google.gson.JsonElement;
+
+public interface TypeConverter {
+ String getTypeString();
+
+ T deserialize(JsonElement element);
+
+ JsonElement serialize(T element);
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverterRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverterRegistry.java
new file mode 100644
index 00000000..f635d6ad
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/config/types/TypeConverterRegistry.java
@@ -0,0 +1,52 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.config.types;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class TypeConverterRegistry {
+ private static final Map typeConverterMap = new HashMap();
+
+ public static void register(TypeConverter typeConverter) {
+ typeConverterMap.put(typeConverter.getTypeString(), typeConverter);
+ }
+
+ public static TypeConverter getTypeConverter(String type_string) {
+ return typeConverterMap.get(type_string);
+ }
+ public static TypeConverter getTypeConverter(String type_string, Class t) {
+ return (TypeConverter)typeConverterMap.get(type_string);
+ }
+
+ static {
+ register(new TCBoolean());
+ register(new TCInteger());
+ register(new TCRectangle());
+ register(new TCGUIRectangle());
+ register(new TCString());
+ register(new TCColor());
+ register(new TCFloat());
+ register(new TCAColor());
+ register(new TCTextStyleList());
+ register(new TCTextStyle());
+ register(new TCStringList());
+ register(new TCKeybind());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/ActiveCosmetic.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/ActiveCosmetic.java
new file mode 100644
index 00000000..b71a003c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/ActiveCosmetic.java
@@ -0,0 +1,12 @@
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+import lombok.Data;
+import java.util.UUID;
+
+@Data
+public class ActiveCosmetic {
+ private UUID activityUID;
+ private UUID playerUID;
+ private UUID cosmeticData;
+ private String username;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticData.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticData.java
new file mode 100644
index 00000000..7626b119
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticData.java
@@ -0,0 +1,14 @@
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+
+import lombok.Data;
+
+import java.util.UUID;
+
+@Data
+public class CosmeticData {
+ private UUID id;
+ private String cosmeticType;
+ private String reqPerm;
+ private String data;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticsManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticsManager.java
new file mode 100644
index 00000000..4a625574
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CosmeticsManager.java
@@ -0,0 +1,288 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers.*;
+import kr.syeyoung.dungeonsguide.mod.events.impl.PlayerListItemPacketEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.StompConnectedEvent;
+import kr.syeyoung.dungeonsguide.mod.stomp.*;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.network.NetHandlerPlayClient;
+import net.minecraft.client.network.NetworkPlayerInfo;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.network.play.server.S38PacketPlayerListItem;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.event.entity.player.PlayerEvent;
+import net.minecraftforge.fml.common.eventhandler.EventPriority;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
+import net.minecraftforge.fml.relauncher.ReflectionHelper;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+public class CosmeticsManager {
+ @Getter
+ private Map cosmeticDataMap = new ConcurrentHashMap<>();
+ @Getter
+ private Map activeCosmeticMap = new ConcurrentHashMap<>();
+ @Getter
+ private Map> activeCosmeticByType = new ConcurrentHashMap<>();
+ @Getter
+ private Map> activeCosmeticByPlayer = new ConcurrentHashMap<>();
+ @Getter
+ private Map> activeCosmeticByPlayerNameLowerCase = new ConcurrentHashMap<>();
+ @Getter
+ private Set perms = new CopyOnWriteArraySet<>();
+
+ public void requestActiveCosmetics() {
+ StompManager.getInstance().send(new StompPayload()
+ .method(StompHeader.SEND)
+ .destination("/app/cosmetic.activelist")
+ );
+ }
+ public void requestCosmeticsList() {
+ StompManager.getInstance().send(new StompPayload()
+ .method(StompHeader.SEND)
+ .destination("/app/cosmetic.list")
+ );
+ }
+ public void requestPerms() {
+ StompManager.getInstance().send(new StompPayload()
+ .method(StompHeader.SEND)
+ .destination("/app/user.perms")
+ );
+ }
+ public void setCosmetic(CosmeticData cosmetic) {
+ if (!perms.contains(cosmetic.getReqPerm())) return;
+ StompManager.getInstance().send(new StompPayload()
+ .method(StompHeader.SEND)
+ .destination("/app/cosmetic.set")
+ .payload(cosmetic.getId().toString())
+ );
+ }
+ public void removeCosmetic(ActiveCosmetic activeCosmetic) {
+ StompManager.getInstance().send(new StompPayload()
+ .method(StompHeader.SEND)
+ .destination("/app/cosmetic.remove")
+ .payload(activeCosmetic.getActivityUID().toString())
+ );
+ }
+
+ private void rebuildCaches() {
+ activeCosmeticByType = new HashMap<>();
+ activeCosmeticByPlayer = new HashMap<>();
+ Map> activeCosmeticByPlayerName = new HashMap<>();
+ for (ActiveCosmetic value : activeCosmeticMap.values()) {
+ CosmeticData cosmeticData = cosmeticDataMap.get(value.getCosmeticData());
+ if (cosmeticData != null) {
+ List cosmeticsByTypeList = activeCosmeticByType.computeIfAbsent(cosmeticData.getCosmeticType(), a-> new CopyOnWriteArrayList<>());
+ cosmeticsByTypeList.add(value);
+ }
+ List activeCosmetics = activeCosmeticByPlayer.computeIfAbsent(value.getPlayerUID(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.add(value);
+ activeCosmetics = activeCosmeticByPlayerName.computeIfAbsent(value.getUsername().toLowerCase(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.add(value);
+ }
+
+ this.activeCosmeticByPlayerNameLowerCase = activeCosmeticByPlayerName;
+ }
+
+ @SubscribeEvent
+ public void stompConnect(StompConnectedEvent e) {
+
+ e.getStompInterface().subscribe("/topic/cosmetic.set", (stompClient, payload) -> {
+ JSONObject jsonObject = new JSONObject(payload);
+ ActiveCosmetic activeCosmetic = new ActiveCosmetic();
+ activeCosmetic.setActivityUID(UUID.fromString(jsonObject.getString("activityUID")));
+ activeCosmetic.setPlayerUID(UUID.fromString(jsonObject.getString("playerUID")));
+ if (jsonObject.isNull("cosmeticUID")) {
+ ActiveCosmetic activeCosmetic1 = activeCosmeticMap.remove(activeCosmetic.getActivityUID());
+
+ List activeCosmetics = activeCosmeticByPlayer.computeIfAbsent(activeCosmetic.getPlayerUID(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.remove(activeCosmetic1);
+
+ activeCosmetics = activeCosmeticByPlayerNameLowerCase.computeIfAbsent(activeCosmetic1.getUsername().toLowerCase(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.remove(activeCosmetic1);
+
+ CosmeticData cosmeticData = cosmeticDataMap.get(activeCosmetic.getCosmeticData());
+ if (cosmeticData != null) {
+ List cosmeticsByTypeList = activeCosmeticByType.computeIfAbsent(cosmeticData.getCosmeticType(), a-> new CopyOnWriteArrayList<>());
+ cosmeticsByTypeList.remove(activeCosmetic1);
+ }
+ } else {
+ activeCosmetic.setCosmeticData(UUID.fromString(jsonObject.getString("cosmeticUID")));
+ activeCosmetic.setUsername(jsonObject.getString("username"));
+
+ ActiveCosmetic previousThing = activeCosmeticMap.get(activeCosmetic.getActivityUID());
+ activeCosmeticMap.put(activeCosmetic.getActivityUID(), activeCosmetic);
+
+ CosmeticData cosmeticData = cosmeticDataMap.get(activeCosmetic.getCosmeticData());
+ if (cosmeticData != null) {
+ List cosmeticsByTypeList = activeCosmeticByType.computeIfAbsent(cosmeticData.getCosmeticType(), a-> new CopyOnWriteArrayList<>());
+ cosmeticsByTypeList.add(activeCosmetic);
+ cosmeticsByTypeList.remove(previousThing);
+ }
+ List activeCosmetics = activeCosmeticByPlayer.computeIfAbsent(activeCosmetic.getPlayerUID(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.add(activeCosmetic);
+ activeCosmetics.remove(previousThing);
+
+ activeCosmetics = activeCosmeticByPlayerNameLowerCase.computeIfAbsent(activeCosmetic.getUsername().toLowerCase(), a-> new CopyOnWriteArrayList<>());
+ activeCosmetics.add(activeCosmetic);
+ activeCosmetics.remove(previousThing);
+ }
+
+ try {
+ if (Minecraft.getMinecraft().theWorld != null) {
+ EntityPlayer entityPlayer = Minecraft.getMinecraft().theWorld.getPlayerEntityByUUID(activeCosmetic.getPlayerUID());
+ if (entityPlayer != null) entityPlayer.refreshDisplayName();
+ }
+ } catch (Exception exception) {exception.printStackTrace();}
+ });
+
+
+ e.getStompInterface().subscribe("/user/queue/reply/user.perms", (stompClient ,payload) -> {
+ JSONArray object = new JSONArray(payload);
+ Set cache = new HashSet<>();
+ for (Object o : object) {
+ cache.add((String) o);
+ }
+ this.perms = cache;
+ });
+
+
+
+ e.getStompInterface().subscribe("/user/queue/reply/cosmetic.activelist", (stompClient, payload) -> {
+ activeCosmeticMap = new HashMap<>();
+ JSONArray object = new JSONArray(payload);
+ for (Object o : object) {
+ JSONObject jsonObject = (JSONObject) o;
+ ActiveCosmetic cosmeticData = new ActiveCosmetic();
+ cosmeticData.setActivityUID(UUID.fromString(jsonObject.getString("activityUID")));
+ cosmeticData.setPlayerUID(UUID.fromString(jsonObject.getString("playerUID")));
+ cosmeticData.setCosmeticData(UUID.fromString(jsonObject.getString("cosmeticUID")));
+ cosmeticData.setUsername(jsonObject.getString("username"));
+
+ activeCosmeticMap.put(cosmeticData.getActivityUID(), cosmeticData);
+ try {
+ if (Minecraft.getMinecraft().theWorld != null) {
+ EntityPlayer entityPlayer = Minecraft.getMinecraft().theWorld.getPlayerEntityByUUID(cosmeticData.getPlayerUID());
+ if (entityPlayer != null) entityPlayer.refreshDisplayName();
+ }
+ } catch (Exception exception) {exception.printStackTrace();}
+ }
+ rebuildCaches();
+ });
+
+
+
+ e.getStompInterface().subscribe("/user/queue/reply/cosmetic.list", (stompClient ,payload) -> {
+ JSONArray object = new JSONArray(payload);
+ Map newCosmeticList = new HashMap<>();
+ for (Object o : object) {
+ JSONObject jsonObject = (JSONObject) o;
+ CosmeticData cosmeticData = new CosmeticData();
+ cosmeticData.setCosmeticType(jsonObject.getString("cosmeticType"));
+ cosmeticData.setReqPerm(jsonObject.getString("reqPerm"));
+ cosmeticData.setData(jsonObject.getString("data"));
+ cosmeticData.setId(UUID.fromString(jsonObject.getString("id")));
+
+ newCosmeticList.put(cosmeticData.getId(), cosmeticData);
+ }
+
+ cosmeticDataMap = newCosmeticList;
+ rebuildCaches();
+ });
+
+
+ requestCosmeticsList();
+ requestActiveCosmetics();
+ requestPerms();
+ }
+ @Getter @Setter
+ private static List iChatReplacers = new ArrayList<>();
+ static {
+ iChatReplacers.add(new ChatReplacerViewProfile());
+ iChatReplacers.add(new ChatReplacerPV());
+ iChatReplacers.add(new ChatReplacerSocialOptions());
+ iChatReplacers.add(new ChatReplacerCoop());
+ iChatReplacers.add(new ChatReplacerMessage());
+ iChatReplacers.add(new ChatReplacerChatByMe());
+ }
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void onChat(ClientChatReceivedEvent clientChatReceivedEvent) {
+ try {
+ if (clientChatReceivedEvent.type == 2) return;
+ for (IChatReplacer iChatReplacer : iChatReplacers) {
+ if (iChatReplacer.isAcceptable(clientChatReceivedEvent)) {
+ iChatReplacer.translate(clientChatReceivedEvent, this);
+ return;
+ }
+ }
+ } catch (Throwable t) {
+ System.out.println(clientChatReceivedEvent.message);
+ t.printStackTrace();
+ }
+ }
+
+
+ @SubscribeEvent
+ public void onTabList(PlayerListItemPacketEvent packetPlayerListItem) {
+ S38PacketPlayerListItem asd = packetPlayerListItem.getPacketPlayerListItem();
+ if (asd.getAction() == S38PacketPlayerListItem.Action.ADD_PLAYER) {
+ if (Minecraft.getMinecraft().getNetHandler() == null) return;
+
+ Map playerInfoMap = ReflectionHelper.getPrivateValue(NetHandlerPlayClient.class, Minecraft.getMinecraft().getNetHandler(), "playerInfoMap", "field_147310_i","i");
+ for (S38PacketPlayerListItem.AddPlayerData entry : asd.getEntries()) {
+ playerInfoMap.remove(entry.getProfile().getId());
+ playerInfoMap.put(entry.getProfile().getId(), new CustomNetworkPlayerInfo(entry));
+ }
+ }
+ }
+
+ @SubscribeEvent(priority = EventPriority.LOWEST)
+ public void nameFormat(PlayerEvent.NameFormat nameFormat) {
+ List activeCosmetics = activeCosmeticByPlayer.get(nameFormat.entityPlayer.getGameProfile().getId());
+ if (activeCosmetics == null) return;
+ CosmeticData color=null;
+ CosmeticData prefix=null;
+ for (ActiveCosmetic activeCosmetic : activeCosmetics) {
+ CosmeticData cosmeticData = cosmeticDataMap.get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+
+ if (color != null)
+ nameFormat.displayname = color.getData().replace("&","§")+nameFormat.username;
+
+ if (prefix != null)
+ nameFormat.displayname = prefix.getData().replace("&","§")+" "+nameFormat.displayname;
+
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomNetworkPlayerInfo.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomNetworkPlayerInfo.java
new file mode 100644
index 00000000..7be9a1ca
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomNetworkPlayerInfo.java
@@ -0,0 +1,108 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+import com.mojang.authlib.GameProfile;
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.client.network.NetworkPlayerInfo;
+import net.minecraft.network.play.server.S38PacketPlayerListItem;
+import net.minecraft.scoreboard.ScorePlayerTeam;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IChatComponent;
+
+import java.util.List;
+
+public class CustomNetworkPlayerInfo extends NetworkPlayerInfo {
+ public CustomNetworkPlayerInfo(GameProfile gameProfile) {
+ super(gameProfile);
+ }
+
+ public CustomNetworkPlayerInfo(S38PacketPlayerListItem.AddPlayerData playerData) {
+ super(playerData);
+ setDisplayName(super.getDisplayName());
+ }
+
+
+ private IChatComponent displayName;
+ private String unformattedDisplayText;
+ private String playerNameWithoutColor;
+
+ @Override
+ public void setDisplayName(IChatComponent displayNameIn) {
+ displayName = displayNameIn;
+ if (displayName == null) {
+ unformattedDisplayText = null;
+ return;
+ }
+
+ unformattedDisplayText = displayName.getUnformattedTextForChat();
+
+
+ playerNameWithoutColor = "";
+ for (String s : unformattedDisplayText.split(" ")) {
+ String strippped = TextUtils.stripColor(s);
+ if (strippped.startsWith("[")) {
+ continue;
+ }
+ playerNameWithoutColor = strippped;
+ break;
+ }
+ }
+
+ public IChatComponent getDisplayName()
+ {
+
+ String rawPlayerString;
+ String actualName;
+ List activeCosmetics;
+
+ // in case that the set player name is not called we do this
+ if (playerNameWithoutColor != null) {
+ activeCosmetics = DungeonsGuide.getDungeonsGuide().getCosmeticsManager().getActiveCosmeticByPlayerNameLowerCase().get(playerNameWithoutColor.toLowerCase());
+ rawPlayerString = unformattedDisplayText;
+ actualName = this.playerNameWithoutColor;
+ } else {
+ rawPlayerString = ScorePlayerTeam.formatPlayerName(super.getPlayerTeam(), super.getGameProfile().getName());
+ actualName = "";
+ for (String s : rawPlayerString.split(" ")) {
+ String strippped = TextUtils.stripColor(s);
+ if (strippped.startsWith("[")) continue;
+ actualName = strippped;
+ break;
+ }
+ activeCosmetics = DungeonsGuide.getDungeonsGuide().getCosmeticsManager().getActiveCosmeticByPlayerNameLowerCase().get(actualName.toLowerCase());
+ }
+
+
+ if (activeCosmetics == null) return displayName;
+ CosmeticData color=null;
+ for (ActiveCosmetic activeCosmetic : activeCosmetics) {
+ CosmeticData cosmeticData = DungeonsGuide.getDungeonsGuide().getCosmeticsManager().getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData.getCosmeticType().equals("color")) color = cosmeticData;
+ }
+
+ if (color != null) {
+ String coloredName = color.getData() + actualName;
+ return new ChatComponentText(rawPlayerString.replace(actualName, coloredName));
+ } else {
+ return new ChatComponentText(rawPlayerString);
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomPacketPlayerListItem.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomPacketPlayerListItem.java
new file mode 100644
index 00000000..3406288d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/CustomPacketPlayerListItem.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+import kr.syeyoung.dungeonsguide.mod.events.impl.PlayerListItemPacketEvent;
+import net.minecraft.network.play.INetHandlerPlayClient;
+import net.minecraft.network.play.server.S38PacketPlayerListItem;
+import net.minecraftforge.common.MinecraftForge;
+
+public class CustomPacketPlayerListItem extends S38PacketPlayerListItem {
+ public CustomPacketPlayerListItem(S38PacketPlayerListItem packet) {
+ super(packet.getAction());
+ getEntries().addAll(packet.getEntries());
+ }
+
+ @Override
+ public void processPacket(INetHandlerPlayClient handler) {
+ super.processPacket(handler);
+
+ MinecraftForge.EVENT_BUS.post(new PlayerListItemPacketEvent(this));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/IChatReplacer.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/IChatReplacer.java
new file mode 100644
index 00000000..483fadcf
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/IChatReplacer.java
@@ -0,0 +1,26 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics;
+
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+public interface IChatReplacer {
+ boolean isAcceptable(ClientChatReceivedEvent event);
+ void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager);
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerChatByMe.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerChatByMe.java
new file mode 100644
index 00000000..4e50b110
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerChatByMe.java
@@ -0,0 +1,106 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.ChatStyle;
+import net.minecraft.util.IChatComponent;
+import net.minecraft.util.Tuple;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChatReplacerChatByMe implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ for (IChatComponent sibling : event.message.getSiblings()) {
+ if (sibling.getUnformattedTextForChat().startsWith(": ")) return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ List> replaceMents = new ArrayList<>();
+ List iChatComponents = new ArrayList<>( event.message.getSiblings() );
+ List hasMsg = new ArrayList<>();
+ for (IChatComponent sibling : iChatComponents) {
+ if (sibling.getUnformattedTextForChat().startsWith(": ")) break;
+ hasMsg.add(sibling);
+ }
+ iChatComponents.removeAll(hasMsg);
+
+ ChatComponentText chatComponents = new ChatComponentText("");
+ chatComponents.getSiblings().addAll(hasMsg);
+ ChatStyle origStyle = hasMsg.get(0).getChatStyle();
+ String name = chatComponents.getFormattedText();
+
+ String[] splited = name.split(" ");
+ String actualName = splited[splited.length-1];
+
+ List cDatas = cosmeticsManager.getActiveCosmeticByPlayerNameLowerCase().get(TextUtils.stripColor(actualName).toLowerCase());
+ if (cDatas == null) return;
+ CosmeticData color=null, prefix=null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String building = "";
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ for (int i = 0; i < splited.length-1; i++) {
+ building += splited[i] +" ";
+ }
+
+ if (color != null) {
+ String nick = splited[splited.length-1];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ } else {
+ building += splited[splited.length-1] ;
+ }
+
+ ChatComponentText chatComponents1 = new ChatComponentText(building);
+ chatComponents1.setChatStyle(origStyle);
+ event.message.getSiblings().clear();
+ event.message.getSiblings().add(chatComponents1);
+ event.message.getSiblings().addAll(iChatComponents);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerCoop.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerCoop.java
new file mode 100644
index 00000000..df003ec7
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerCoop.java
@@ -0,0 +1,119 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IChatComponent;
+import net.minecraft.util.Tuple;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChatReplacerCoop implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ for (IChatComponent sibling : event.message.getSiblings()) {
+ if (sibling.getUnformattedTextForChat().startsWith("§bCo-op > ")) return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ List> replaceMents = new ArrayList<>();
+ List iChatComponents = new ArrayList<>( event.message.getSiblings() );
+ IChatComponent sibling = iChatComponents.get(0); iChatComponents.remove(sibling);
+
+
+ String[] splitInto = sibling.getUnformattedTextForChat().split(" ");
+ int lastValidNickname = -1;
+ int lastprefix = -1;
+ for (int i = 0; i < splitInto.length; i++) {
+ String s = TextUtils.stripColor(splitInto[i]);
+ char c = s.charAt(0);
+ if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
+ lastValidNickname = i;
+ }
+ }
+ if (lastValidNickname == -1) return;
+
+ if (lastValidNickname -1 >= 0 && TextUtils.stripColor(splitInto[lastValidNickname - 1]).charAt(0) == '[') lastprefix = lastValidNickname -1;
+ else lastprefix = lastValidNickname;
+
+
+ List cDatas = cosmeticsManager.getActiveCosmeticByPlayerNameLowerCase().get(TextUtils.stripColor(splitInto[lastValidNickname].substring(0, splitInto[lastValidNickname].length()-1)).toLowerCase());
+
+ if (cDatas == null) return;
+
+ CosmeticData color = null, prefix = null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData != null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String building = "";
+ for (int i = 0; i < lastprefix; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ for (int i = lastprefix; i < lastValidNickname; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (color != null) {
+ String nick = splitInto[lastValidNickname];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ building += " ";
+ } else {
+ building += splitInto[lastValidNickname] + " ";
+ }
+ for (int i = lastValidNickname+1; i.
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.ChatStyle;
+import net.minecraft.util.IChatComponent;
+import net.minecraft.util.Tuple;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChatReplacerMessage implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ for (IChatComponent sibling : event.message.getSiblings()) {
+ if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/msg")) return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ List> replaceMents = new ArrayList<>();
+ List iChatComponents = new ArrayList<>( event.message.getSiblings() );
+ List hasMsg = new ArrayList<>();
+ for (IChatComponent sibling : iChatComponents) {
+ if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/msg")) {
+ hasMsg.add(sibling);
+ }
+ }
+ iChatComponents.removeAll(hasMsg);
+
+ ChatComponentText chatComponents = new ChatComponentText("");
+ chatComponents.getSiblings().addAll(hasMsg);
+ ChatStyle origStyle = hasMsg.get(0).getChatStyle();
+ String name = chatComponents.getFormattedText();
+
+
+ String[] splited = name.split(" ");
+ String actualName = splited[splited.length-1];
+
+ List cDatas = cosmeticsManager.getActiveCosmeticByPlayerNameLowerCase().get(TextUtils.stripColor(actualName).toLowerCase());
+ if (cDatas == null || splited.length > 2) return;
+ CosmeticData color=null, prefix=null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String building = "";
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ if (splited.length == 2) building += splited[0] +" ";
+
+ if (color != null) {
+ String nick = splited[1];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ } else {
+ building += splited[1] ;
+ }
+
+ ChatComponentText chatComponents1 = new ChatComponentText(building);
+ chatComponents1.setChatStyle(origStyle);
+ event.message.getSiblings().clear();
+ event.message.getSiblings().add(chatComponents1);
+ event.message.getSiblings().addAll(iChatComponents);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerPV.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerPV.java
new file mode 100644
index 00000000..b4e1b777
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/cosmetics/chatreplacers/ChatReplacerPV.java
@@ -0,0 +1,119 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.List;
+
+
+// Bug 289 - mod conflict with NEU (Replaces /socialoptions with /pv)
+public class ChatReplacerPV implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ if (event.message.getChatStyle() != null && event.message.getChatStyle().getChatClickEvent() != null && event.message.getChatStyle().getChatClickEvent().getValue().startsWith("/pv")) return true;
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ if (event.message.getChatStyle() != null && event.message.getChatStyle().getChatClickEvent() != null && event.message.getChatStyle().getChatClickEvent().getValue().startsWith("/pv")) {
+ String username = event.message.getChatStyle().getChatClickEvent().getValue().split(" ")[1];
+ List cDatas = cosmeticsManager.getActiveCosmeticByPlayerNameLowerCase().get(username.toLowerCase());
+
+ if (cDatas != null) {
+ CosmeticData color=null, prefix=null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String[] splitInto = event.message.getUnformattedTextForChat().split(" ");
+ int lastValidNickname = -1;
+ int lastprefix = -1;
+ for (int i = 0; i < splitInto.length; i++) {
+ String s = splitInto[i];
+ if (s.startsWith("§7")) s = s.substring(2);
+ char c = s.charAt(0);
+ if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
+ lastValidNickname = i;
+ if (i >= 1) {
+ String str = TextUtils.stripColor(splitInto[i-1]);
+ if (str.startsWith("[") && str.endsWith("]"))break;
+ }
+ }
+ }
+ if (lastValidNickname == -1) return;
+
+ if (lastValidNickname -1 >= 0 && TextUtils.stripColor(splitInto[lastValidNickname - 1]).charAt(0) == '[') lastprefix = lastValidNickname -1;
+ else lastprefix = lastValidNickname;
+
+ String building = "";
+ for (int i = 0; i < lastprefix; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ for (int i = lastprefix; i < lastValidNickname; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (color != null) {
+ String nick = splitInto[lastValidNickname];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ building += " ";
+ } else {
+ building += splitInto[lastValidNickname] + " ";
+ }
+ for (int i = lastValidNickname+1; i.
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.List;
+
+public class ChatReplacerSocialOptions implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ if (event.message.getChatStyle() != null && event.message.getChatStyle().getChatClickEvent() != null && event.message.getChatStyle().getChatClickEvent().getValue().startsWith("/socialoptions")) return true;
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ if (event.message.getChatStyle() != null && event.message.getChatStyle().getChatClickEvent() != null && event.message.getChatStyle().getChatClickEvent().getValue().startsWith("/socialoptions")) {
+ String username = event.message.getChatStyle().getChatClickEvent().getValue().split(" ")[1];
+ List cDatas = cosmeticsManager.getActiveCosmeticByPlayerNameLowerCase().get(username.toLowerCase());
+
+ if (cDatas != null) {
+ CosmeticData color=null, prefix=null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String[] splitInto = event.message.getUnformattedTextForChat().split(" ");
+ int lastValidNickname = -1;
+ int lastprefix = -1;
+ for (int i = 0; i < splitInto.length; i++) {
+ String s = splitInto[i];
+ if (s.startsWith("§7")) s = s.substring(2);
+ char c = s.charAt(0);
+ if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
+ lastValidNickname = i;
+ if (i >= 1) {
+ String str = TextUtils.stripColor(splitInto[i-1]);
+ if (str.startsWith("[") && str.endsWith("]"))break;
+ }
+ }
+ }
+ if (lastValidNickname == -1) return;
+
+ if (lastValidNickname -1 >= 0 && TextUtils.stripColor(splitInto[lastValidNickname - 1]).charAt(0) == '[') lastprefix = lastValidNickname -1;
+ else lastprefix = lastValidNickname;
+
+ String building = "";
+ for (int i = 0; i < lastprefix; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ for (int i = lastprefix; i < lastValidNickname; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (color != null) {
+ String nick = splitInto[lastValidNickname];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ building += " ";
+ } else {
+ building += splitInto[lastValidNickname] + " ";
+ }
+ for (int i = lastValidNickname+1; i.
+ */
+
+package kr.syeyoung.dungeonsguide.mod.cosmetics.chatreplacers;
+
+import kr.syeyoung.dungeonsguide.mod.cosmetics.ActiveCosmetic;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticData;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.CosmeticsManager;
+import kr.syeyoung.dungeonsguide.mod.cosmetics.IChatReplacer;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IChatComponent;
+import net.minecraft.util.Tuple;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChatReplacerViewProfile implements IChatReplacer {
+ @Override
+ public boolean isAcceptable(ClientChatReceivedEvent event) {
+ for (IChatComponent sibling : event.message.getSiblings()) {
+ if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile ")) return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void translate(ClientChatReceivedEvent event, CosmeticsManager cosmeticsManager) {
+ List> replaceMents = new ArrayList<>();
+ for (IChatComponent sibling : event.message.getSiblings()) {
+ if (sibling.getChatStyle() != null && sibling.getChatStyle().getChatClickEvent() != null && sibling.getChatStyle().getChatClickEvent().getValue().startsWith("/viewprofile ")) {
+ String uid = sibling.getChatStyle().getChatClickEvent().getValue().split(" ")[1];
+ // TODO: make cosmeticsManager handle usernames instead of uuids
+ // apperantly now hypixels /viewprofile command gives the nickname
+// List cDatas = cosmeticsManager.getActiveCosmeticByPlayer().get(UUID.fromString(uid));
+ List cDatas = null;
+
+ if (cDatas != null) {
+ CosmeticData color=null, prefix=null;
+ for (ActiveCosmetic activeCosmetic : cDatas) {
+ CosmeticData cosmeticData = cosmeticsManager.getCosmeticDataMap().get(activeCosmetic.getCosmeticData());
+ if (cosmeticData !=null && cosmeticData.getCosmeticType().equals("color")) {
+ color = cosmeticData;
+ } else if (cosmeticData != null && cosmeticData.getCosmeticType().equals("prefix")) {
+ prefix = cosmeticData;
+ }
+ }
+
+ String[] splitInto = sibling.getUnformattedTextForChat().split(" ");
+ int lastValidNickname = -1;
+ int lastprefix = -1;
+ for (int i = 0; i < splitInto.length; i++) {
+ String s = TextUtils.stripColor(splitInto[i]);
+ char c = s.charAt(0);
+ if (('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') || c == '_' || c == '-') {
+ lastValidNickname = i;
+ if (i >= 1) {
+ String str = TextUtils.stripColor(splitInto[i-1]);
+ if (str.startsWith("[") && str.endsWith("]"))break;
+ }
+ }
+ }
+ if (lastValidNickname == -1) continue;
+
+ if (lastValidNickname -1 >= 0 && TextUtils.stripColor(splitInto[lastValidNickname - 1]).charAt(0) == '[') lastprefix = lastValidNickname -1;
+ else lastprefix = lastValidNickname;
+
+ String building = "";
+ for (int i = 0; i < lastprefix; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (prefix != null) building += prefix.getData().replace("&", "§") + " ";
+ for (int i = lastprefix; i < lastValidNickname; i++) {
+ building += splitInto[i] +" ";
+ }
+ if (color != null) {
+ String nick = splitInto[lastValidNickname];
+ building += color.getData().replace("&","§");
+ boolean foundLegitChar = false;
+ boolean foundColor = false;
+ for (char c : nick.toCharArray()) {
+ if (foundColor) {
+ foundColor = false; continue;
+ }
+ if (c == '§' && !foundLegitChar) foundColor = true;
+ else {
+ foundLegitChar = true;
+ building += c;
+ }
+ }
+ building += " ";
+ } else {
+ building += splitInto[lastValidNickname] + " ";
+ }
+ for (int i = lastValidNickname+1; i(sibling, newChatCompText));
+ break;
+ }
+ }
+ }
+
+ for (Tuple replaceMent : replaceMents) {
+ int index = event.message.getSiblings().indexOf(replaceMent.getFirst());
+ event.message.getSiblings().set(index, replaceMent.getSecond());
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java
new file mode 100644
index 00000000..f66043b5
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/GameSDK.java
@@ -0,0 +1,87 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk;
+
+import com.sun.jna.Library;
+import com.sun.jna.Native;
+import com.sun.jna.Platform;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import lombok.Getter;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.StandardCopyOption;
+import java.util.Collections;
+
+public class GameSDK {
+ @Getter
+ private static NativeGameSDK nativeGameSDK;
+
+ static {
+ try {
+ if (System.getProperty("dg.safe") == null) extractLibrary();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ public static void extractLibrary() throws IOException {
+ String libName = System.mapLibraryName("discord_game_sdk");
+ String dir = "";
+ switch(Platform.getOSType()) {
+ case Platform.MAC:
+ dir = "darwin";
+ break;
+ case Platform.LINUX:
+ dir = "linux";
+ break;
+ case Platform.WINDOWS:
+ if (Platform.is64Bit()) dir = "win-x64";
+ else dir = "win-x86";
+ break;
+ default:
+ throw new IllegalStateException("Unsupported OS Type");
+ }
+
+ String resourceLoc = "/gamesdk/"+dir+"/"+libName;
+ File targetExtractionPath = new File("native/"+libName);
+ targetExtractionPath.getParentFile().mkdirs();
+ try (InputStream is = GameSDK.class.getResourceAsStream(resourceLoc)) {
+ Files.copy(is, targetExtractionPath.toPath(), StandardCopyOption.REPLACE_EXISTING);
+ targetExtractionPath.deleteOnExit();
+ }
+
+ nativeGameSDK = (NativeGameSDK) Native.loadLibrary(targetExtractionPath.getAbsolutePath(), NativeGameSDK.class,
+ Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE));
+ }
+
+ public static void writeString(byte[] bts, String str) {
+ System.arraycopy(str.getBytes(), 0, bts, 0, str.getBytes().length);
+ bts[str.getBytes().length] = 0;
+ }
+ public static String readString(byte[] bts) {
+ int i;
+ for (i = 0; i < bts.length && bts[i] != 0; i++);
+ byte[] asdasd = new byte[i];
+ System.arraycopy(bts, 0, asdasd, 0, i);
+ return new String(asdasd);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java
new file mode 100644
index 00000000..e895935a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/GameSDKTypeMapper.java
@@ -0,0 +1,46 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna;
+
+import com.sun.jna.DefaultTypeMapper;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.*;
+
+public class GameSDKTypeMapper extends DefaultTypeMapper {
+ public static final GameSDKTypeMapper INSTANCE = new GameSDKTypeMapper();
+ private GameSDKTypeMapper() {
+ addTypeConverter(EDiscordResult.class, new EDiscordResult.EDiscordResultTypeConverter());
+ addTypeConverter(EDiscordCreateFlags.class, new EDiscordCreateFlags.EDiscordCreateFlagsTypeConverter());
+ addTypeConverter(EDiscordLogLevel.class, new EDiscordLogLevel.EDiscordLogLevelTypeConverter());
+ addTypeConverter(EDiscordUserFlag.class, new EDiscordUserFlag.EDiscordUserFlagTypeConverter());
+ addTypeConverter(EDiscordPremiumType.class, new EDiscordPremiumType.EDiscordPremiumTypeTypeConverter());
+ addTypeConverter(EDiscordImageType.class, new EDiscordImageType.EDiscordImageTypeTypeConverter());
+ addTypeConverter(EDiscordActivityType.class, new EDiscordActivityType.EDiscordActivityTypeTypeConverter());
+ addTypeConverter(EDiscordActivityActionType.class, new EDiscordActivityActionType.EDiscordActivityActionTypeTypeConverter());
+ addTypeConverter(EDiscordActivityJoinRequestReply.class, new EDiscordActivityJoinRequestReply.EDiscordActivityJoinRequestReplyTypeConverter());
+ addTypeConverter(EDiscordStatus.class, new EDiscordStatus.EDiscordStatusTypeConverter());
+ addTypeConverter(EDiscordRelationshipType.class, new EDiscordRelationshipType.EDiscordRelationshipTypeTypeConverter());
+ addTypeConverter(EDiscordLobbyType.class, new EDiscordLobbyType.EDiscordLobbyTypeTypeConverter());
+ addTypeConverter(EDiscordLobbySearchComparison.class, new EDiscordLobbySearchComparison.EDiscordLobbySearchComparisonTypeConverter());
+ addTypeConverter(EDiscordLobbySearchCast.class, new EDiscordLobbySearchCast.EDiscordLobbySearchCastTypeConverter());
+ addTypeConverter(EDiscordLobbySearchDistance.class, new EDiscordLobbySearchDistance.EDiscordLobbySearchDistanceTypeConverter());
+ addTypeConverter(EDiscordEntitlementType.class, new EDiscordEntitlementType.EDiscordEntitlementTypeTypeConverter());
+ addTypeConverter(EDiscordSkuType.class, new EDiscordSkuType.EDiscordSkuTypeTypeConverter());
+ addTypeConverter(EDiscordInputModeType.class, new EDiscordInputModeType.EDiscordInputModeTypeTypeConverter());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java
new file mode 100644
index 00000000..b11f141c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/NativeGameSDK.java
@@ -0,0 +1,50 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna;
+
+import com.sun.jna.Callback;
+import com.sun.jna.Library;
+import com.sun.jna.Pointer;
+import com.sun.jna.ptr.PointerByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordCreateParams;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordVersion;
+
+public interface NativeGameSDK extends Library {
+
+ public static final int DISCORD_VERSION = 2;
+ public static final int DISCORD_APPLICATION_MANAGER_VERSION = 1;
+ public static final int DISCORD_USER_MANAGER_VERSION = 1;
+ public static final int DISCORD_IMAGE_MANAGER_VERSION = 1;
+ public static final int DISCORD_ACTIVITY_MANAGER_VERSION = 1;
+ public static final int DISCORD_RELATIONSHIP_MANAGER_VERSION = 1;
+ public static final int DISCORD_LOBBY_MANAGER_VERSION = 1;
+ public static final int DISCORD_NETWORK_MANAGER_VERSION = 1;
+ public static final int DISCORD_OVERLAY_MANAGER_VERSION = 1;
+ public static final int DISCORD_STORAGE_MANAGER_VERSION = 1;
+ public static final int DISCORD_STORE_MANAGER_VERSION = 1;
+ public static final int DISCORD_VOICE_MANAGER_VERSION = 1;
+ public static final int DISCORD_ACHIEVEMENT_MANAGER_VERSION = 1;
+
+ EDiscordResult DiscordCreate(DiscordVersion version, DiscordCreateParams params, PointerByReference result); // result is double pointer of IDiscordCore
+
+ interface DiscordCallback extends Callback {
+ void callback(Pointer callbackData, EDiscordResult result);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java
new file mode 100644
index 00000000..3bd0c612
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivity.java
@@ -0,0 +1,50 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordActivity extends DiscordStruct {
+ public EDiscordActivityType activityType = EDiscordActivityType.DiscordActivityType_Playing;
+ public Int64 applicationId = new Int64();
+ public byte[] name = new byte[128];
+ public byte[] state = new byte[128];
+ public byte[] details = new byte[128];
+ public DiscordActivityTimestamps timestamps;
+ public DiscordActivityAssets assets;
+ public DiscordActivityParty party;
+ public DiscordActivitySecrets secrets;
+ public boolean instance;
+ public DiscordActivity() {super();} public DiscordActivity(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordActivity implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordActivity implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("activityType", "applicationId", "name", "state", "details", "timestamps", "assets", "party", "secrets", "instance");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java
new file mode 100644
index 00000000..fe9bf1ca
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityAssets.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordActivityAssets extends DiscordStruct{
+ public byte[] large_image = new byte[128];
+ public byte[] large_text = new byte[128];
+ public byte[] small_image = new byte[128];
+ public byte[] small_text = new byte[128];
+ public DiscordActivityAssets() {super();}public DiscordActivityAssets(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordActivityAssets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordActivityAssets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("large_image", "large_text", "small_image", "small_text");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java
new file mode 100644
index 00000000..ee0730af
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityParty.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordActivityParty extends DiscordStruct {
+ public byte[] id = new byte[128];
+ public DiscordPartySize discordActivityParty;
+ public DiscordActivityParty() {super();} public DiscordActivityParty(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordActivityParty implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordActivityParty implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("id", "discordActivityParty");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java
new file mode 100644
index 00000000..6a43412c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivitySecrets.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordActivitySecrets extends DiscordStruct {
+ public byte[] match = new byte[128];
+ public byte[] join = new byte[128];
+ public byte[] spectate = new byte[128];
+ public DiscordActivitySecrets() {super();} public DiscordActivitySecrets(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordActivitySecrets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordActivitySecrets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("match", "join", "spectate");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java
new file mode 100644
index 00000000..8a8d06b8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordActivityTimestamps.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordTimestamp;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordActivityTimestamps extends DiscordStruct {
+ public DiscordTimestamp start = new DiscordTimestamp();
+ public DiscordTimestamp end = new DiscordTimestamp();
+ public DiscordActivityTimestamps() {super();} public DiscordActivityTimestamps(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordActivityTimestamps implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordActivityTimestamps implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("start", "end");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java
new file mode 100644
index 00000000..9c7e15a9
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordCreateParams.java
@@ -0,0 +1,72 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.*;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordClientID;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordVersion;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordCreateParams extends DiscordStruct { public DiscordCreateParams() {super();} public DiscordCreateParams(Pointer pointer) {super(pointer);}
+ public DiscordClientID client_id = new DiscordClientID();
+ public UInt64 flags = new UInt64();
+ public Pointer events; // void*
+ public Pointer event_data; // void*
+ public Pointer application_events;
+ public DiscordVersion application_version = new DiscordVersion(NativeGameSDK.DISCORD_APPLICATION_MANAGER_VERSION);
+ public IDiscordUserEvents.ByReference user_events;
+ public DiscordVersion user_version= new DiscordVersion(NativeGameSDK.DISCORD_USER_MANAGER_VERSION);
+ public Pointer image_events;// void*
+ public DiscordVersion image_version= new DiscordVersion(NativeGameSDK.DISCORD_IMAGE_MANAGER_VERSION);
+ public IDiscordActivityEvents.ByReference activity_events;
+ public DiscordVersion activity_version= new DiscordVersion(NativeGameSDK.DISCORD_ACTIVITY_MANAGER_VERSION);
+ public IDiscordRelationshipEvents.ByReference relationship_events;
+ public DiscordVersion relationship_version= new DiscordVersion(NativeGameSDK.DISCORD_RELATIONSHIP_MANAGER_VERSION);
+ public IDiscordLobbyEvents.ByReference lobby_events;
+ public DiscordVersion lobby_version= new DiscordVersion(NativeGameSDK.DISCORD_LOBBY_MANAGER_VERSION);
+ public IDiscordNetworkEvents.ByReference network_events;
+ public DiscordVersion network_version= new DiscordVersion(NativeGameSDK.DISCORD_NETWORK_MANAGER_VERSION);
+ public IDiscordOverlayEvents.ByReference overlay_events;
+ public DiscordVersion overlay_version= new DiscordVersion(NativeGameSDK.DISCORD_OVERLAY_MANAGER_VERSION);
+ public Pointer storage_events;// void*
+ public DiscordVersion storage_version= new DiscordVersion(NativeGameSDK.DISCORD_STORAGE_MANAGER_VERSION);
+ public IDiscordStoreEvents.ByReference store_events;
+ public DiscordVersion store_version= new DiscordVersion(NativeGameSDK.DISCORD_STORE_MANAGER_VERSION);
+ public IDiscordVoiceEvents.ByReference voice_events;
+ public DiscordVersion voice_version= new DiscordVersion(NativeGameSDK.DISCORD_VOICE_MANAGER_VERSION);
+ public IDiscordAchievementEvents.ByReference achievement_events;
+ public DiscordVersion achievement_version= new DiscordVersion(NativeGameSDK.DISCORD_ACHIEVEMENT_MANAGER_VERSION);
+
+ public static class ByReference extends DiscordCreateParams implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordCreateParams implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("client_id", "flags", "events", "event_data", "application_events", "application_version", "user_events",
+ "user_version", "image_events", "image_version", "activity_events", "activity_version", "lobby_events", "lobby_version",
+ "network_events", "network_version", "overlay_events", "overlay_version", "storage_events", "storage_version", "store_events",
+ "store_version", "voice_events", "voice_version", "achievement_events", "achievement_version");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java
new file mode 100644
index 00000000..85ef593b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordEntitlement.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordEntitlementType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordEntitlement extends DiscordStruct {
+ public DiscordSnowflake id = new DiscordSnowflake();
+ public EDiscordEntitlementType type = EDiscordEntitlementType.DiscordEntitlementType_Purchase;
+ public DiscordSnowflake sku_id = new DiscordSnowflake();
+ public DiscordEntitlement() {super();} public DiscordEntitlement(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordEntitlement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordEntitlement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("id", "type", "sku_id");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java
new file mode 100644
index 00000000..40f72b6c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordFileStat.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordFileStat extends DiscordStruct {
+ public byte[] filename = new byte[260];
+ public UInt64 size = new UInt64();
+ public UInt64 last_modified = new UInt64();
+ public DiscordFileStat() {super();} public DiscordFileStat(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordFileStat implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordFileStat implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("filename", "size", "last_modified");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java
new file mode 100644
index 00000000..c6a55c42
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageDimensions.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordImageDimensions extends DiscordStruct {
+ public UInt32 width = new UInt32();
+ public UInt32 height = new UInt32();
+ public DiscordImageDimensions() {super();} public DiscordImageDimensions(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordImageDimensions implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) { super(pointer);}}
+ public static class ByValue extends DiscordImageDimensions implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) { super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("width", "height");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java
new file mode 100644
index 00000000..c52dfebc
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordImageHandle.java
@@ -0,0 +1,43 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordImageType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordImageHandle extends DiscordStruct {
+ public EDiscordImageType type = EDiscordImageType.DiscordImageType_User;
+ public Int64 id = new Int64();
+ public UInt32 size = new UInt32();
+ public DiscordImageHandle() {super();} public DiscordImageHandle(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordImageHandle implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordImageHandle implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("type", "id", "size");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java
new file mode 100644
index 00000000..d0b8589b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordInputMode.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordInputModeType;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordInputMode extends DiscordStruct {
+ public EDiscordInputModeType type = EDiscordInputModeType.DiscordInputModeType_PushToTalk;
+ public byte[] shortcut = new byte[256];
+ public DiscordInputMode() {super();} public DiscordInputMode(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordInputMode implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordInputMode implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("type", "shortcut");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java
new file mode 100644
index 00000000..c89dc1cf
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordLobby.java
@@ -0,0 +1,47 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbyType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordLobby extends DiscordStruct {
+ public DiscordSnowflake id = new DiscordSnowflake();
+ public EDiscordLobbyType type = EDiscordLobbyType.DiscordLobbyType_Private;
+ public DiscordSnowflake owner_id = new DiscordSnowflake();
+ public byte[] secret = new byte[128];
+ public UInt32 capacity = new UInt32();
+ public boolean locked;
+ public DiscordLobby() {super();} public DiscordLobby(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordLobby implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordLobby implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("id", "type", "owner_id", "secret", "capacity", "locked");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java
new file mode 100644
index 00000000..937b23de
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordOAuth2Token.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordTimestamp;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordOAuth2Token extends DiscordStruct {
+ public byte[] access_token = new byte[128];
+ public byte[] scopes = new byte[1024];
+ public DiscordTimestamp expires = new DiscordTimestamp();
+ public DiscordOAuth2Token() {super();} public DiscordOAuth2Token(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordOAuth2Token implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordOAuth2Token implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("access_token", "scopes", "expires");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java
new file mode 100644
index 00000000..522efeaa
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPartySize.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordPartySize extends DiscordStruct{
+ public Int32 current_size = new Int32();
+ public Int32 max_size = new Int32();
+ public DiscordPartySize() {super();} public DiscordPartySize(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordPartySize implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordPartySize implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("current_size", "max_size");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java
new file mode 100644
index 00000000..b5fc0f0e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordPresence.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordStatus;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordPresence extends DiscordStruct {
+ public EDiscordStatus status = EDiscordStatus.DiscordStatus_Offline;
+ public DiscordActivity activity;
+ public DiscordPresence() {super();} public DiscordPresence(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordPresence implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordPresence implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("status", "activity");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java
new file mode 100644
index 00000000..4115e684
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordRelationship.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordRelationship extends DiscordStruct {
+ public EDiscordRelationshipType type = EDiscordRelationshipType.DiscordRelationshipType_None;
+ public DiscordUser user;
+ public DiscordPresence presence;
+ public DiscordRelationship() {super();} public DiscordRelationship(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordRelationship implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordRelationship implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("type", "user", "presence");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java
new file mode 100644
index 00000000..bfd90e22
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSku.java
@@ -0,0 +1,44 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordSkuType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+
+public class DiscordSku extends DiscordStruct {
+ public DiscordSnowflake id = new DiscordSnowflake();
+ public EDiscordSkuType type = EDiscordSkuType.DiscordSkuType_Application;
+ public byte[] name = new byte[256];
+ public DiscordSkuPrice discordSkuPrice;
+ public DiscordSku() {super();} public DiscordSku(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordSku implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordSku implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("id", "type", "name", "discordSkuPrice");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java
new file mode 100644
index 00000000..c69ca97a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordSkuPrice.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordSkuPrice extends DiscordStruct {
+ public UInt32 amount = new UInt32();
+ public byte[] currency = new byte[16];
+ public DiscordSkuPrice() {super();} public DiscordSkuPrice(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordSkuPrice implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordSkuPrice implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("amount", "currency");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java
new file mode 100644
index 00000000..12292692
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordStruct.java
@@ -0,0 +1,35 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Library;
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
+
+import java.util.Collections;
+import java.util.Map;
+
+public abstract class DiscordStruct extends Structure {
+ public static final Map OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE);
+ protected DiscordStruct() {
+ super(GameSDKTypeMapper.INSTANCE);
+ }
+ protected DiscordStruct(Pointer p) {super(p); read();}
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java
new file mode 100644
index 00000000..3db714dc
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUser.java
@@ -0,0 +1,43 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordUser extends DiscordStruct {
+ public DiscordSnowflake id = new DiscordSnowflake();
+ public byte[] username = new byte[256];
+ public byte[] discriminator = new byte[8];
+ public byte[] avatar = new byte[128];
+ public boolean bot;
+ public DiscordUser() {super();} public DiscordUser(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordUser implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordUser implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("id", "username", "discriminator", "avatar", "bot");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java
new file mode 100644
index 00000000..db13ab77
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/datastruct/DiscordUserAchievement.java
@@ -0,0 +1,44 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DiscordUserAchievement extends DiscordStruct {
+ public DiscordSnowflake user_id = new DiscordSnowflake();
+ public DiscordSnowflake achievement_id = new DiscordSnowflake();
+ public UInt32 percent_complete = new UInt32();
+ public byte[] unlocked_at = new byte[64];
+ public DiscordUserAchievement() {super();} public DiscordUserAchievement(Pointer pointer) {super(pointer);}
+
+ public static class ByReference extends DiscordUserAchievement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends DiscordUserAchievement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override
+ protected List getFieldOrder() {
+ return Arrays.asList("user_id", "achievement_id", "percent_complete", "unlocked_at");
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java
new file mode 100644
index 00000000..9004c339
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityActionType.java
@@ -0,0 +1,67 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordActivityActionType {
+ DiscordActivityActionType_Join(1),
+ DiscordActivityActionType_Spectate(2);
+
+ @Getter
+ private final int value;
+ private EDiscordActivityActionType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordActivityActionType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordActivityActionType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordActivityActionTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordActivityActionType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordActivityActionType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java
new file mode 100644
index 00000000..43f0c0ef
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java
@@ -0,0 +1,68 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordActivityJoinRequestReply {
+ DiscordActivityJoinRequestReply_No(0),
+ DiscordActivityJoinRequestReply_Yes(1),
+ DiscordActivityJoinRequestReply_Ignore(2);
+
+ @Getter
+ private final int value;
+ private EDiscordActivityJoinRequestReply(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordActivityJoinRequestReply value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordActivityJoinRequestReply fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordActivityJoinRequestReplyTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordActivityJoinRequestReply.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordActivityJoinRequestReply)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java
new file mode 100644
index 00000000..7ed2ec54
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordActivityType.java
@@ -0,0 +1,69 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordActivityType {
+ DiscordActivityType_Playing(0),
+ DiscordActivityType_Streaming(1),
+ DiscordActivityType_Listening(2),
+ DiscordActivityType_Watching(3);
+
+ @Getter
+ private final int value;
+ private EDiscordActivityType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordActivityType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordActivityType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordActivityTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordActivityType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordActivityType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java
new file mode 100644
index 00000000..60606213
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordCreateFlags.java
@@ -0,0 +1,67 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordCreateFlags {
+ DiscordCreateFlags_Default(0),
+ DiscordCreateFlags_NoRequireDiscord(1);
+
+ @Getter
+ private final int value;
+ private EDiscordCreateFlags(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordCreateFlags value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordCreateFlags fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordCreateFlagsTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordCreateFlags.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordCreateFlags)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java
new file mode 100644
index 00000000..85150f0a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordEntitlementType.java
@@ -0,0 +1,72 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordEntitlementType {
+ DiscordEntitlementType_Purchase(1),
+ DiscordEntitlementType_PremiumSubscription(2),
+ DiscordEntitlementType_DeveloperGift(3),
+ DiscordEntitlementType_TestModePurchase(4),
+ DiscordEntitlementType_FreePurchase(5),
+ DiscordEntitlementType_UserGift(6),
+ DiscordEntitlementType_PremiumPurchase(7);
+
+ @Getter
+ private final int value;
+ private EDiscordEntitlementType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordEntitlementType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordEntitlementType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordEntitlementTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordEntitlementType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordEntitlementType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java
new file mode 100644
index 00000000..f516e1a9
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordImageType.java
@@ -0,0 +1,66 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordImageType {
+ DiscordImageType_User(0);
+
+ @Getter
+ private final int value;
+ private EDiscordImageType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordImageType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordImageType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordImageTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordImageType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+
+ if (value == null) return 0;return ((EDiscordImageType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java
new file mode 100644
index 00000000..aeba1c22
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordInputModeType.java
@@ -0,0 +1,67 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordInputModeType {
+ DiscordInputModeType_VoiceActivity(0),
+ DiscordInputModeType_PushToTalk(1);
+
+ @Getter
+ private final int value;
+ private EDiscordInputModeType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordInputModeType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordInputModeType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordInputModeTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordInputModeType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordInputModeType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java
new file mode 100644
index 00000000..d2c78f39
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java
@@ -0,0 +1,67 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordLobbySearchCast {
+ DiscordLobbySearchCast_String(1),
+ DiscordLobbySearchCast_Number(2);
+
+ @Getter
+ private final int value;
+ private EDiscordLobbySearchCast(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordLobbySearchCast value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordLobbySearchCast fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordLobbySearchCastTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordLobbySearchCast.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordLobbySearchCast)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java
new file mode 100644
index 00000000..9a8819d4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java
@@ -0,0 +1,71 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordLobbySearchComparison {
+ DiscordLobbySearchComparison_LessThanOrEqual(-2),
+ DiscordLobbySearchComparison_LessThan(-1),
+ DiscordLobbySearchComparison_Equal(0),
+ DiscordLobbySearchComparison_GreaterThan(1),
+ DiscordLobbySearchComparison_GreaterThanOrEqual(2),
+ DiscordLobbySearchComparison_NotEqual(3);
+
+ @Getter
+ private final int value;
+ private EDiscordLobbySearchComparison(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordLobbySearchComparison value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordLobbySearchComparison fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordLobbySearchComparisonTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordLobbySearchComparison.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordLobbySearchComparison)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java
new file mode 100644
index 00000000..5e4927ee
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java
@@ -0,0 +1,69 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordLobbySearchDistance {
+ DiscordLobbySearchDistance_Local(0),
+ DiscordLobbySearchDistance_Default(1),
+ DiscordLobbySearchDistance_Extended(2),
+ DiscordLobbySearchDistance_Global(3);
+
+ @Getter
+ private final int value;
+ private EDiscordLobbySearchDistance(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordLobbySearchDistance value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordLobbySearchDistance fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordLobbySearchDistanceTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordLobbySearchDistance.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordLobbySearchDistance)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java
new file mode 100644
index 00000000..62b7c154
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLobbyType.java
@@ -0,0 +1,67 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordLobbyType {
+ DiscordLobbyType_Private(1),
+ DiscordLobbyType_Public(2);
+
+ @Getter
+ private final int value;
+ private EDiscordLobbyType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordLobbyType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordLobbyType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordLobbyTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordLobbyType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+
+ if (value == null) return 0;return ((EDiscordLobbyType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java
new file mode 100644
index 00000000..8487a0e6
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordLogLevel.java
@@ -0,0 +1,69 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordLogLevel {
+ DiscordLogLevel_Error(1),
+ DiscordLogLevel_Warn(2),
+ DiscordLogLevel_Info(3),
+ DiscordLogLevel_Debug(4);
+
+ @Getter
+ private final int value;
+ private EDiscordLogLevel(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordLogLevel value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordLogLevel fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordLogLevelTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordLogLevel.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+
+ if (value == null) return 0;return ((EDiscordLogLevel)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java
new file mode 100644
index 00000000..139264b1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordPremiumType.java
@@ -0,0 +1,68 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordPremiumType {
+ DiscordPremiumType_None(0),
+ DiscordPremiumType_Tier1(1),
+ DiscordPremiumType_Tier2(2);
+
+ @Getter
+ private final int value;
+ private EDiscordPremiumType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordPremiumType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordPremiumType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordPremiumTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordPremiumType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordPremiumType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java
new file mode 100644
index 00000000..ddc5cadb
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordRelationshipType.java
@@ -0,0 +1,71 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordRelationshipType {
+ DiscordRelationshipType_None(0),
+ DiscordRelationshipType_Friend(1),
+ DiscordRelationshipType_Blocked(2),
+ DiscordRelationshipType_PendingIncoming(3),
+ DiscordRelationshipType_PendingOutgoing(4),
+ DiscordRelationshipType_Implicit(5);
+
+ @Getter
+ private final int value;
+ private EDiscordRelationshipType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordRelationshipType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordRelationshipType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordRelationshipTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordRelationshipType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordRelationshipType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java
new file mode 100644
index 00000000..9447fc58
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordResult.java
@@ -0,0 +1,109 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordResult {
+ DiscordResult_Ok(0),
+ DiscordResult_ServiceUnavailable(1),
+ DiscordResult_InvalidVersion(2),
+ DiscordResult_LockFailed(3),
+ DiscordResult_InternalError(4),
+ DiscordResult_InvalidPayload(5),
+ DiscordResult_InvalidCommand(6),
+ DiscordResult_InvalidPermissions(7),
+ DiscordResult_NotFetched(8),
+ DiscordResult_NotFound(9),
+ DiscordResult_Conflict(10),
+ DiscordResult_InvalidSecret(11),
+ DiscordResult_InvalidJoinSecret(12),
+ DiscordResult_NoEligibleActivity(13),
+ DiscordResult_InvalidInvite(14),
+ DiscordResult_NotAuthenticated(15),
+ DiscordResult_InvalidAccessToken(16),
+ DiscordResult_ApplicationMismatch(17),
+ DiscordResult_InvalidDataUrl(18),
+ DiscordResult_InvalidBase64(19),
+ DiscordResult_NotFiltered(20),
+ DiscordResult_LobbyFull(21),
+ DiscordResult_InvalidLobbySecret(22),
+ DiscordResult_InvalidFilename(23),
+ DiscordResult_InvalidFileSize(24),
+ DiscordResult_InvalidEntitlement(25),
+ DiscordResult_NotInstalled(26),
+ DiscordResult_NotRunning(27),
+ DiscordResult_InsufficientBuffer(28),
+ DiscordResult_PurchaseCanceled(29),
+ DiscordResult_InvalidGuild(30),
+ DiscordResult_InvalidEvent(31),
+ DiscordResult_InvalidChannel(32),
+ DiscordResult_InvalidOrigin(33),
+ DiscordResult_RateLimited(34),
+ DiscordResult_OAuth2Error(35),
+ DiscordResult_SelectChannelTimeout(36),
+ DiscordResult_GetGuildTimeout(37),
+ DiscordResult_SelectVoiceForceRequired(38),
+ DiscordResult_CaptureShortcutAlreadyListening(39),
+ DiscordResult_UnauthorizedForAchievement(40),
+ DiscordResult_InvalidGiftCode(41),
+ DiscordResult_PurchaseError(42),
+ DiscordResult_TransactionAborted(43);
+
+ @Getter
+ private final int value;
+ private EDiscordResult(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordResult value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordResult fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordResultTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordResult.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordResult)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java
new file mode 100644
index 00000000..69442f2d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordSkuType.java
@@ -0,0 +1,69 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordSkuType {
+ DiscordSkuType_Application(1),
+ DiscordSkuType_DLC(2),
+ DiscordSkuType_Consumable(3),
+ DiscordSkuType_Bundle(4);
+
+ @Getter
+ private final int value;
+ private EDiscordSkuType(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordSkuType value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordSkuType fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordSkuTypeTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordSkuType.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+
+ if (value == null) return 0;return ((EDiscordSkuType)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java
new file mode 100644
index 00000000..0ef1892e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordStatus.java
@@ -0,0 +1,69 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordStatus {
+ DiscordStatus_Offline(0),
+ DiscordStatus_Online(1),
+ DiscordStatus_Idle(2),
+ DiscordStatus_DoNotDisturb(3);
+
+ @Getter
+ private final int value;
+ private EDiscordStatus(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordStatus value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordStatus fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordStatusTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordStatus.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+
+ if (value == null) return 0;return ((EDiscordStatus)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java
new file mode 100644
index 00000000..1ba8f40f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/enumuration/EDiscordUserFlag.java
@@ -0,0 +1,70 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration;
+
+import com.sun.jna.FromNativeContext;
+import com.sun.jna.ToNativeContext;
+import com.sun.jna.TypeConverter;
+import lombok.Getter;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum EDiscordUserFlag {
+ DiscordUserFlag_Partner(2),
+ DiscordUserFlag_HypeSquadEvents(4),
+ DiscordUserFlag_HypeSquadHouse1(64),
+ DiscordUserFlag_HypeSquadHouse2(128),
+ DiscordUserFlag_HypeSquadHouse3(256);
+
+ @Getter
+ private final int value;
+ private EDiscordUserFlag(int value) {
+ this.value = value;
+ }
+
+ private static final Map valueMap = new HashMap<>();
+ static {
+ for (EDiscordUserFlag value : values()) {
+ valueMap.put(value.value, value);
+ }
+ }
+
+ public static EDiscordUserFlag fromValue(int value) {
+ return valueMap.get(value);
+ }
+
+ public static class EDiscordUserFlagTypeConverter implements TypeConverter {
+ @Override
+ public Object fromNative(Object nativeValue, FromNativeContext context) {
+ return EDiscordUserFlag.fromValue((Integer)nativeValue);
+ }
+
+ @Override
+ public Object toNative(Object value, ToNativeContext context) {
+ if (value == null) return 0;
+ return ((EDiscordUserFlag)value).getValue();
+ }
+
+ @Override
+ public Class nativeType() {
+ return Integer.class;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java
new file mode 100644
index 00000000..e997e699
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/GameSDKCallback.java
@@ -0,0 +1,30 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Callback;
+import com.sun.jna.Library;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
+
+import java.util.Collections;
+import java.util.Map;
+
+public interface GameSDKCallback extends Callback {
+ public static final Map OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE);
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java
new file mode 100644
index 00000000..a75e0186
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUserAchievement;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordAchievementEvents extends DiscordStruct { public IDiscordAchievementEvents() {super();} public IDiscordAchievementEvents(Pointer pointer) {super(pointer);}
+ public interface OnUserAchievementUpdateCallback extends GameSDKCallback { void onUserAchievementUpdate(Pointer eventData, DiscordUserAchievement userAchievement); }
+ public OnUserAchievementUpdateCallback OnUserAchievementUpdate;
+
+
+
+ public static class ByReference extends IDiscordAchievementEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordAchievementEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnUserAchievementUpdate"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java
new file mode 100644
index 00000000..40d37327
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java
@@ -0,0 +1,57 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUserAchievement;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordAchievementManager extends DiscordStruct { public IDiscordAchievementManager() {super();} public IDiscordAchievementManager(Pointer pointer) {super(pointer);}
+ public interface SetUserAchievementCallback extends GameSDKCallback { void setUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake achievementId, UInt8 percentComplete, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SetUserAchievementCallback SetUserAchievement;
+
+ public interface FetchUserAchievementsCallback extends GameSDKCallback { void fetchUserAchievements(IDiscordAchievementManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public FetchUserAchievementsCallback FetchUserAchievements;
+
+ public interface CountUserAchievementsCallback extends GameSDKCallback { void countUserAchievements(IDiscordAchievementManager manager, IntByReference count); }
+ public CountUserAchievementsCallback CountUserAchievements;
+
+ public interface GetUserAchievementCallback extends GameSDKCallback { EDiscordResult getUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake userAchievementId, DiscordUserAchievement userAchievement); }
+ public GetUserAchievementCallback GetUserAchievement;
+
+ public interface GetUserAchievementAtCallback extends GameSDKCallback { EDiscordResult getUserAchievementAt(IDiscordAchievementManager manager, Int32 index, DiscordUserAchievement userAchievement); }
+ public GetUserAchievementAtCallback GetUserAchievementAt;
+
+
+
+ public static class ByReference extends IDiscordAchievementManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordAchievementManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("SetUserAchievement", "FetchUserAchievements", "CountUserAchievements", "GetUserAchievement", "GetUserAchievementAt"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java
new file mode 100644
index 00000000..d340e544
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java
@@ -0,0 +1,50 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordActivityEvents extends DiscordStruct { public IDiscordActivityEvents() {super();} public IDiscordActivityEvents(Pointer pointer) {super(pointer);}
+ public interface OnActivityJoinCallback extends GameSDKCallback { void onActivityJoin(Pointer eventData, String secret); }
+ public OnActivityJoinCallback OnActivityJoin;
+
+ public interface OnActivitySpectateCallback extends GameSDKCallback { void onActivitySpectate(Pointer eventData, String secret); }
+ public OnActivitySpectateCallback OnActivitySpectate;
+
+ public interface OnActivityJoinRequestCallback extends GameSDKCallback { void onActivityJoinRequest(Pointer eventData, DiscordUser user); }
+ public OnActivityJoinRequestCallback OnActivityJoinRequest;
+
+ public interface OnActivityInviteCallback extends GameSDKCallback { void onActivityInvite(Pointer eventData, EDiscordActivityActionType type, DiscordUser user, DiscordActivity activity); }
+ public OnActivityInviteCallback OnActivityInvite;
+
+
+
+ public static class ByReference extends IDiscordActivityEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordActivityEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnActivityJoin", "OnActivitySpectate", "OnActivityJoinRequest", "OnActivityInvite"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java
new file mode 100644
index 00000000..2cab2538
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordActivityManager.java
@@ -0,0 +1,63 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityJoinRequestReply;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordActivityManager extends DiscordStruct { public IDiscordActivityManager() {super();} public IDiscordActivityManager(Pointer pointer) {super(pointer);}
+ public interface RegisterCommandCallback extends GameSDKCallback { EDiscordResult registerCommand(IDiscordActivityManager manager, String command); }
+ public RegisterCommandCallback RegisterCommand;
+
+ public interface RegisterSteamCallback extends GameSDKCallback { EDiscordResult registerSteam(IDiscordActivityManager manager, UInt32 steamId); }
+ public RegisterSteamCallback RegisterSteam;
+
+ public interface UpdateActivityCallback extends GameSDKCallback { void updateActivity(IDiscordActivityManager manager, DiscordActivity activity, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public UpdateActivityCallback UpdateActivity;
+
+ public interface ClearActivityCallback extends GameSDKCallback { void clearActivity(IDiscordActivityManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public ClearActivityCallback ClearActivity;
+
+ public interface SendRequestReplyCallback extends GameSDKCallback { void sendRequestReply(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityJoinRequestReply reply, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SendRequestReplyCallback SendRequestReply;
+
+ public interface SendInviteCallback extends GameSDKCallback { void sendInvite(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityActionType type, String content, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SendInviteCallback SendInvite;
+
+ public interface AcceptInviteCallback extends GameSDKCallback { void acceptInvite(IDiscordActivityManager manager, DiscordSnowflake userId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public AcceptInviteCallback AcceptInvite;
+
+
+
+ public static class ByReference extends IDiscordActivityManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordActivityManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("RegisterCommand", "RegisterSteam", "UpdateActivity", "ClearActivity", "SendRequestReply", "SendInvite", "AcceptInvite"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java
new file mode 100644
index 00000000..ff07aec8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java
@@ -0,0 +1,60 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordOAuth2Token;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordApplicationManager extends DiscordStruct { public IDiscordApplicationManager() {super();} public IDiscordApplicationManager(Pointer pointer) {super(pointer);}
+ public interface ValidateOrExitCallback extends GameSDKCallback { void validateOrExit(IDiscordApplicationManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public ValidateOrExitCallback ValidateOrExit;
+
+ public interface GetCurrentLocaleCallback extends GameSDKCallback { void getCurrentLocale(IDiscordApplicationManager manager, Pointer locale); } // len 128 memory
+ public GetCurrentLocaleCallback GetCurrentLocale;
+
+ public interface GetCurrentBranchCallback extends GameSDKCallback { void getCurrentBranch(IDiscordApplicationManager manager, Pointer branch); } // len 4096 mem
+ public GetCurrentBranchCallback GetCurrentBranch;
+
+ public interface GetOauth2TokenCallback extends GameSDKCallback { void getOauth2Token(IDiscordApplicationManager manager, Pointer callbackData, GetOauth2TokenCallback_Callback callback); }
+ public interface GetOauth2TokenCallback_Callback extends GameSDKCallback {
+ void callback(Pointer callbackData, EDiscordResult result, DiscordOAuth2Token oauthToken);
+ }
+
+ public GetOauth2TokenCallback GetOauth2Token;
+
+ public interface GetTicketCallback extends GameSDKCallback { void getTicket(IDiscordApplicationManager manager, Pointer callbackData, GetTicketCallback_Callback callback); }
+ public interface GetTicketCallback_Callback extends GameSDKCallback {
+ void callback(Pointer callbackData, EDiscordResult result, String data);
+ }
+ public GetTicketCallback GetTicket;
+
+
+
+ public static class ByReference extends IDiscordApplicationManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordApplicationManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("ValidateOrExit", "GetCurrentLocale", "GetCurrentBranch", "GetOauth2Token", "GetTicket"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java
new file mode 100644
index 00000000..95e4ad16
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordCore.java
@@ -0,0 +1,91 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.TypeMapper;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.GameSDKTypeMapper;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLogLevel;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordCore extends DiscordStruct { public IDiscordCore() {super();} public IDiscordCore(Pointer pointer) {super(pointer);}
+
+ public static final TypeMapper TYPE_MAPPER = GameSDKTypeMapper.INSTANCE;
+ public interface DestroyCallback extends GameSDKCallback { void destroy(IDiscordCore core); }
+ public DestroyCallback Destroy;
+
+ public interface RunCallbacksCallback extends GameSDKCallback { EDiscordResult runCallbacks(IDiscordCore core); }
+ public RunCallbacksCallback RunCallbacks;
+
+ public interface SetLogHookCallback extends GameSDKCallback { void setLogHook(IDiscordCore core, EDiscordLogLevel minLevel, Pointer hookData, LogHook hook); }
+ public interface LogHook extends GameSDKCallback {
+ void hook(Pointer hookData, EDiscordLogLevel level, String message);
+ }
+ public SetLogHookCallback SetLogHook;
+
+ public interface GetApplicationManagerCallback extends GameSDKCallback { IDiscordApplicationManager getApplicationManager(IDiscordCore core); }
+ public GetApplicationManagerCallback GetApplicationManager;
+
+ public interface GetUserManagerCallback extends GameSDKCallback { IDiscordUserManager getUserManager(IDiscordCore core); }
+ public GetUserManagerCallback GetUserManager;
+
+ public interface GetImageManagerCallback extends GameSDKCallback { IDiscordImageManager getImageManager(IDiscordCore core); }
+ public GetImageManagerCallback GetImageManager;
+
+ public interface GetActivityManagerCallback extends GameSDKCallback { IDiscordActivityManager getActivityManager(IDiscordCore core); }
+ public GetActivityManagerCallback GetActivityManager;
+
+ public interface GetRelationshipManagerCallback extends GameSDKCallback { IDiscordRelationshipManager getRelationshipManager(IDiscordCore core); }
+ public GetRelationshipManagerCallback GetRelationshipManager;
+
+ public interface GetLobbyManagerCallback extends GameSDKCallback { IDiscordLobbyManager getLobbyManager(IDiscordCore core); }
+ public GetLobbyManagerCallback GetLobbyManager;
+
+ public interface GetNetworkManagerCallback extends GameSDKCallback { IDiscordNetworkManager getNetworkManager(IDiscordCore core); }
+ public GetNetworkManagerCallback GetNetworkManager;
+
+ public interface GetOverlayManagerCallback extends GameSDKCallback { IDiscordOverlayManager getOverlayManager(IDiscordCore core); }
+ public GetOverlayManagerCallback GetOverlayManager;
+
+ public interface GetStorageManagerCallback extends GameSDKCallback { IDiscordStorageManager getStorageManager(IDiscordCore core); }
+ public GetStorageManagerCallback GetStorageManager;
+
+ public interface GetStoreManagerCallback extends GameSDKCallback { IDiscordStoreManager getStoreManager(IDiscordCore core); }
+ public GetStoreManagerCallback GetStoreManager;
+
+ public interface GetVoiceManagerCallback extends GameSDKCallback { IDiscordVoiceManager getVoiceManager(IDiscordCore core); }
+ public GetVoiceManagerCallback GetVoiceManager;
+
+ public interface GetAchievementManagerCallback extends GameSDKCallback { IDiscordAchievementManager getAchievementManager(IDiscordCore core); }
+ public GetAchievementManagerCallback GetAchievementManager;
+
+
+
+ public static class ByReference extends IDiscordCore implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}
+ }
+ public static class ByValue extends IDiscordCore implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}
+ }
+
+ @Override protected List getFieldOrder() { return Arrays.asList("Destroy", "RunCallbacks", "SetLogHook", "GetApplicationManager", "GetUserManager", "GetImageManager", "GetActivityManager", "GetRelationshipManager", "GetLobbyManager", "GetNetworkManager", "GetOverlayManager", "GetStorageManager", "GetStoreManager", "GetVoiceManager", "GetAchievementManager"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java
new file mode 100644
index 00000000..208f6cec
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordImageManager.java
@@ -0,0 +1,52 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordImageDimensions;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordImageHandle;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordImageManager extends DiscordStruct { public IDiscordImageManager() {super();} public IDiscordImageManager(Pointer pointer) {super(pointer);}
+ public interface FetchCallback_Callback extends GameSDKCallback {
+ void callback(Pointer callbackData, EDiscordResult result, DiscordImageHandle.ByValue handleResult);
+ }
+ public interface FetchCallback extends GameSDKCallback { void fetch(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, boolean refresh, Pointer callbackData, FetchCallback_Callback callback); }
+ public FetchCallback Fetch;
+
+ public interface GetDimensionsCallback extends GameSDKCallback { EDiscordResult getDimensions(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, DiscordImageDimensions dimensions); }
+ public GetDimensionsCallback GetDimensions;
+
+ public interface GetDataCallback extends GameSDKCallback { EDiscordResult getData(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, ByteBuffer data, UInt32 dataLength); }
+ public GetDataCallback GetData;
+
+
+
+ public static class ByReference extends IDiscordImageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordImageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("Fetch", "GetDimensions", "GetData"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java
new file mode 100644
index 00000000..72ee2293
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java
@@ -0,0 +1,64 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int64;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordLobbyEvents extends DiscordStruct { public IDiscordLobbyEvents() {super();} public IDiscordLobbyEvents(Pointer pointer) {super(pointer);}
+ public interface OnLobbyUpdateCallback extends GameSDKCallback { void onLobbyUpdate(Pointer eventData, Int64 lobbyId); }
+ public OnLobbyUpdateCallback OnLobbyUpdate;
+
+ public interface OnLobbyDeleteCallback extends GameSDKCallback { void onLobbyDelete(Pointer eventData, Int64 lobbyId, UInt32 reason); }
+ public OnLobbyDeleteCallback OnLobbyDelete;
+
+ public interface OnMemberConnectCallback extends GameSDKCallback { void onMemberConnect(Pointer eventData, Int64 lobbyId, Int64 userId); }
+ public OnMemberConnectCallback OnMemberConnect;
+
+ public interface OnMemberUpdateCallback extends GameSDKCallback { void onMemberUpdate(Pointer eventData, Int64 lobbyId, Int64 userId); }
+ public OnMemberUpdateCallback OnMemberUpdate;
+
+ public interface OnMemberDisconnectCallback extends GameSDKCallback { void onMemberDisconnect(Pointer eventData, Int64 lobbyId, Int64 userId); }
+ public OnMemberDisconnectCallback OnMemberDisconnect;
+
+ public interface OnLobbyMessageCallback extends GameSDKCallback { void onLobbyMessage(Pointer eventData, Int64 lobbyId, Int64 userId, ByteByReference data, UInt32 dataLength); }
+ public OnLobbyMessageCallback OnLobbyMessage;
+
+ public interface OnSpeakingCallback extends GameSDKCallback { void onSpeaking(Pointer eventData, Int64 lobbyId, Int64 userId, boolean speaking); }
+ public OnSpeakingCallback OnSpeaking;
+
+ public interface OnNetworkMessageCallback extends GameSDKCallback { void onNetworkMessage(Pointer eventData, Int64 lobbyId, Int64 userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); }
+ public OnNetworkMessageCallback OnNetworkMessage;
+
+
+
+ public static class ByReference extends IDiscordLobbyEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordLobbyEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnLobbyUpdate", "OnLobbyDelete", "OnMemberConnect", "OnMemberUpdate", "OnMemberDisconnect", "OnLobbyMessage", "OnSpeaking", "OnNetworkMessage"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java
new file mode 100644
index 00000000..08bfba44
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java
@@ -0,0 +1,148 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordLobby;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordLobbyManager extends DiscordStruct { public IDiscordLobbyManager() {super();} public IDiscordLobbyManager(Pointer pointer) {super(pointer);}
+ public interface GetLobbyCreateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyCreateTransaction(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction); }
+ public GetLobbyCreateTransactionCallback GetLobbyCreateTransaction;
+
+ public interface GetLobbyUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction); }
+ public GetLobbyUpdateTransactionCallback GetLobbyUpdateTransaction;
+
+ public interface GetMemberUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getMemberUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction); }
+ public GetMemberUpdateTransactionCallback GetMemberUpdateTransaction;
+
+ public interface DiscordLobbyManagerCallback extends GameSDKCallback {
+ void callback(Pointer callbackData, EDiscordResult result, DiscordLobby lobby);
+ }
+
+ public interface CreateLobbyCallback extends GameSDKCallback { void createLobby(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction, Pointer callbackData,DiscordLobbyManagerCallback callback); }
+ public CreateLobbyCallback CreateLobby;
+
+ public interface UpdateLobbyCallback extends GameSDKCallback { void updateLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public UpdateLobbyCallback UpdateLobby;
+
+ public interface DeleteLobbyCallback extends GameSDKCallback { void deleteLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public DeleteLobbyCallback DeleteLobby;
+
+ public interface ConnectLobbyCallback extends GameSDKCallback { void connectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret, Pointer callbackData, DiscordLobbyManagerCallback callback); }// secret 128 byte long str
+ public ConnectLobbyCallback ConnectLobby;
+
+ public interface ConnectLobbyWithActivitySecretCallback extends GameSDKCallback { void connectLobbyWithActivitySecret(IDiscordLobbyManager manager, Pointer activitySecret, Pointer callbackData, DiscordLobbyManagerCallback callback); } // secret 128 byte long str
+ public ConnectLobbyWithActivitySecretCallback ConnectLobbyWithActivitySecret;
+
+ public interface DisconnectLobbyCallback extends GameSDKCallback { void disconnectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public DisconnectLobbyCallback DisconnectLobby;
+
+ public interface GetLobbyCallback extends GameSDKCallback { EDiscordResult getLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordLobby lobby); }
+ public GetLobbyCallback GetLobby;
+
+ public interface GetLobbyActivitySecretCallback extends GameSDKCallback { EDiscordResult getLobbyActivitySecret(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret); } // pointer to char[128]
+ public GetLobbyActivitySecretCallback GetLobbyActivitySecret;
+
+ public interface GetLobbyMetadataValueCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer key, Pointer value); } // key: char[256] value: pointer to char[4096]
+ public GetLobbyMetadataValueCallback GetLobbyMetadataValue;
+
+ public interface GetLobbyMetadataKeyCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer key); }// key: pointer to char[256]
+ public GetLobbyMetadataKeyCallback GetLobbyMetadataKey;
+
+ public interface LobbyMetadataCountCallback extends GameSDKCallback { EDiscordResult lobbyMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); }
+ public LobbyMetadataCountCallback LobbyMetadataCount;
+
+ public interface MemberCountCallback extends GameSDKCallback { EDiscordResult memberCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); }
+ public MemberCountCallback MemberCount;
+
+ public interface GetMemberUserIdCallback extends GameSDKCallback { EDiscordResult getMemberUserId(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer userId); } // userID: pointer to DiscordUserID
+ public GetMemberUserIdCallback GetMemberUserId;
+
+ public interface GetMemberUserCallback extends GameSDKCallback { EDiscordResult getMemberUser(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, DiscordUser user); }
+ public GetMemberUserCallback GetMemberUser;
+
+ public interface GetMemberMetadataValueCallback extends GameSDKCallback { EDiscordResult getMemberMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Pointer key, Pointer value); }// key: char[256] value: pointer to char[4096]
+ public GetMemberMetadataValueCallback GetMemberMetadataValue;
+
+ public interface GetMemberMetadataKeyCallback extends GameSDKCallback { EDiscordResult getMemberMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Int32 index, Pointer key); }// key: pointer to char[256]
+ public GetMemberMetadataKeyCallback GetMemberMetadataKey;
+
+ public interface MemberMetadataCountCallback extends GameSDKCallback { EDiscordResult memberMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IntByReference count); }
+ public MemberMetadataCountCallback MemberMetadataCount;
+
+ public interface UpdateMemberCallback extends GameSDKCallback { void updateMember(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public UpdateMemberCallback UpdateMember;
+
+ public interface SendLobbyMessageCallback extends GameSDKCallback { void sendLobbyMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SendLobbyMessageCallback SendLobbyMessage;
+
+ public interface GetSearchQueryCallback extends GameSDKCallback { EDiscordResult getSearchQuery(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query); }
+ public GetSearchQueryCallback GetSearchQuery;
+
+ public interface SearchCallback extends GameSDKCallback { void search(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SearchCallback Search;
+
+ public interface LobbyCountCallback extends GameSDKCallback { void lobbyCount(IDiscordLobbyManager manager, IntByReference count); }
+ public LobbyCountCallback LobbyCount;
+
+ public interface GetLobbyIdCallback extends GameSDKCallback { EDiscordResult getLobbyId(IDiscordLobbyManager manager, Int32 index, Pointer lobbyId); } // lobbyID: Pointer to DiscordSnowflake
+ public GetLobbyIdCallback GetLobbyId;
+
+ public interface ConnectVoiceCallback extends GameSDKCallback { void connectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public ConnectVoiceCallback ConnectVoice;
+
+ public interface DisconnectVoiceCallback extends GameSDKCallback { void disconnectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public DisconnectVoiceCallback DisconnectVoice;
+
+ public interface ConnectNetworkCallback extends GameSDKCallback { EDiscordResult connectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); }
+ public ConnectNetworkCallback ConnectNetwork;
+
+ public interface DisconnectNetworkCallback extends GameSDKCallback { EDiscordResult disconnectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); }
+ public DisconnectNetworkCallback DisconnectNetwork;
+
+ public interface FlushNetworkCallback extends GameSDKCallback { EDiscordResult flushNetwork(IDiscordLobbyManager manager); }
+ public FlushNetworkCallback FlushNetwork;
+
+ public interface OpenNetworkChannelCallback extends GameSDKCallback { EDiscordResult openNetworkChannel(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, UInt8 channelId, boolean reliable); }
+ public OpenNetworkChannelCallback OpenNetworkChannel;
+
+ public interface SendNetworkMessageCallback extends GameSDKCallback { EDiscordResult sendNetworkMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); }
+ public SendNetworkMessageCallback SendNetworkMessage;
+
+
+
+ public static class ByReference extends IDiscordLobbyManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordLobbyManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("GetLobbyCreateTransaction", "GetLobbyUpdateTransaction", "GetMemberUpdateTransaction", "CreateLobby", "UpdateLobby", "DeleteLobby", "ConnectLobby", "ConnectLobbyWithActivitySecret", "DisconnectLobby", "GetLobby", "GetLobbyActivitySecret", "GetLobbyMetadataValue", "GetLobbyMetadataKey", "LobbyMetadataCount", "MemberCount", "GetMemberUserId", "GetMemberUser", "GetMemberMetadataValue", "GetMemberMetadataKey", "MemberMetadataCount", "UpdateMember", "SendLobbyMessage", "GetSearchQuery", "Search", "LobbyCount", "GetLobbyId", "ConnectVoice", "DisconnectVoice", "ConnectNetwork", "DisconnectNetwork", "FlushNetwork", "OpenNetworkChannel", "SendNetworkMessage"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java
new file mode 100644
index 00000000..43834182
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordLobbyMemberTransaction extends DiscordStruct { public IDiscordLobbyMemberTransaction() {super();} public IDiscordLobbyMemberTransaction(Pointer pointer) {super(pointer);}
+ public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key, Pointer value); } // key is 256 bytes, value is 4096
+ public SetMetadataCallback SetMetadata;
+
+ public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key); } // key is 256 bytes, passed by reference
+ public DeleteMetadataCallback DeleteMetadata;
+
+
+
+ public static class ByReference extends IDiscordLobbyMemberTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordLobbyMemberTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("SetMetadata", "DeleteMetadata"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java
new file mode 100644
index 00000000..83019eb6
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java
@@ -0,0 +1,52 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchComparison;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchDistance;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbySearchCast;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordLobbySearchQuery extends DiscordStruct { public IDiscordLobbySearchQuery() {super();} public IDiscordLobbySearchQuery(Pointer pointer) {super(pointer);}
+ public interface FilterCallback extends GameSDKCallback { EDiscordResult filter(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchComparison comparison, EDiscordLobbySearchCast cast, Pointer value); }
+ public FilterCallback Filter;
+
+ public interface SortCallback extends GameSDKCallback { EDiscordResult sort(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchCast cast, Pointer value); }
+ public SortCallback Sort;
+
+ public interface LimitCallback extends GameSDKCallback { EDiscordResult limit(IDiscordLobbySearchQuery lobbySearchQuery, UInt32 limit); }
+ public LimitCallback Limit;
+
+ public interface DistanceCallback extends GameSDKCallback { EDiscordResult distance(IDiscordLobbySearchQuery lobbySearchQuery, EDiscordLobbySearchDistance distance); }
+ public DistanceCallback Distance;
+
+
+
+ public static class ByReference extends IDiscordLobbySearchQuery implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordLobbySearchQuery implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("Filter", "Sort", "Limit", "Distance"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java
new file mode 100644
index 00000000..0005c2bf
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java
@@ -0,0 +1,57 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordLobbyType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordLobbyTransaction extends DiscordStruct { public IDiscordLobbyTransaction() {super();} public IDiscordLobbyTransaction(Pointer pointer) {super(pointer);}
+ public interface SetTypeCallback extends GameSDKCallback { EDiscordResult setType(IDiscordLobbyTransaction lobbyTransaction, EDiscordLobbyType type); }
+ public SetTypeCallback SetType;
+
+ public interface SetOwnerCallback extends GameSDKCallback { EDiscordResult setOwner(IDiscordLobbyTransaction lobbyTransaction, DiscordSnowflake ownerId); }
+ public SetOwnerCallback SetOwner;
+
+ public interface SetCapacityCallback extends GameSDKCallback { EDiscordResult setCapacity(IDiscordLobbyTransaction lobbyTransaction, UInt32 capacity); }
+ public SetCapacityCallback SetCapacity;
+
+ public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key, Pointer value); }
+ public SetMetadataCallback SetMetadata;
+
+ public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key); }
+ public DeleteMetadataCallback DeleteMetadata;
+
+ public interface SetLockedCallback extends GameSDKCallback { EDiscordResult setLocked(IDiscordLobbyTransaction lobbyTransaction, boolean locked); }
+ public SetLockedCallback SetLocked;
+
+
+
+ public static class ByReference extends IDiscordLobbyTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordLobbyTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("SetType", "SetOwner", "SetCapacity", "SetMetadata", "DeleteMetadata", "SetLocked"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java
new file mode 100644
index 00000000..2f08f975
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java
@@ -0,0 +1,45 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkChannelId;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkPeerId;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordNetworkEvents extends DiscordStruct { public IDiscordNetworkEvents() {super();} public IDiscordNetworkEvents(Pointer pointer) {super(pointer);}
+ public interface OnMessageCallback extends GameSDKCallback { void onMessage(Pointer eventData, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); }
+ public OnMessageCallback OnMessage;
+
+ public interface OnRouteUpdateCallback extends GameSDKCallback { void onRouteUpdate(Pointer eventData, String route_data); }
+ public OnRouteUpdateCallback OnRouteUpdate;
+
+
+
+ public static class ByReference extends IDiscordNetworkEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordNetworkEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnMessage", "OnRouteUpdate"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java
new file mode 100644
index 00000000..7ec25896
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java
@@ -0,0 +1,65 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.LongByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkChannelId;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordNetworkPeerId;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordNetworkManager extends DiscordStruct { public IDiscordNetworkManager() {super();} public IDiscordNetworkManager(Pointer pointer) {super(pointer);}
+ public interface GetPeerIdCallback extends GameSDKCallback { void getPeerId(IDiscordNetworkManager manager, LongByReference peerId); }
+ public GetPeerIdCallback GetPeerId;
+
+ public interface FlushCallback extends GameSDKCallback { EDiscordResult flush(IDiscordNetworkManager manager); }
+ public FlushCallback Flush;
+
+ public interface OpenPeerCallback extends GameSDKCallback { EDiscordResult openPeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); }
+ public OpenPeerCallback OpenPeer;
+
+ public interface UpdatePeerCallback extends GameSDKCallback { EDiscordResult updatePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); }
+ public UpdatePeerCallback UpdatePeer;
+
+ public interface ClosePeerCallback extends GameSDKCallback { EDiscordResult closePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId); }
+ public ClosePeerCallback ClosePeer;
+
+ public interface OpenChannelCallback extends GameSDKCallback { EDiscordResult openChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, boolean reliable); }
+ public OpenChannelCallback OpenChannel;
+
+ public interface CloseChannelCallback extends GameSDKCallback { EDiscordResult closeChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId); }
+ public CloseChannelCallback CloseChannel;
+
+ public interface SendMessageCallback extends GameSDKCallback { EDiscordResult sendMessage(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); }
+ public SendMessageCallback SendMessage;
+
+
+
+ public static class ByReference extends IDiscordNetworkManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordNetworkManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("GetPeerId", "Flush", "OpenPeer", "UpdatePeer", "ClosePeer", "OpenChannel", "CloseChannel", "SendMessage"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java
new file mode 100644
index 00000000..f4a1d544
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordOverlayEvents extends DiscordStruct { public IDiscordOverlayEvents() {super();} public IDiscordOverlayEvents(Pointer pointer) {super(pointer);}
+ public interface OnToggleCallback extends GameSDKCallback { void onToggle(Pointer eventData, boolean locked); }
+ public OnToggleCallback OnToggle;
+
+
+
+ public static class ByReference extends IDiscordOverlayEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordOverlayEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnToggle"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java
new file mode 100644
index 00000000..3283d21e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java
@@ -0,0 +1,56 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityActionType;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordOverlayManager extends DiscordStruct { public IDiscordOverlayManager() {super();} public IDiscordOverlayManager(Pointer pointer) {super(pointer);}
+ public interface IsEnabledCallback extends GameSDKCallback { void isEnabled(IDiscordOverlayManager manager, ByteByReference enabled); }
+ public IsEnabledCallback IsEnabled;
+
+ public interface IsLockedCallback extends GameSDKCallback { void isLocked(IDiscordOverlayManager manager, ByteByReference locked); }
+ public IsLockedCallback IsLocked;
+
+ public interface SetLockedCallback extends GameSDKCallback { void setLocked(IDiscordOverlayManager manager, boolean locked, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SetLockedCallback SetLocked;
+
+ public interface OpenActivityInviteCallback extends GameSDKCallback { void openActivityInvite(IDiscordOverlayManager manager, EDiscordActivityActionType type, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public OpenActivityInviteCallback OpenActivityInvite;
+
+ public interface OpenGuildInviteCallback extends GameSDKCallback { void openGuildInvite(IDiscordOverlayManager manager, String code, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public OpenGuildInviteCallback OpenGuildInvite;
+
+ public interface OpenVoiceSettingsCallback extends GameSDKCallback { void openVoiceSettings(IDiscordOverlayManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public OpenVoiceSettingsCallback OpenVoiceSettings;
+
+
+
+ public static class ByReference extends IDiscordOverlayManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordOverlayManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("IsEnabled", "IsLocked", "SetLocked", "OpenActivityInvite", "OpenGuildInvite", "OpenVoiceSettings"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java
new file mode 100644
index 00000000..97da94ee
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordRelationshipEvents extends DiscordStruct { public IDiscordRelationshipEvents() {super();} public IDiscordRelationshipEvents(Pointer pointer) {super(pointer);}
+ public interface OnRefreshCallback extends GameSDKCallback { void onRefresh(Pointer eventData); }
+ public OnRefreshCallback OnRefresh;
+
+ public interface OnRelationshipUpdateCallback extends GameSDKCallback { void onRelationshipUpdate(Pointer eventData, DiscordRelationship relationship); }
+ public OnRelationshipUpdateCallback OnRelationshipUpdate;
+
+
+
+ public static class ByReference extends IDiscordRelationshipEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordRelationshipEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnRefresh", "OnRelationshipUpdate"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java
new file mode 100644
index 00000000..e0084c98
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java
@@ -0,0 +1,53 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordRelationshipManager extends DiscordStruct { public IDiscordRelationshipManager() {super();} public IDiscordRelationshipManager(Pointer pointer) {super(pointer);}
+ public interface FilterCallback extends GameSDKCallback { void filter(IDiscordRelationshipManager manager, Pointer filterData, FilterCallback_Callback filter); }
+ public interface FilterCallback_Callback extends GameSDKCallback { boolean filter(Pointer filterData, DiscordRelationship relationShip);}
+ public FilterCallback Filter;
+
+ public interface CountCallback extends GameSDKCallback { EDiscordResult count(IDiscordRelationshipManager manager, IntByReference count); }
+ public CountCallback Count;
+
+ public interface GetCallback extends GameSDKCallback { EDiscordResult get(IDiscordRelationshipManager manager, DiscordSnowflake userId, DiscordRelationship relationship); }
+ public GetCallback Get;
+
+ public interface GetAtCallback extends GameSDKCallback { EDiscordResult getAt(IDiscordRelationshipManager manager, UInt32 index, DiscordRelationship relationship); }
+ public GetAtCallback GetAt;
+
+
+
+ public static class ByReference extends IDiscordRelationshipManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordRelationshipManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("Filter", "Count", "Get", "GetAt"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java
new file mode 100644
index 00000000..035ee652
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStorageManager.java
@@ -0,0 +1,81 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordFileStat;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt64;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordStorageManager extends DiscordStruct { public IDiscordStorageManager() {super();} public IDiscordStorageManager(Pointer pointer) {super(pointer);}
+ public interface ReadCallback extends GameSDKCallback { EDiscordResult read(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, IntByReference read); }
+ public ReadCallback Read;
+
+ public interface DiscordStorageManagerCallback extends GameSDKCallback {
+ void callback(Pointer callbackData, EDiscordResult result, ByteByReference data, IntByReference data_length);
+ }
+
+ public interface ReadAsyncCallback extends GameSDKCallback { void readAsync(IDiscordStorageManager manager, String name, Pointer callbackData, DiscordStorageManagerCallback callback); }
+ public ReadAsyncCallback ReadAsync;
+
+ public interface ReadAsyncPartialCallback extends GameSDKCallback { void readAsyncPartial(IDiscordStorageManager manager, String name, UInt64 offset, UInt64 length, Pointer callbackData, DiscordStorageManagerCallback callback); }
+ public ReadAsyncPartialCallback ReadAsyncPartial;
+
+ public interface WriteCallback extends GameSDKCallback { EDiscordResult write(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength); }
+ public WriteCallback Write;
+
+ public interface WriteAsyncCallback extends GameSDKCallback { void writeAsync(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public WriteAsyncCallback WriteAsync;
+
+ public interface DeleteCallback extends GameSDKCallback { EDiscordResult delete(IDiscordStorageManager manager, String name); }
+ public DeleteCallback Delete;
+
+ public interface ExistsCallback extends GameSDKCallback { EDiscordResult exists(IDiscordStorageManager manager, String name, ByteByReference exists); } // exists actually boolean
+ public ExistsCallback Exists;
+
+ public interface CountCallback extends GameSDKCallback { void count(IDiscordStorageManager manager, IntByReference count); }
+ public CountCallback Count;
+
+ public interface StatCallback extends GameSDKCallback { EDiscordResult stat(IDiscordStorageManager manager, String name, DiscordFileStat stat); }
+ public StatCallback Stat;
+
+ public interface StatAtCallback extends GameSDKCallback { EDiscordResult statAt(IDiscordStorageManager manager, Int32 index, DiscordFileStat stat); }
+ public StatAtCallback StatAt;
+
+ public interface GetPathCallback extends GameSDKCallback { EDiscordResult getPath(IDiscordStorageManager manager, Pointer path); } // path str len 4096
+ public GetPathCallback GetPath;
+
+
+
+ public static class ByReference extends IDiscordStorageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordStorageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+
+ @Override protected List getFieldOrder() { return Arrays.asList("Read", "ReadAsync", "ReadAsyncPartial", "Write", "WriteAsync", "Delete", "Exists", "Count", "Stat", "StatAt", "GetPath"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java
new file mode 100644
index 00000000..e6df07d0
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java
@@ -0,0 +1,43 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordEntitlement;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordStoreEvents extends DiscordStruct { public IDiscordStoreEvents() {super();} public IDiscordStoreEvents(Pointer pointer) {super(pointer);}
+ public interface OnEntitlementCreateCallback extends GameSDKCallback { void onEntitlementCreate(Pointer eventData, DiscordEntitlement entitlement); }
+ public OnEntitlementCreateCallback OnEntitlementCreate;
+
+ public interface OnEntitlementDeleteCallback extends GameSDKCallback { void onEntitlementDelete(Pointer eventData, DiscordEntitlement entitlement); }
+ public OnEntitlementDeleteCallback OnEntitlementDelete;
+
+
+
+ public static class ByReference extends IDiscordStoreEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordStoreEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnEntitlementCreate", "OnEntitlementDelete"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java
new file mode 100644
index 00000000..3e387923
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordStoreManager.java
@@ -0,0 +1,73 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordSku;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordEntitlement;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.Int32;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordStoreManager extends DiscordStruct { public IDiscordStoreManager() {super();} public IDiscordStoreManager(Pointer pointer) {super(pointer);}
+ public interface FetchSkusCallback extends GameSDKCallback { void fetchSkus(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public FetchSkusCallback FetchSkus;
+
+ public interface CountSkusCallback extends GameSDKCallback { void countSkus(IDiscordStoreManager manager, IntByReference count); }
+ public CountSkusCallback CountSkus;
+
+ public interface GetSkuCallback extends GameSDKCallback { EDiscordResult getSku(IDiscordStoreManager manager, DiscordSnowflake skuId, DiscordSku sku); }
+ public GetSkuCallback GetSku;
+
+ public interface GetSkuAtCallback extends GameSDKCallback { EDiscordResult getSkuAt(IDiscordStoreManager manager, Int32 index, DiscordSku sku); }
+ public GetSkuAtCallback GetSkuAt;
+
+ public interface FetchEntitlementsCallback extends GameSDKCallback { void fetchEntitlements(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public FetchEntitlementsCallback FetchEntitlements;
+
+ public interface CountEntitlementsCallback extends GameSDKCallback { void countEntitlements(IDiscordStoreManager manager, IntByReference count); }
+ public CountEntitlementsCallback CountEntitlements;
+
+ public interface GetEntitlementCallback extends GameSDKCallback { EDiscordResult getEntitlement(IDiscordStoreManager manager, DiscordSnowflake entitlementId, DiscordEntitlement entitlement); }
+ public GetEntitlementCallback GetEntitlement;
+
+ public interface GetEntitlementAtCallback extends GameSDKCallback { EDiscordResult getEntitlementAt(IDiscordStoreManager manager, Int32 index, DiscordEntitlement entitlement); }
+ public GetEntitlementAtCallback GetEntitlementAt;
+
+ public interface HasSkuEntitlementCallback extends GameSDKCallback { EDiscordResult hasSkuEntitlement(IDiscordStoreManager manager, DiscordSnowflake skuId, ByteByReference hasEntitlement); } // hasEntitlement bool ptr
+ public HasSkuEntitlementCallback HasSkuEntitlement;
+
+ public interface StartPurchaseCallback extends GameSDKCallback { void startPurchase(IDiscordStoreManager manager, DiscordSnowflake skuId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public StartPurchaseCallback StartPurchase;
+
+
+
+ public static class ByReference extends IDiscordStoreManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordStoreManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("FetchSkus", "CountSkus", "GetSku", "GetSkuAt", "FetchEntitlements", "CountEntitlements", "GetEntitlement", "GetEntitlementAt", "HasSkuEntitlement", "StartPurchase"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java
new file mode 100644
index 00000000..0e80acb1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserEvents.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordUserEvents extends DiscordStruct { public IDiscordUserEvents() {super();} public IDiscordUserEvents(Pointer pointer) {super(pointer);}
+ public interface OnCurrentUserUpdateCallback extends GameSDKCallback { void onCurrentUserUpdate(Pointer eventData); }
+ public OnCurrentUserUpdateCallback OnCurrentUserUpdate;
+
+
+
+ public static class ByReference extends IDiscordUserEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordUserEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnCurrentUserUpdate"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java
new file mode 100644
index 00000000..c4803a7d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordUserManager.java
@@ -0,0 +1,53 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import com.sun.jna.ptr.IntByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordUserFlag;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordUserManager extends DiscordStruct { public IDiscordUserManager() {super();} public IDiscordUserManager(Pointer pointer) {super(pointer);}
+ public interface GetCurrentUserCallback extends GameSDKCallback { EDiscordResult getCurrentUser(IDiscordUserManager manager, DiscordUser currentUser); }
+ public GetCurrentUserCallback GetCurrentUser;
+
+ public interface GetUserCallback extends GameSDKCallback { void getUser(IDiscordUserManager manager, DiscordSnowflake userId, Pointer callbackData, GetUserCallback_Callback callback); }
+ public interface GetUserCallback_Callback extends GameSDKCallback { void callback(Pointer callbackData, EDiscordResult result, DiscordUser user);}
+ public GetUserCallback GetUser;
+
+ public interface GetCurrentUserPremiumTypeCallback extends GameSDKCallback { EDiscordResult getCurrentUserPremiumType(IDiscordUserManager manager, IntByReference premiumType); } // EDiscordPremiumType ptr
+ public GetCurrentUserPremiumTypeCallback GetCurrentUserPremiumType;
+
+ public interface CurrentUserHasFlagCallback extends GameSDKCallback { EDiscordResult currentUserHasFlag(IDiscordUserManager manager, EDiscordUserFlag flag, ByteByReference hasFlag); } // hasFlag bool ptr
+ public CurrentUserHasFlagCallback CurrentUserHasFlag;
+
+
+
+ public static class ByReference extends IDiscordUserManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordUserManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+ @Override protected List getFieldOrder() { return Arrays.asList("GetCurrentUser", "GetUser", "GetCurrentUserPremiumType", "CurrentUserHasFlag"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java
new file mode 100644
index 00000000..0e4b4731
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordVoiceEvents extends DiscordStruct { public IDiscordVoiceEvents() {super();} public IDiscordVoiceEvents(Pointer pointer) {super(pointer);}
+ public interface OnSettingsUpdateCallback extends GameSDKCallback { void onSettingsUpdate(Pointer eventData); }
+ public OnSettingsUpdateCallback OnSettingsUpdate;
+
+
+
+ public static class ByReference extends IDiscordVoiceEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordVoiceEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+
+ @Override protected List getFieldOrder() { return Arrays.asList("OnSettingsUpdate"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java
new file mode 100644
index 00000000..833a1ca4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java
@@ -0,0 +1,72 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct;
+
+import com.sun.jna.Structure;
+import com.sun.jna.ptr.ByteByReference;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordStruct;
+import com.sun.jna.Pointer;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordResult;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.UInt8;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordInputMode;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.DiscordSnowflake;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class IDiscordVoiceManager extends DiscordStruct { public IDiscordVoiceManager() {super();} public IDiscordVoiceManager(Pointer pointer) {super(pointer);}
+ public interface GetInputModeCallback extends GameSDKCallback { EDiscordResult getInputMode(IDiscordVoiceManager manager, DiscordInputMode inputMode); }
+ public GetInputModeCallback GetInputMode;
+
+ public interface SetInputModeCallback extends GameSDKCallback { void setInputMode(IDiscordVoiceManager manager, DiscordInputMode.ByValue inputMode, Pointer callbackData, NativeGameSDK.DiscordCallback callback); }
+ public SetInputModeCallback SetInputMode;
+
+ public interface IsSelfMuteCallback extends GameSDKCallback { EDiscordResult isSelfMute(IDiscordVoiceManager manager, ByteByReference mute); }
+ public IsSelfMuteCallback IsSelfMute;
+
+ public interface SetSelfMuteCallback extends GameSDKCallback { EDiscordResult setSelfMute(IDiscordVoiceManager manager, boolean mute); }
+ public SetSelfMuteCallback SetSelfMute;
+
+ public interface IsSelfDeafCallback extends GameSDKCallback { EDiscordResult isSelfDeaf(IDiscordVoiceManager manager, ByteByReference deaf); }
+ public IsSelfDeafCallback IsSelfDeaf;
+
+ public interface SetSelfDeafCallback extends GameSDKCallback { EDiscordResult setSelfDeaf(IDiscordVoiceManager manager, boolean deaf); }
+ public SetSelfDeafCallback SetSelfDeaf;
+
+ public interface IsLocalMuteCallback extends GameSDKCallback { EDiscordResult isLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference mute); }
+ public IsLocalMuteCallback IsLocalMute;
+
+ public interface SetLocalMuteCallback extends GameSDKCallback { EDiscordResult setLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, boolean mute); }
+ public SetLocalMuteCallback SetLocalMute;
+
+ public interface GetLocalVolumeCallback extends GameSDKCallback { EDiscordResult getLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference volume); }
+ public GetLocalVolumeCallback GetLocalVolume;
+
+ public interface SetLocalVolumeCallback extends GameSDKCallback { EDiscordResult setLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, UInt8 volume); }
+ public SetLocalVolumeCallback SetLocalVolume;
+
+
+
+ public static class ByReference extends IDiscordVoiceManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}}
+ public static class ByValue extends IDiscordVoiceManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}}
+
+
+ @Override protected List getFieldOrder() { return Arrays.asList("GetInputMode", "SetInputMode", "IsSelfMute", "SetSelfMute", "IsSelfDeaf", "SetSelfDeaf", "IsLocalMute", "SetLocalMute", "GetLocalVolume", "SetLocalVolume"); }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java
new file mode 100644
index 00000000..56e8f64c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordClientID.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordClientID extends Int64 {
+ public DiscordClientID() {
+ this(0);
+ }
+ public DiscordClientID(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java
new file mode 100644
index 00000000..54dcbece
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkChannelId.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordNetworkChannelId extends UInt8 {
+ public DiscordNetworkChannelId() {
+ this(0);
+ }
+ public DiscordNetworkChannelId(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java
new file mode 100644
index 00000000..c7493ffb
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordNetworkPeerId.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordNetworkPeerId extends UInt64 {
+ public DiscordNetworkPeerId() {
+ this(0);
+ }
+ public DiscordNetworkPeerId(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java
new file mode 100644
index 00000000..15681202
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordSnowflake.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordSnowflake extends Int64 {
+ public DiscordSnowflake() {
+ this(0);
+ }
+ public DiscordSnowflake(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java
new file mode 100644
index 00000000..6b5fce90
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordTimestamp.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordTimestamp extends Int64 {
+ public DiscordTimestamp() {
+ this(0);
+ }
+ public DiscordTimestamp(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java
new file mode 100644
index 00000000..eda4dcdf
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/DiscordVersion.java
@@ -0,0 +1,28 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+public class DiscordVersion extends Int32 {
+ public DiscordVersion() {
+ this(0);
+ }
+ public DiscordVersion(long value) {
+ super(value);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java
new file mode 100644
index 00000000..84210e6b
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int32.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+import com.sun.jna.IntegerType;
+
+public class Int32 extends IntegerType {
+ public static final int SIZE = 4;
+ public Int32() {
+ this(0);
+ }
+ public Int32(long value) {
+ super(SIZE, value, false);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java
new file mode 100644
index 00000000..7ee7e61a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/Int64.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+import com.sun.jna.IntegerType;
+
+public class Int64 extends IntegerType {
+ public static final int SIZE = 8;
+ public Int64() {
+ this(0);
+ }
+ public Int64(long value) {
+ super(SIZE, value, false);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java
new file mode 100644
index 00000000..ff7db8a8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt32.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+import com.sun.jna.IntegerType;
+
+public class UInt32 extends IntegerType {
+ public static final int SIZE = 4;
+ public UInt32() {
+ this(0);
+ }
+ public UInt32(long value) {
+ super(SIZE, value, true);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java
new file mode 100644
index 00000000..360a80ee
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt64.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+import com.sun.jna.IntegerType;
+
+public class UInt64 extends IntegerType {
+ public static final int SIZE = 8;
+ public UInt64() {
+ this(0);
+ }
+ public UInt64(long value) {
+ super(SIZE, value, true);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java
new file mode 100644
index 00000000..f48ebd06
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/gamesdk/jna/typedef/UInt8.java
@@ -0,0 +1,31 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef;
+
+import com.sun.jna.IntegerType;
+
+public class UInt8 extends IntegerType {
+ public static final int SIZE = 1;
+ public UInt8() {
+ this(0);
+ }
+ public UInt8(long value) {
+ super(SIZE, value, true);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java
new file mode 100644
index 00000000..76b11178
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordActivity.java
@@ -0,0 +1,72 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.rpc;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordActivity;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordActivityType;
+import lombok.Data;
+
+@Data
+public class JDiscordActivity {
+ private EDiscordActivityType activityType;
+ private long applicationId;
+ private String name, state, details;
+ private long start, end;
+ private String largeImage, largeText, smallImage, smallText;
+ private String partyId;
+ private int partyCurr, partyMax;
+ private String matchSecret, joinSecret, spectateSecret;
+ private boolean instance;
+
+ public static JDiscordActivity fromJNA(DiscordActivity discordActivity) {
+ if (discordActivity == null) return null;
+ JDiscordActivity jDiscordActivity = new JDiscordActivity();
+ jDiscordActivity.activityType = discordActivity.activityType;
+ jDiscordActivity.applicationId = discordActivity.applicationId.longValue();
+ jDiscordActivity.name = GameSDK.readString(discordActivity.name);
+ jDiscordActivity.state = GameSDK.readString(discordActivity.state);
+ jDiscordActivity.details = GameSDK.readString(discordActivity.details);
+ if (discordActivity.assets != null) {
+ jDiscordActivity.largeImage = GameSDK.readString(discordActivity.assets.large_image);
+ jDiscordActivity.largeText = GameSDK.readString(discordActivity.assets.large_text);
+ jDiscordActivity.smallImage = GameSDK.readString(discordActivity.assets.small_image);
+ jDiscordActivity.smallText = GameSDK.readString(discordActivity.assets.small_text);
+ }
+ if (discordActivity.timestamps != null) {
+ jDiscordActivity.start = discordActivity.timestamps.start.longValue();
+ jDiscordActivity.end = discordActivity.timestamps.end.longValue();
+ }
+ if (discordActivity.secrets != null) {
+ jDiscordActivity.matchSecret= GameSDK.readString(discordActivity.secrets.match);
+ jDiscordActivity.joinSecret = GameSDK.readString(discordActivity.secrets.join);
+ jDiscordActivity.spectateSecret = GameSDK.readString(discordActivity.secrets.spectate);
+ }
+ if (discordActivity.party != null) {
+ jDiscordActivity.partyId = GameSDK.readString(discordActivity.party.id);
+ if (discordActivity.party.discordActivityParty != null) {
+ jDiscordActivity.partyCurr = discordActivity.party.discordActivityParty.current_size.intValue();
+ jDiscordActivity.partyMax = discordActivity.party.discordActivityParty.max_size.intValue();
+ }
+ }
+ jDiscordActivity.instance = discordActivity.instance;
+
+ return jDiscordActivity;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java
new file mode 100644
index 00000000..ae7ed1a6
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordRelation.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.rpc;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordRelationship;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordRelationshipType;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.EDiscordStatus;
+import lombok.Data;
+
+@Data
+public class JDiscordRelation {
+ private EDiscordRelationshipType discordRelationshipType;
+ private EDiscordStatus status;
+ private JDiscordActivity discordActivity;
+ private JDiscordUser discordUser;
+
+ public static JDiscordRelation fromJNA(DiscordRelationship relationship) {
+ JDiscordRelation jDiscordRelation = new JDiscordRelation();
+ jDiscordRelation.discordUser = JDiscordUser.fromJNA(relationship.user);
+ jDiscordRelation.discordActivity = JDiscordActivity.fromJNA(relationship.presence.activity);
+ jDiscordRelation.status = relationship.presence.status;
+ jDiscordRelation.discordRelationshipType = relationship.type;
+ return jDiscordRelation;
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java
new file mode 100644
index 00000000..a56cd884
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/JDiscordUser.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.rpc;
+
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.DiscordUser;
+import lombok.Data;
+
+@Data
+public class JDiscordUser {
+ private long id;
+ private String username, discriminator, avatar;
+ private boolean bot;
+
+ public static JDiscordUser fromJNA(DiscordUser discordUser) {
+ JDiscordUser jDiscordUser = new JDiscordUser();
+ jDiscordUser.id = discordUser.id.longValue();
+ jDiscordUser.username = GameSDK.readString(discordUser.username);
+ jDiscordUser.discriminator = GameSDK.readString(discordUser.discriminator);
+ jDiscordUser.avatar = GameSDK.readString(discordUser.avatar);
+ jDiscordUser.bot = discordUser.bot;
+ return jDiscordUser;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java
new file mode 100644
index 00000000..9e2f249d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/rpc/RichPresenceManager.java
@@ -0,0 +1,251 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.discord.rpc;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.ptr.PointerByReference;
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.SkyblockStatus;
+import kr.syeyoung.dungeonsguide.mod.party.PartyContext;
+import kr.syeyoung.dungeonsguide.mod.party.PartyManager;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserJoinRequestEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DiscordUserUpdateEvent;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.GameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.NativeGameSDK;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.datastruct.*;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.enumuration.*;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.interfacestruct.*;
+import kr.syeyoung.dungeonsguide.mod.discord.gamesdk.jna.typedef.*;
+import lombok.Getter;
+import net.minecraftforge.common.MinecraftForge;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+public class RichPresenceManager implements Runnable {
+ public static RichPresenceManager INSTANCE = new RichPresenceManager();
+ private Thread t = new Thread(this);
+
+ public RichPresenceManager() {
+ t.start();
+ }
+ @Getter
+ private NativeGameSDK nativeGameSDK;
+ @Getter
+ private IDiscordCore iDiscordCore;
+ private IDiscordActivityManager activityManager;
+ private IDiscordRelationshipManager relationshipManager;
+ private IDiscordActivityEvents.ByReference callbacks;
+ private IDiscordRelationshipEvents.ByReference relation_callbacks;
+
+ @Getter
+ private Map relationMap = new HashMap<>();
+
+ private boolean ready = false;
+
+ @Getter
+ private int lastSetupCode = -99999;
+ public int setup() {
+ ready = false;
+ if (iDiscordCore != null) {
+ iDiscordCore.Destroy.destroy(iDiscordCore);
+ iDiscordCore = null;
+ activityManager = null; callbacks = null; relation_callbacks = null; relationMap.clear();
+ }
+
+ nativeGameSDK = GameSDK.getNativeGameSDK();
+ if (nativeGameSDK == null) return -9999;
+ DiscordCreateParams discordCreateParams = new DiscordCreateParams();
+ discordCreateParams.flags = new UInt64(EDiscordCreateFlags.DiscordCreateFlags_NoRequireDiscord.getValue());
+ discordCreateParams.client_id = new DiscordClientID(816298079732498473L);
+
+ callbacks = new IDiscordActivityEvents.ByReference();
+ callbacks.OnActivityInvite = (eventData, type, user, activity) -> {
+ try {
+ MinecraftForge.EVENT_BUS.post(new DiscordUserJoinRequestEvent(user, true));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ System.out.println("Received Join Request from "+user.id.longValue()+" ("+GameSDK.readString(user.username)+")");
+ };
+ callbacks.OnActivityJoin = (eventData, secret) -> {
+ PartyManager.INSTANCE.joinWithToken(secret);
+ System.out.println("Trying to join with token "+secret);
+ };
+ callbacks.OnActivityJoinRequest = (eventData, user) -> {
+ try {
+ MinecraftForge.EVENT_BUS.post(new DiscordUserJoinRequestEvent(user, false));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ System.out.println("Received Join Request from "+user.id.longValue()+" - "+GameSDK.readString(user.username));
+ };
+ callbacks.OnActivitySpectate = (eventData, secret) -> {
+ };
+ callbacks.write();
+
+ relation_callbacks = new IDiscordRelationshipEvents.ByReference();
+ relation_callbacks.OnRefresh = (p) -> {
+ try {
+ ready = true;
+ IDiscordRelationshipManager iDiscordRelationshipManager = iDiscordCore.GetRelationshipManager.getRelationshipManager(iDiscordCore);
+ iDiscordRelationshipManager.Filter.filter(iDiscordRelationshipManager, Pointer.NULL, (d, relation) -> true);
+ IntByReference intByReference = new IntByReference();
+ iDiscordRelationshipManager.Count.count(iDiscordRelationshipManager, intByReference);
+ int count = intByReference.getValue();
+ relationMap.clear();
+ for (int i = 0; i < count; i++) {
+ DiscordRelationship discordRelationship = new DiscordRelationship();
+ iDiscordRelationshipManager.GetAt.getAt(iDiscordRelationshipManager, new UInt32(i), discordRelationship);
+
+ JDiscordRelation jDiscordRelation = JDiscordRelation.fromJNA(discordRelationship);
+ relationMap.put(jDiscordRelation.getDiscordUser().getId(), jDiscordRelation);
+ }
+ } catch (Throwable e) {e.printStackTrace();}
+ };
+ relation_callbacks.OnRelationshipUpdate = (p, rel) -> {
+ try {
+ JDiscordRelation jDiscordRelation = JDiscordRelation.fromJNA(rel);
+ JDiscordRelation prev = relationMap.put(jDiscordRelation.getDiscordUser().getId(), jDiscordRelation);
+ MinecraftForge.EVENT_BUS.post(new DiscordUserUpdateEvent(prev, jDiscordRelation));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ };
+ relation_callbacks.write();
+
+ discordCreateParams.activity_events = callbacks;
+ discordCreateParams.relationship_events = relation_callbacks; // 96
+
+ PointerByReference pointerByReference = new PointerByReference();
+ discordCreateParams.write();
+
+ EDiscordResult eDiscordResult = nativeGameSDK.DiscordCreate(new DiscordVersion(NativeGameSDK.DISCORD_VERSION), discordCreateParams, pointerByReference);
+ if (eDiscordResult != EDiscordResult.DiscordResult_Ok) return eDiscordResult.getValue();
+ if (pointerByReference.getValue() == Pointer.NULL) return -9998;
+ iDiscordCore = new IDiscordCore(pointerByReference.getValue());
+
+ iDiscordCore.SetLogHook.setLogHook(iDiscordCore, EDiscordLogLevel.DiscordLogLevel_Debug, Pointer.NULL, new IDiscordCore.LogHook() {
+ @Override
+ public void hook(Pointer hookData, EDiscordLogLevel level, String message) {
+ System.out.println(message+" - "+level+" - "+hookData);
+ }
+ });
+
+ activityManager = iDiscordCore.GetActivityManager.getActivityManager(iDiscordCore);
+ relationshipManager = iDiscordCore.GetRelationshipManager.getRelationshipManager(iDiscordCore);
+
+ return eDiscordResult.getValue();
+ }
+
+ private final SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus();
+
+ public void respond(DiscordSnowflake userID, EDiscordActivityJoinRequestReply reply) {
+ if (activityManager == null) return;
+ activityManager.SendRequestReply.sendRequestReply(activityManager, userID, reply, Pointer.NULL, (callbackData, result) -> {
+ System.out.println("Discord Returned "+result+" For Replying "+reply+" To "+userID.longValue()+"L");
+ });
+ }
+
+ public void accept(DiscordSnowflake userID) {
+ if (activityManager == null) return;
+ activityManager.AcceptInvite.acceptInvite(activityManager, userID, Pointer.NULL, (callbackData, result) -> {
+ System.out.println("Discord Returned "+result+" For Accepting invite from "+userID.longValue()+"L");
+ });
+ }
+ public void updatePresence() {
+ if (!skyblockStatus.isOnHypixel() || !FeatureRegistry.DISCORD_RICHPRESENCE.isEnabled() || (!skyblockStatus.isOnSkyblock() && FeatureRegistry.DISCORD_RICHPRESENCE.getParameter("disablenotskyblock").getValue())) {
+ activityManager.ClearActivity.clearActivity(activityManager, Pointer.NULL, (callbackData, result) -> {
+ });
+ } else {
+ String name = DungeonContext.getDungeonName() == null ? "" : DungeonContext.getDungeonName();
+ if (!skyblockStatus.isOnSkyblock()) name ="Somewhere on Hypixel";
+ if (name.trim().equals("Your Island")) name = "Private Island";
+
+ DiscordActivity latestDiscordActivity = new DiscordActivity();
+ latestDiscordActivity.assets = new DiscordActivityAssets();
+ latestDiscordActivity.secrets = new DiscordActivitySecrets();
+ latestDiscordActivity.party = new DiscordActivityParty();
+ latestDiscordActivity.party.discordActivityParty = new DiscordPartySize();
+ latestDiscordActivity.timestamps = new DiscordActivityTimestamps();
+ GameSDK.writeString(latestDiscordActivity.assets.large_image, "mort");
+ GameSDK.writeString(latestDiscordActivity.assets.large_text, "mort");
+ GameSDK.writeString(latestDiscordActivity.state, name);
+
+ GameSDK.writeString(latestDiscordActivity.party.id, Optional.ofNullable( PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyID).orElse(""));
+ latestDiscordActivity.party.discordActivityParty.current_size = new Int32(Optional.ofNullable(PartyManager.INSTANCE.getPartyContext()).map(PartyContext::getPartyRawMembers).map(Set::size).orElse(1));
+ latestDiscordActivity.party.discordActivityParty.max_size = new Int32(PartyManager.INSTANCE.getMaxParty());
+
+ DungeonContext context = DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext();
+ if (context != null) {
+ long init = context.getInit();
+ latestDiscordActivity.timestamps.start = new DiscordTimestamp(init);
+
+ if (context.getBossfightProcessor() != null) {
+ GameSDK.writeString(latestDiscordActivity.details, "Fighting "+context.getBossfightProcessor().getBossName()+": "+context.getBossfightProcessor().getCurrentPhase());
+ } else {
+ GameSDK.writeString(latestDiscordActivity.details, "Clearing Rooms");
+ }
+ } else {
+ latestDiscordActivity.timestamps.start = new DiscordTimestamp(0);
+ GameSDK.writeString(latestDiscordActivity.details, "Dungeons Guide");
+ }
+ if (PartyManager.INSTANCE.getAskToJoinSecret() != null) {
+ GameSDK.writeString(latestDiscordActivity.secrets.join, PartyManager.INSTANCE.getAskToJoinSecret());
+ } else {
+ GameSDK.writeString(latestDiscordActivity.secrets.join, "");
+ }
+ activityManager.UpdateActivity.updateActivity(activityManager, latestDiscordActivity, Pointer.NULL, (callbackData, result) -> {
+ });
+ }
+ }
+
+ @Override
+ public void run() {
+ boolean setup = true;
+ int counter = 0;
+ while(!Thread.interrupted()) {
+ try {
+ if (iDiscordCore == null || setup) {
+ long lastSetup = lastSetupCode;
+ lastSetupCode = setup();
+ if (lastSetup != lastSetupCode)
+ System.out.println("Discord returned "+lastSetupCode+" for setup "+EDiscordResult.fromValue(lastSetupCode));
+ setup = lastSetupCode != EDiscordResult.DiscordResult_Ok.getValue();
+ counter = 0;
+ } else {
+ EDiscordResult eDiscordResult = iDiscordCore.RunCallbacks.runCallbacks(iDiscordCore);
+ if (eDiscordResult != EDiscordResult.DiscordResult_Ok) {
+ setup = true;
+ } else if (ready){
+ if (counter == 0)
+ updatePresence();
+ if (++counter == 15) counter = 0;
+ }
+ }
+ Thread.sleep(16L);
+ } catch (Exception e) {e.printStackTrace();}
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonActionContext.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonActionContext.java
new file mode 100644
index 00000000..f9541a3d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonActionContext.java
@@ -0,0 +1,35 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon;
+
+import lombok.Getter;
+import net.minecraft.util.Vec3;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class DungeonActionContext {
+ @Getter
+ private static final Map spawnLocation = new HashMap<>();
+
+ @Getter
+ private static final List killeds = new ArrayList<>();
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonContext.java
new file mode 100755
index 00000000..32a668c0
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonContext.java
@@ -0,0 +1,218 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon;
+
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProviderRegistry;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonCryptBrokenEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonNodataEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonPuzzleFailureEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonSecretCountChangeEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.RoomProcessor;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.BossfightProcessor;
+import kr.syeyoung.dungeonsguide.mod.events.impl.BossroomEnterEvent;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.utils.TabListUtil;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.util.IChatComponent;
+import net.minecraft.world.World;
+import net.minecraftforge.client.event.ClientChatReceivedEvent;
+import net.minecraftforge.common.MinecraftForge;
+
+import java.awt.*;
+import java.util.List;
+import java.util.*;
+
+public class DungeonContext {
+ /**
+ * This is static because its used in the constructor,
+ * it means we cannot set the name without having an object,
+ * and we cannot create an object without the name
+ * so its static :)
+ */
+ @Getter @Setter
+ private static String dungeonName;
+ @Getter
+ @Setter
+ public int percentage;
+ @Getter
+ private final World world;
+ @Getter
+ private final MapProcessor mapProcessor;
+
+ @Getter
+ @Setter
+ private BlockPos dungeonMin;
+
+ @Getter
+ private final Map roomMapper = new HashMap<>();
+ @Getter
+ private final List dungeonRoomList = new ArrayList<>();
+
+ @Getter
+ private final List globalRoomProcessors = new ArrayList<>();
+
+ @Getter
+ private final Map deaths = new HashMap<>();
+ @Getter
+ private final List milestoneReached = new ArrayList<>();
+ @Getter
+ @Setter
+ private long BossRoomEnterSeconds = -1;
+ @Getter
+ @Setter
+ private long init = -1;
+ @Getter
+ @Setter
+ private BlockPos bossroomSpawnPos = null;
+
+ @Getter
+ @Setter
+ private boolean trapRoomGen = false;
+
+ @Getter
+ private boolean gotMimic = false;
+
+ private int latestSecretCnt = 0;
+ private int latestTotalSecret = 0;
+ private int latestCrypts = 0;
+
+ @Getter
+ private int maxSpeed = 600;
+ @Getter
+ private double secretPercentage = 1.0;
+
+ public void setGotMimic(boolean gotMimic) {
+ this.gotMimic = gotMimic;
+ createEvent(new DungeonNodataEvent("MIMIC_KILLED"));
+ }
+
+ @Getter
+ @Setter
+ private BossfightProcessor bossfightProcessor;
+
+ @Getter
+ private final Set players = new HashSet<>();
+
+ @Getter
+ private final List events = new ArrayList<>();
+
+ public DungeonContext(World world) {
+ this.world = world;
+ createEvent(new DungeonNodataEvent("DUNGEON_CONTEXT_CREATION"));
+ mapProcessor = new MapProcessor(this);
+ DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(getDungeonName());
+ if (doorFinder != null) {
+ trapRoomGen = doorFinder.isTrapSpawn(getDungeonName());
+
+ secretPercentage = doorFinder.secretPercentage(getDungeonName());
+ maxSpeed = doorFinder.speedSecond(getDungeonName());
+ } else {
+ mapProcessor.setBugged(true);
+ }
+ init = System.currentTimeMillis();
+ }
+
+ public void createEvent(DungeonEventData eventData) {
+// events.add(new DungeonEvent(eventData));
+ }
+
+
+ private final Rectangle roomBoundary = new Rectangle(-10, -10, 138, 138);
+
+ public void tick() {
+
+
+ if (mapProcessor.isInitialized() && BossRoomEnterSeconds == -1 && !roomBoundary.contains(mapProcessor.worldPointToMapPoint(Minecraft.getMinecraft().thePlayer.getPositionVector()))) {
+ BossRoomEnterSeconds = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000;
+ bossroomSpawnPos = Minecraft.getMinecraft().thePlayer.getPosition();
+ MinecraftForge.EVENT_BUS.post(new BossroomEnterEvent());
+ createEvent(new DungeonNodataEvent("BOSSROOM_ENTER"));
+ DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(getDungeonName());
+ if (doorFinder != null) {
+ bossfightProcessor = doorFinder.createBossfightProcessor(world, getDungeonName());
+ } else {
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Error:: Null Data Providier"));
+ }
+ }
+
+ players.clear();
+ players.addAll(TabListUtil.getPlayersInDungeon());
+
+
+ if (latestSecretCnt != FeatureRegistry.DUNGEON_SECRETS.getSecretsFound()) {
+ int newSecretCnt = FeatureRegistry.DUNGEON_SECRETS.getSecretsFound();
+ createEvent(new DungeonSecretCountChangeEvent(latestSecretCnt, newSecretCnt, latestTotalSecret, FeatureRegistry.DUNGEON_SECRETS.sureOfTotalSecrets()));
+ latestSecretCnt = newSecretCnt;
+ }
+ if (latestTotalSecret != FeatureRegistry.DUNGEON_SECRETS.getTotalSecretsInt()) {
+ latestTotalSecret = FeatureRegistry.DUNGEON_SECRETS.getTotalSecretsInt();
+ createEvent(new DungeonSecretCountChangeEvent(latestSecretCnt, latestSecretCnt, latestTotalSecret, FeatureRegistry.DUNGEON_SECRETS.sureOfTotalSecrets()));
+ }
+ if (latestCrypts != FeatureRegistry.DUNGEON_TOMBS.getTombsFound()) {
+ int newlatestCrypts = FeatureRegistry.DUNGEON_TOMBS.getTombsFound();
+ createEvent(new DungeonCryptBrokenEvent(latestCrypts, newlatestCrypts));
+ this.latestCrypts = newlatestCrypts;
+ }
+ }
+
+ @Getter
+ private boolean ended = false;
+ @Getter
+ private boolean defeated = false;
+
+ public void onChat(ClientChatReceivedEvent event) {
+ IChatComponent component = event.message;
+ String formatted = component.getFormattedText();
+ if (formatted.contains("$DG-Comm")) {
+ event.setCanceled(true);
+ String data = component.getFormattedText().substring(component.getFormattedText().indexOf("$DG-Comm"));
+ String actual = TextUtils.stripColor(data);
+ String coords = actual.split(" ")[1];
+ String secrets = actual.split(" ")[2];
+ int x = Integer.parseInt(coords.split("/")[0]);
+ int z = Integer.parseInt(coords.split("/")[1]);
+ int secrets2 = Integer.parseInt(secrets);
+ Point roomPt = mapProcessor.worldPointToRoomPoint(new BlockPos(x, 70, z));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Message from Other dungeons guide :: " + roomPt.x + " / " + roomPt.y + " total secrets " + secrets2));
+ DungeonRoom dr = roomMapper.get(roomPt);
+ if (dr != null) {
+ dr.setTotalSecrets(secrets2);
+ }
+ } else if (formatted.contains("$DG-Mimic")) {
+ setGotMimic(true);
+ } else if (formatted.startsWith("§r§c§lPUZZLE FAIL! ") && formatted.endsWith(" §r§4Y§r§ci§r§6k§r§ee§r§as§r§2!§r")) {
+ createEvent(new DungeonPuzzleFailureEvent(TextUtils.stripColor(formatted.split(" ")[2]), formatted));
+ } else if (formatted.contains("§6> §e§lEXTRA STATS §6<")) {
+ createEvent(new DungeonNodataEvent("DUNGEON_END"));
+ ended = true;
+ } else if (formatted.contains("§r§c☠ §r§eDefeated ")) {
+ defeated = true;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonFacade.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonFacade.java
new file mode 100644
index 00000000..96a951fd
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/DungeonFacade.java
@@ -0,0 +1,35 @@
+package kr.syeyoung.dungeonsguide.mod.dungeon;
+
+import kr.syeyoung.dungeonsguide.Main;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoomInfoRegistry;
+import kr.syeyoung.dungeonsguide.mod.events.listener.DungeonListener;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraftforge.common.MinecraftForge;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import java.io.IOException;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+
+public class DungeonFacade {
+
+ @Getter
+ @Setter
+ private DungeonContext context;
+
+ public void init() {
+ DungeonListener dgEventListener = new DungeonListener();
+ MinecraftForge.EVENT_BUS.register(dgEventListener);
+
+ try {
+ DungeonRoomInfoRegistry.loadAll(Main.getConfigDir());
+ } catch (BadPaddingException | InvalidKeyException | NoSuchPaddingException | IllegalBlockSizeException |
+ IOException | NoSuchAlgorithmException | InvalidAlgorithmParameterException e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/MapProcessor.java
new file mode 100755
index 00000000..9c2462ea
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/MapProcessor.java
@@ -0,0 +1,535 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.EDungeonDoorType;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.SerializableBlockPos;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonMapUpdateEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonRoomDiscoverEvent;
+import kr.syeyoung.dungeonsguide.mod.dungeon.map.DungeonMapData;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.utils.MapUtils;
+import lombok.Getter;
+import lombok.Setter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemMap;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.*;
+import net.minecraft.world.storage.MapData;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.vecmath.Vector2d;
+import java.awt.*;
+import java.util.List;
+import java.util.Queue;
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+public class MapProcessor {
+
+ private static final Set directions = Sets.newHashSet(new Vector2d(0, 1), new Vector2d(0, -1), new Vector2d(1, 0), new Vector2d(-1, 0));
+ private static final Set door_dirs = Sets.newHashSet(new Vector2d(0, 0.5), new Vector2d(0, -0.5), new Vector2d(0.5, 0), new Vector2d(-0.5, 0));
+ private static final Minecraft mc = Minecraft.getMinecraft();
+ private final DungeonContext context;
+ @Getter
+ private final BiMap mapIconToPlayerMap = HashBiMap.create();
+ private final List roomsFound = new ArrayList<>();
+ Logger logger = LogManager.getLogger("MapProcessor");
+ /**
+ * If the player on the map is closer than value this it won't save it
+ * this should be done with render-distance but whateva
+ */
+ int clossnessDistance = 50;
+ @Getter
+ @Setter
+ private Dimension unitRoomDimension;
+ @Getter @Setter
+ private Dimension doorDimensions; // width: width of door, height: gap between rooms
+ @Getter
+ @Setter
+ private Point topLeftMapPoint;
+ @Setter
+ private boolean bugged = false;
+ @Getter
+ private boolean initialized = false;
+ @Getter
+ private int undiscoveredRoom = 0;
+ private boolean processed = false;
+ @Getter
+ private MapData latestMapData;
+ private int waitDelay = 0;
+ private boolean processlock;
+
+ public MapProcessor(DungeonContext context) {
+ this.context = context;
+ }
+
+ private static void error(String prefix) {
+ ChatTransmitter.addToQueue(new ChatComponentText(ChatTransmitter.prefix + prefix));
+ }
+
+
+ ExecutorService es = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("Dg-MapProcessor-%d").build());
+
+
+ int processMapThroddle;
+
+ public void tick() {
+ if (waitDelay < 5) {
+ waitDelay++;
+ return;
+ }
+ if (bugged) {
+ return;
+ }
+ ItemStack stack = Minecraft.getMinecraft().thePlayer.inventory.getStackInSlot(8);
+
+ if (stack == null || !(stack.getItem() instanceof ItemMap)) {
+ return;
+ }
+
+ MapData mapData = ((ItemMap) stack.getItem()).getMapData(stack, mc.theWorld);
+
+ if (mapData != null) {
+
+ if(processMapThroddle > 5 && !processlock){
+ processMapData(mapData.colors);
+ processMapThroddle = 0;
+ }
+ processMapThroddle++;
+
+ }
+
+ latestMapData = mapData;
+
+ if (latestMapData != null && mapIconToPlayerMap.size() < context.getPlayers().size() && initialized) {
+ getPlayersFromMap(latestMapData);
+ }
+
+ }
+
+ private void processMapData(byte[] mapColorData) {
+
+ // i just cant get this to work sad
+ if (isThereDifference(latestMapData.colors, mapColorData)) {
+ context.createEvent(new DungeonMapUpdateEvent(mapColorData));
+
+ es.execute(() -> {
+ processlock = true;
+ if (doorDimensions == null || !initialized) {
+ assembleMap(mapColorData);
+ } else {
+ processMap(mapColorData);
+ }
+
+ if (context.isEnded()) {
+ processFinishedMap(mapColorData);
+ }
+ processlock = false;
+ });
+
+ }
+
+ }
+
+ void assembleMap(final byte[] mapData){
+ DungeonMapData data = new DungeonMapData(context, Minecraft.getMinecraft());
+
+ data.eat(mapData);
+
+ bugged = data.bugged;
+
+ unitRoomDimension = data.unitRoomDimension;
+
+ topLeftMapPoint = data.topLeftMapPoint;
+
+ initialized = data.initialized;
+
+ doorDimensions = data.doorDimensions;
+
+ }
+
+
+ public static Point mapPointToRoomPoint(Point mapPoint, Point topLeftMapPoint, Dimension unitRoomDimension, Dimension doorDimensions) {
+ int x = (int) ((mapPoint.x - topLeftMapPoint.x) / ((double) unitRoomDimension.width + doorDimensions.height));
+ int y = (int) ((mapPoint.y - topLeftMapPoint.y) / ((double) unitRoomDimension.height + doorDimensions.height));
+ return new Point(x, y);
+ }
+
+ public BlockPos mapPointToWorldPoint(Point mapPoint) {
+ int x = (int) ((mapPoint.x - topLeftMapPoint.x) / ((double) unitRoomDimension.width + doorDimensions.height) * 32 + context.getDungeonMin().getX());
+ int y = (int) ((mapPoint.y - topLeftMapPoint.y) / ((double) unitRoomDimension.height + doorDimensions.height) * 32 + context.getDungeonMin().getZ());
+ return new BlockPos(x, 70, y);
+ }
+
+ public Point roomPointToMapPoint(Point roomPoint) {
+ return new Point(roomPoint.x * (unitRoomDimension.width + doorDimensions.height) + topLeftMapPoint.x, roomPoint.y * (unitRoomDimension.height + doorDimensions.height) + topLeftMapPoint.y);
+ }
+
+ public BlockPos roomPointToWorldPoint(Point roomPoint) {
+ return new BlockPos(context.getDungeonMin().getX() + (roomPoint.x * 32), context.getDungeonMin().getY(), context.getDungeonMin().getZ() + (roomPoint.y * 32));
+ }
+
+ public Point worldPointToRoomPoint(BlockPos worldPoint) {
+ if (context.getDungeonMin() == null) return null;
+ return new Point((worldPoint.getX() - context.getDungeonMin().getX()) / 32, (worldPoint.getZ() - context.getDungeonMin().getZ()) / 32);
+ }
+
+ public Point worldPointToMapPoint(Vec3 worldPoint) {
+ if (context.getDungeonMin() == null) return null;
+ return new Point(topLeftMapPoint.x + (int) ((worldPoint.xCoord - context.getDungeonMin().getX()) / 32.0f * (unitRoomDimension.width + doorDimensions.height)), topLeftMapPoint.y + (int) ((worldPoint.zCoord - context.getDungeonMin().getZ()) / 32.0f * (unitRoomDimension.height + doorDimensions.height)));
+ }
+
+ public Vector2d worldPointToMapPointFLOAT(Vec3 worldPoint) {
+ if (context.getDungeonMin() == null) return null;
+ double x = topLeftMapPoint.x + ((worldPoint.xCoord - context.getDungeonMin().getX()) / 32.0f * (unitRoomDimension.width + doorDimensions.height));
+ double y = topLeftMapPoint.y + ((worldPoint.zCoord - context.getDungeonMin().getZ()) / 32.0f * (unitRoomDimension.height + doorDimensions.height));
+ return new Vector2d(x, y);
+ }
+
+ private void processMap(byte[] mapData) {
+ int roomHeight = (int) ((128.0 - topLeftMapPoint.y) / (unitRoomDimension.height + doorDimensions.height));
+ int roomWidth = (int) ((128.0 - topLeftMapPoint.x) / (unitRoomDimension.width + doorDimensions.height));
+ if (MapUtils.getMapColorAt(mapData, 0, 0) != 0) return;
+ undiscoveredRoom = 0;
+ for (int y = 0; y <= roomHeight; y++) {
+ for (int x = 0; x <= roomWidth; x++) {
+ Point mapPoint = roomPointToMapPoint(new Point(x, y));
+ byte color = MapUtils.getMapColorAt(mapData, mapPoint.x, mapPoint.y);
+ MapUtils.record(mapData, mapPoint.x, mapPoint.y, new Color(255, 255, 0, 80));
+ if (roomsFound.contains(new Point(x, y))) {
+ DungeonRoom dungeonRoom = context.getRoomMapper().get(new Point(x, y));
+ if (color == 18 && dungeonRoom.getCurrentState() != DungeonRoom.RoomState.FINISHED) {
+ dungeonRoom.setCurrentState(DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS);
+ dungeonRoom.setTotalSecrets(0);
+ } else if (color == 30) {
+ dungeonRoom.setCurrentState(DungeonRoom.RoomState.FINISHED);
+ dungeonRoom.setTotalSecrets(0);
+ } else if (dungeonRoom.getCurrentState() != DungeonRoom.RoomState.FINISHED) {
+ byte centerColor = MapUtils.getMapColorAt(mapData, mapPoint.x + unitRoomDimension.width / 2, mapPoint.y + unitRoomDimension.height / 2);
+ MapUtils.record(mapData, mapPoint.x + unitRoomDimension.width / 2, mapPoint.y + unitRoomDimension.height / 2, new Color(0, 255, 0, 80));
+ if (centerColor == 34) {
+ dungeonRoom.setCurrentState(DungeonRoom.RoomState.COMPLETE_WITHOUT_SECRETS);
+ } else if (centerColor == 30) {
+ dungeonRoom.setCurrentState(DungeonRoom.RoomState.FINISHED);
+ } else if (centerColor == 18) { // red
+ dungeonRoom.setCurrentState(DungeonRoom.RoomState.FAILED);
+ }
+ }
+ if (dungeonRoom.getTotalSecrets() == -1) {
+ if (dungeonRoom.getColor() == 82 || dungeonRoom.getColor() == 74) {
+ dungeonRoom.setTotalSecrets(0);
+ }
+ MapUtils.record(mapData, mapPoint.x, mapPoint.y + 1, new Color(0, 255, 0, 80));
+ }
+ continue;
+ }
+
+ if (color != 0 && color != 85) {
+ MapUtils.record(mapData, mapPoint.x, mapPoint.y, new Color(0, 255, 255, 80));
+ DungeonRoom room = buildRoom(mapData, new Point(x, y));
+
+
+ // USELESS DEBUG CODE
+ context.createEvent(new DungeonRoomDiscoverEvent(room.getUnitPoints().get(0), room.getRoomMatcher().getRotation(), new SerializableBlockPos(room.getMin()), new SerializableBlockPos(room.getMax()), room.getShape(), room.getColor(), room.getDungeonRoomInfo().getUuid(), room.getDungeonRoomInfo().getName(), room.getDungeonRoomInfo().getProcessorId()));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("New Map discovered! shape: " + room.getShape() + " color: " + room.getColor() + " unitPos: " + x + "," + y));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("New Map discovered! mapMin: " + room.getMin() + " mapMx: " + room.getMax()));
+ StringBuilder builder = new StringBuilder();
+ for (int dy = 0; dy < 4; dy++) {
+ builder.append("\n");
+ for (int dx = 0; dx < 4; dx++) {
+ boolean isSet = ((room.getShape() >> (dy * 4 + dx)) & 0x1) != 0;
+ builder.append(isSet ? "O" : "X");
+ }
+ }
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Shape visual: " + builder));
+ // END
+
+
+ context.getDungeonRoomList().add(room);
+ for (Point p : room.getUnitPoints()) {
+ roomsFound.add(p);
+ context.getRoomMapper().put(p, room);
+ }
+ if (room.getRoomProcessor() != null && room.getRoomProcessor().readGlobalChat()) {
+ context.getGlobalRoomProcessors().add(room.getRoomProcessor());
+ }
+ } else if (color == 85) {
+ undiscoveredRoom++;
+ }
+
+ }
+ }
+ }
+
+ private DungeonRoom buildRoom(byte[] mapData, Point unitPoint) {
+ Queue toCheck = new LinkedList<>();
+ toCheck.add(new Point[]{unitPoint, unitPoint}); // requestor, target
+ Set checked = new HashSet<>();
+ List ayConnected = new ArrayList<>();
+
+ int minX = Integer.MAX_VALUE;
+ int minY = Integer.MAX_VALUE;
+ int maxX = 0;
+ int maxY = 0;
+ while (toCheck.peek() != null) {
+ Point[] check = toCheck.poll();
+ if (checked.contains(check[1])) {
+ continue;
+ }
+ checked.add(check[1]);
+
+ if (checkIfConnected(mapData, check[0], check[1])) {
+ ayConnected.add(check[1]);
+ if (check[1].x < minX) minX = check[1].x;
+ if (check[1].y < minY) minY = check[1].y;
+ if (check[1].x > maxX) maxX = check[1].x;
+ if (check[1].y > maxY) maxY = check[1].y;
+ for (Vector2d dir : directions) {
+ Point newPt = new Point(check[1].x + (int) dir.x, check[1].y + (int) dir.y);
+ toCheck.add(new Point[]{check[1], newPt});
+ }
+ }
+ }
+
+ short shape = 0;
+ for (Point p : ayConnected) {
+ int localX = p.x - minX;
+ int localY = p.y - minY;
+ shape |= 1 << (localY * 4 + localX);
+ }
+ Set doors = new HashSet<>();
+ for (Point p : ayConnected) {
+ for (Vector2d v : door_dirs) {
+ Vector2d v2 = new Vector2d(p.x + v.x, p.y + v.y);
+ if (doors.contains(v2)) doors.remove(v2);
+ else doors.add(v2);
+ }
+ }
+ Point pt2 = roomPointToMapPoint(ayConnected.get(0));
+ byte unit1 = MapUtils.getMapColorAt(mapData, pt2.x, pt2.y);
+
+ // 0: none 1: open door 2. unopen door 3: wither door 4. red door
+ Set> doorsAndStates = new HashSet<>();
+ final int halfWidth = unitRoomDimension.width + 4;
+ for (Vector2d door : doors) {
+ int floorX = (int) Math.floor(door.x);
+ int floorY = (int) Math.floor(door.y);
+ Point mapPt = roomPointToMapPoint(new Point(floorX, floorY));
+ Point target = new Point(mapPt.x + unitRoomDimension.width / 2 + (int) (halfWidth * (door.x - floorX)), mapPt.y + unitRoomDimension.height / 2 + (int) (halfWidth * (door.y - floorY)));
+ MapUtils.record(mapData, target.x, target.y, Color.green);
+
+ byte color = MapUtils.getMapColorAt(mapData, target.x, target.y);
+
+ Vector2d vector2d = new Vector2d(door.x - minX, door.y - minY);
+
+ if (color == 0) {
+ doorsAndStates.add(new Tuple<>(vector2d, EDungeonDoorType.NONE));
+ } else if (color == 85) {
+ doorsAndStates.add(new Tuple<>(vector2d, EDungeonDoorType.UNOPEN));
+ } else if (color == 119) {
+ doorsAndStates.add(new Tuple<>(vector2d, EDungeonDoorType.WITHER));
+ } else if (color == 18 && unit1 != 18) {
+ doorsAndStates.add(new Tuple<>(vector2d, EDungeonDoorType.BLOOD));
+ } else {
+ doorsAndStates.add(new Tuple<>(vector2d, EDungeonDoorType.ENTRANCE));
+ }
+
+ }
+
+
+ return new DungeonRoom(ayConnected, shape, unit1, roomPointToWorldPoint(new Point(minX, minY)), roomPointToWorldPoint(new Point(maxX + 1, maxY + 1)).add(-1, 0, -1), context, doorsAndStates);
+
+ }
+
+ private boolean checkIfConnected(byte[] mapData, Point unitPoint1, Point unitPoint2) {
+ if (unitPoint1 == unitPoint2) return true;
+ if (unitPoint1.equals(unitPoint2)) return true;
+
+
+ Point high;
+ if (unitPoint2.y > unitPoint1.y) {
+ high = unitPoint2;
+ } else {
+ if (unitPoint2.x > unitPoint1.x) {
+ high = unitPoint2;
+ } else {
+ high = unitPoint1;
+ }
+ }
+
+ Point low;
+ if (high == unitPoint2) {
+ low = unitPoint1;
+ } else {
+ low = unitPoint2;
+ }
+
+ int xOff = low.x - high.x;
+ int yOff = low.y - high.y;
+ Point pt = roomPointToMapPoint(high);
+ Point pt2 = roomPointToMapPoint(low);
+ byte unit1 = MapUtils.getMapColorAt(mapData, pt.x, pt.y);
+ byte unit2 = MapUtils.getMapColorAt(mapData, pt2.x, pt2.y);
+ pt.translate(xOff, yOff);
+ byte unit3 = MapUtils.getMapColorAt(mapData, pt.x, pt.y);
+
+ return unit1 == unit2 && unit2 == unit3 && unit1 != 0;
+ }
+
+ public boolean isThereDifference(byte[] colorData, byte[] colorData1) {
+
+ return true;
+// boolean equals = Arrays.equals(colorData1, colorData);
+//
+// boolean foundDIffrentThen0 = false;
+//
+//
+// for (byte colorDatum : colorData) {
+// if(colorDatum != 0){
+// foundDIffrentThen0 = true;
+// break;
+// }
+// }
+//
+//
+// return !(equals && foundDIffrentThen0);
+ }
+
+ private void processFinishedMap(byte[] mapData) {
+ if (MapUtils.getMapColorAt(mapData, 0, 0) == 0) {
+ return;
+ }
+ if (processed) {
+ return;
+ }
+ processed = true;
+
+ MapUtils.clearMap();
+ MapUtils.record(mapData, 0, 0, Color.GREEN);
+
+
+ FeatureRegistry.ETC_COLLECT_SCORE.collectDungeonRunData(mapData, context);
+
+ }
+
+ private void getPlayersFromMap(MapData mapdata) {
+
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("Getting players from map");
+
+ for (Map.Entry stringVec4bEntry : mapdata.mapDecorations.entrySet()) {
+ String mapDecString = stringVec4bEntry.getKey();
+ Vec4b vec4 = stringVec4bEntry.getValue();
+
+ if (!mapIconToPlayerMap.containsValue(mapDecString)) {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("mapIconToPlayerMap dosent have Player");
+
+ int x = vec4.func_176112_b() / 2 + 64;
+ int y = vec4.func_176113_c() / 2 + 64;
+ BlockPos mapPos = mapPointToWorldPoint(new Point(x, y));
+ String potentialPlayer = null;
+
+ for (String player : context.getPlayers()) {
+ if (DungeonsGuide.getDungeonsGuide().verbose)
+ logger.info("Player: {} isNear: {} ", player, isPlayerNear(player, mapPos));
+// if (!mapIconToPlayerMap.containsKey(player) && isPlayerNear(player, mapPos)) {
+ if (!mapIconToPlayerMap.containsKey(player)) {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("Potential profile is: " + player);
+ potentialPlayer = player;
+ break;
+ }
+ }
+
+
+ if (potentialPlayer != null) {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("potentialPlayer is not null");
+ boolean shouldSave = true;
+
+ for (Map.Entry vec4bEntry : mapdata.mapDecorations.entrySet()) {
+// String aaa = vec4bEntry.getKey();
+ Vec4b bbb = vec4bEntry.getValue();
+
+// if (mapIconToPlayerMap.containsValue(aaa) || mapDecString.equals(aaa)) {
+// shouldSave = false;
+// break;
+// }
+// else {
+ int x2 = bbb.func_176112_b() / 2 + 64;
+ int y2 = bbb.func_176113_c() / 2 + 64;
+ int dx = x2 - x;
+ int dy = y2 - y;
+ if (dx * dx + dy * dy < clossnessDistance) {
+ shouldSave = false;
+ break;
+ }
+// }
+ }
+
+ if (shouldSave) {
+ if (DungeonsGuide.getDungeonsGuide().verbose)
+ logger.info("added {} to mapIconPlayerMap with {}", potentialPlayer, stringVec4bEntry.getKey());
+ if (mapIconToPlayerMap.containsKey(potentialPlayer)) {
+ mapIconToPlayerMap.replace(potentialPlayer, stringVec4bEntry.getKey());
+ } else {
+ mapIconToPlayerMap.put(potentialPlayer, stringVec4bEntry.getKey());
+ }
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("mapIconToPlayerMap:");
+ if (DungeonsGuide.getDungeonsGuide().verbose)
+ mapIconToPlayerMap.forEach((key, value) -> logger.info(" {}: {}", key, value));
+ } else {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("shouldSave is false");
+ }
+
+
+ } else {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("potentialPlayer is null");
+ }
+
+ } else {
+ if (DungeonsGuide.getDungeonsGuide().verbose) logger.info("mapIconToPlayerMap has player ");
+ }
+ }
+
+
+ }
+
+ private boolean isPlayerNear(String player, BlockPos mapPos) {
+ EntityPlayer entityPlayer = Minecraft.getMinecraft().theWorld.getPlayerEntityByName(player);
+
+ if (entityPlayer != null && !entityPlayer.isInvisible()) {
+ BlockPos pos = entityPlayer.getPosition();
+ int dx = mapPos.getX() - pos.getX();
+ int dz = mapPos.getZ() - pos.getZ();
+ return dx * dx + dz * dz < clossnessDistance;
+
+ }
+
+ return false;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/AbstractAction.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/AbstractAction.java
new file mode 100644
index 00000000..d465fd47
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/AbstractAction.java
@@ -0,0 +1,61 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.events.impl.PlayerInteractEntityEvent;
+import net.minecraftforge.event.entity.living.LivingDeathEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+
+import java.util.Set;
+
+public abstract class AbstractAction {
+ public void onPlayerInteract(DungeonRoom dungeonRoom, PlayerInteractEvent event, ActionRouteProperties actionRouteProperties){
+
+ }
+
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+
+ }
+
+ public void onLivingDeath(DungeonRoom dungeonRoom, LivingDeathEvent event, ActionRouteProperties actionRouteProperties) {
+
+ }
+
+ public void onRenderScreen(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties) {
+
+ }
+
+ public void onLivingInteract(DungeonRoom dungeonRoom, PlayerInteractEntityEvent event, ActionRouteProperties actionRouteProperties) {
+
+ }
+
+ public void onTick(DungeonRoom dungeonRoom, ActionRouteProperties actionRouteProperties) {
+
+ }
+
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return null;
+ }
+
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return false;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionBreakWithSuperBoom.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionBreakWithSuperBoom.java
new file mode 100755
index 00000000..baab261f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionBreakWithSuperBoom.java
@@ -0,0 +1,103 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.BlockRendererDispatcher;
+import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.client.renderer.WorldRenderer;
+import net.minecraft.client.renderer.texture.TextureMap;
+import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
+import net.minecraft.entity.Entity;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.BlockPos;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionBreakWithSuperBoom extends AbstractAction {
+ private Set preRequisite = new HashSet();
+ private OffsetPoint target;
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return false;
+ }
+
+ public ActionBreakWithSuperBoom(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
+
+ BlockPos blockpos = target.getBlockPos(dungeonRoom);
+
+ Entity viewing_from = Minecraft.getMinecraft().getRenderViewEntity();
+
+ double x_fix = viewing_from.lastTickPosX + ((viewing_from.posX - viewing_from.lastTickPosX) * partialTicks);
+ double y_fix = viewing_from.lastTickPosY + ((viewing_from.posY - viewing_from.lastTickPosY) * partialTicks);
+ double z_fix = viewing_from.lastTickPosZ + ((viewing_from.posZ - viewing_from.lastTickPosZ) * partialTicks);
+
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(-x_fix, -y_fix, -z_fix);
+ GlStateManager.disableLighting();
+ GlStateManager.enableAlpha();
+ GlStateManager.disableDepth();
+ GlStateManager.depthMask(false);
+ GlStateManager.enableBlend();
+
+ Tessellator tessellator = Tessellator.getInstance();
+ WorldRenderer vertexbuffer = tessellator.getWorldRenderer();
+ vertexbuffer.begin(7, DefaultVertexFormats.BLOCK);
+
+ BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
+ blockrendererdispatcher.getBlockModelRenderer().renderModel(Minecraft.getMinecraft().theWorld,
+ blockrendererdispatcher.getBlockModelShapes().getModelForState(Blocks.tnt.getDefaultState()),
+ Blocks.tnt.getDefaultState(), blockpos, vertexbuffer, false);
+ tessellator.draw();
+
+ GlStateManager.enableLighting();
+ GlStateManager.popMatrix();
+
+ RenderUtils.highlightBlock(blockpos, new Color(0, 255,255,50), partialTicks, true);
+ RenderUtils.drawTextAtWorld("Superboom", blockpos.getX() + 0.5f, blockpos.getY() + 0.5f, blockpos.getZ() + 0.5f, 0xFFFFFF00, 0.03f, false, false, partialTicks);
+ }
+
+ @Override
+ public String toString() {
+ return "BreakWithSuperboom\n- target: "+target.toString();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionChangeState.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionChangeState.java
new file mode 100755
index 00000000..634129c6
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionChangeState.java
@@ -0,0 +1,75 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonDummy;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.dunegonmechanic.DungeonMechanic;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionChangeState extends AbstractAction {
+ @EqualsAndHashCode.Exclude
+ private Set preRequisite2 = new HashSet();
+
+ private String mechanicName;
+ private String state;
+
+ public ActionChangeState(String mechanicName, String state) {
+ this.mechanicName = mechanicName;
+ this.state = state;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ Set set = new HashSet<>(preRequisite2);
+ DungeonMechanic mechanic = dungeonRoom.getMechanics().get(mechanicName);
+ if (mechanic!= null)
+ set.addAll(mechanic.getAction(state, dungeonRoom));
+ return set;
+ }
+ @Override
+ public String toString() {
+ return "ChangeState\n- target: "+mechanicName+"\n- state: "+state;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ DungeonMechanic mechanic = dungeonRoom.getMechanics().get(mechanicName);
+ if (state.equalsIgnoreCase("navigate")) {
+ return true;
+ }
+ if (mechanic == null) {
+ return false;
+ }
+ if (mechanic instanceof DungeonSecret && ((DungeonSecret) mechanic).getSecretType() != DungeonSecret.SecretType.CHEST) {
+ return true;
+ }
+ if (mechanic instanceof DungeonDummy) {
+ return true;
+ }
+ return mechanic.getCurrentState(dungeonRoom).equalsIgnoreCase(state);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClick.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClick.java
new file mode 100755
index 00000000..c9ffb81c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClick.java
@@ -0,0 +1,82 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.BlockPos;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionClick extends AbstractAction {
+ private Set preRequisite = new HashSet();
+ private OffsetPoint target;
+ private Predicate predicate = Predicates.alwaysTrue();
+
+ private boolean clicked = false;
+
+ public ActionClick(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return clicked;
+ }
+
+ @Override
+ public void onPlayerInteract(DungeonRoom dungeonRoom, PlayerInteractEvent event, ActionRouteProperties actionRouteProperties) {
+ if (clicked) return;
+ if (target.getBlockPos(dungeonRoom).equals(event.pos) &&
+ (predicate == null || predicate.apply(event.entityLiving.getHeldItem()))) {
+ clicked = true;
+ ChatTransmitter.sendDebugChat("ACTION FINISHED: CLICK");
+ }
+ }
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+ RenderUtils.highlightBlock(pos, new Color(0, 255,255,50),partialTicks, true);
+ RenderUtils.drawTextAtWorld("Click", pos.getX() + 0.5f, pos.getY() + 0.3f, pos.getZ() + 0.5f, 0xFFFFFF00, 0.02f, false, false, partialTicks);
+ }
+
+
+ @Override
+ public String toString() {
+ return "Click\n- target: "+target.toString()+"\n- predicate: "+predicate.getClass().getSimpleName();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClickSet.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClickSet.java
new file mode 100755
index 00000000..01f5b9b2
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionClickSet.java
@@ -0,0 +1,90 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.BlockPos;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Predicate;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionClickSet extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+ private OffsetPointSet target;
+ private Predicate predicate = stack -> true;
+
+ public ActionClickSet(OffsetPointSet target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public String toString() {
+ return "ClickSet\n- targets size: "+target.getOffsetPointList().size()+"\n- predicate: "+predicate.getClass().getSimpleName();
+ }
+
+ private boolean clicked = false;
+ @Override
+ public void onPlayerInteract(DungeonRoom dungeonRoom, PlayerInteractEvent event, ActionRouteProperties actionRouteProperties) {
+ if (clicked) return;
+ for (OffsetPoint pt2: target.getOffsetPointList()) {
+ if (pt2.getBlockPos(dungeonRoom).equals(event.pos) && predicate.test(event.entityLiving.getHeldItem())) {
+ clicked = true;
+ }
+ }
+
+ }
+
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ float xAcc = 0;
+ float yAcc = 0;
+ float zAcc = 0;
+ int size = target.getOffsetPointList().size();
+ for (OffsetPoint offsetPoint : target.getOffsetPointList()) {
+ BlockPos pos = offsetPoint.getBlockPos(dungeonRoom);
+ xAcc += pos.getX() + 0.5f;
+ yAcc += pos.getY()+ 0.5f;
+ zAcc += pos.getZ()+ 0.5f;
+ RenderUtils.highlightBlock(offsetPoint.getBlockPos(dungeonRoom), new Color(0, 255,255,50),partialTicks, true);
+ }
+
+ RenderUtils.drawTextAtWorld("Click", xAcc / size, yAcc / size, zAcc / size, 0xFFFFFF00, 0.02f, false, false, partialTicks);
+ }
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return clicked;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionComplete.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionComplete.java
new file mode 100644
index 00000000..32d6bfc3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionComplete.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+
+import java.util.Collections;
+import java.util.Set;
+
+public class ActionComplete extends AbstractAction {
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return Collections.emptySet();
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return "Completed";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionDropItem.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionDropItem.java
new file mode 100755
index 00000000..0c94e5ae
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionDropItem.java
@@ -0,0 +1,82 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.BlockPos;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class ActionDropItem extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+ private OffsetPoint target;
+ private Predicate predicate = Predicates.alwaysTrue();
+
+ public ActionDropItem(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ BlockPos secretLocation = target.getBlockPos(dungeonRoom);
+ List item = dungeonRoom.getContext().getWorld().getEntitiesWithinAABB(EntityItem.class,
+ AxisAlignedBB.fromBounds(
+ secretLocation.getX(),
+ secretLocation.getY(),
+ secretLocation.getZ(),
+ secretLocation.getX() + 1,
+ secretLocation.getY() + 1,
+ secretLocation.getZ() + 1));
+ if (item.isEmpty()) {
+ return false;
+ }
+ return (predicate == null || predicate.apply(item.get(0)));
+ }
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+ RenderUtils.highlightBlock(pos, new Color(0, 255, 255, 50), partialTicks, true);
+ RenderUtils.drawTextAtWorld("Drop Item", pos.getX() + 0.5f, pos.getY() + 0.3f, pos.getZ() + 0.5f, 0xFFFFFF00, 0.02f, false, false, partialTicks);
+ }
+
+
+ @Override
+ public String toString() {
+ return "DropItem\n- target: " + target.toString() + "\n- predicate: " + predicate.getClass().getSimpleName();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionInteract.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionInteract.java
new file mode 100755
index 00000000..b41e1b7a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionInteract.java
@@ -0,0 +1,89 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonActionContext;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.events.impl.PlayerInteractEntityEvent;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.Vec3;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Predicate;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionInteract extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+ private OffsetPoint target;
+ private Predicate predicate = entity -> false;
+ private int radius;
+
+ public ActionInteract(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return interacted;
+ }
+
+ private boolean interacted = false;
+ @Override
+ public void onLivingInteract(DungeonRoom dungeonRoom, PlayerInteractEntityEvent event, ActionRouteProperties actionRouteProperties) {
+ if (interacted) return;
+
+ Vec3 spawnLoc = DungeonActionContext.getSpawnLocation().get(event.getEntity().getEntityId());
+ if (spawnLoc == null) {
+ return;
+ }
+ if (target.getBlockPos(dungeonRoom).distanceSq(spawnLoc.xCoord, spawnLoc.yCoord, spawnLoc.zCoord) > radius * radius) {
+ return;
+ }
+ if (!predicate.test(event.getEntity())) {
+ return;
+ }
+ interacted = true;
+ }
+
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+ RenderUtils.highlightBlock(pos, new Color(0, 255,255,50),partialTicks, true);
+ RenderUtils.drawTextAtWorld("Interact", pos.getX() + 0.5f, pos.getY() + 0.3f, pos.getZ() + 0.5f, 0xFFFFFF00, 0.02f, false, false, partialTicks);
+ }
+
+ @Override
+ public String toString() {
+ return "InteractEntity\n- target: "+target.toString()+"\n- radius: "+radius+"\n- predicate: "+(predicate.test(null) ? "null" : predicate.getClass().getSimpleName());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionKill.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionKill.java
new file mode 100755
index 00000000..94569ad1
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionKill.java
@@ -0,0 +1,90 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonActionContext;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.Vec3;
+import net.minecraftforge.event.entity.living.LivingDeathEvent;
+
+import java.awt.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.function.Predicate;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionKill extends AbstractAction {
+ private Set preRequisite = new HashSet();
+ private OffsetPoint target;
+ private Predicate predicate = entity -> false;
+ private int radius;
+
+ public ActionKill(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ Vec3 spawn = new Vec3(target.getBlockPos(dungeonRoom));
+ for (Integer killed : DungeonActionContext.getKilleds()) {
+ if (DungeonActionContext.getSpawnLocation().get(killed) == null) continue;
+ if (DungeonActionContext.getSpawnLocation().get(killed).squareDistanceTo(spawn) < 100) {
+ return true;
+ }
+ }
+
+ return killed;
+ }
+
+ private boolean killed = false;
+ @Override
+ public void onLivingDeath(DungeonRoom dungeonRoom, LivingDeathEvent event, ActionRouteProperties actionRouteProperties) {
+ if (killed) return;
+
+ Vec3 spawnLoc = DungeonActionContext.getSpawnLocation().get(event.entity.getEntityId());
+ if (spawnLoc == null) return;
+ if (target.getBlockPos(dungeonRoom).distanceSq(spawnLoc.xCoord, spawnLoc.yCoord, spawnLoc.zCoord) > radius * radius) return;
+ if (!predicate.test(event.entity)) return;
+ killed = true;
+ }
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+ RenderUtils.highlightBlock(pos, new Color(0, 255,255,50),partialTicks, true);
+ RenderUtils.drawTextAtWorld("Spawn", pos.getX() + 0.5f, pos.getY() + 0.3f, pos.getZ() + 0.5f, 0xFFFFFF00, 0.02f, false, false, partialTicks);
+ }
+
+ @Override
+ public String toString() {
+ return "KillEntity\n- target: "+target.toString()+"\n- radius: "+radius+"\n- predicate: "+(predicate.test(null) ? "null" : predicate.getClass().getSimpleName());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java
new file mode 100755
index 00000000..f499032d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMove.java
@@ -0,0 +1,122 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.Vec3;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionMove extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+ private OffsetPoint target;
+
+ public ActionMove(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return target.getBlockPos(dungeonRoom).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()) < 25;
+ }
+
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ draw(dungeonRoom, partialTicks, actionRouteProperties, flag, target, poses);
+ }
+
+ static void draw(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag, OffsetPoint target, List poses) {
+ BlockPos pos = target.getBlockPos(dungeonRoom);
+
+ float distance = MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()));
+ float multiplier = distance / 120f; //mobs only render ~120 blocks away
+ if (flag) multiplier *= 2.0f;
+ float scale = 0.45f * multiplier;
+ scale *= 25.0 / 6.0;
+ if (actionRouteProperties.isBeacon()) {
+ if(!FeatureRegistry.RENDER_BREACONS.isEnabled()){
+ RenderUtils.renderBeaconBeam(pos.getX(), pos.getY(), pos.getZ(), actionRouteProperties.getBeaconBeamColor(), partialTicks);
+ }
+ RenderUtils.highlightBlock(pos, actionRouteProperties.getBeaconColor(), partialTicks);
+ }
+ if(!FeatureRegistry.RENDER_DESTENATION_TEXT.isEnabled()){
+ RenderUtils.drawTextAtWorld("Destination", pos.getX() + 0.5f, pos.getY() + 0.5f + scale, pos.getZ() + 0.5f, 0xFF00FF00, flag ? 2f : 1f, true, false, partialTicks);
+ }
+ RenderUtils.drawTextAtWorld(String.format("%.2f",MathHelper.sqrt_double(pos.distanceSq(Minecraft.getMinecraft().thePlayer.getPosition())))+"m", pos.getX() + 0.5f, pos.getY() + 0.5f - scale, pos.getZ() + 0.5f, 0xFFFFFF00, flag ? 2f : 1f, true, false, partialTicks);
+
+ if (!FeatureRegistry.SECRET_TOGGLE_KEY.isEnabled() || !FeatureRegistry.SECRET_TOGGLE_KEY.togglePathfindStatus) {
+ if (poses != null){
+ RenderUtils.drawLinesVec3(poses, actionRouteProperties.getLineColor(), actionRouteProperties.getLineWidth(), partialTicks, true);
+ }
+ }
+ }
+
+ private int tick = -1;
+ private List poses;
+ private Future> latestFuture;
+
+ @Override
+ public void onTick(DungeonRoom dungeonRoom, ActionRouteProperties actionRouteProperties) {
+ tick = (tick+1) % Math.max(1, actionRouteProperties.getLineRefreshRate());
+ if (latestFuture != null && latestFuture.isDone()) {
+ try {
+ poses = latestFuture.get();
+ latestFuture = null;
+ } catch (InterruptedException | ExecutionException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (tick == 0 && actionRouteProperties.isPathfind() && latestFuture == null) {
+ if (!FeatureRegistry.SECRET_FREEZE_LINES.isEnabled() || poses == null) {
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
+ }
+ }
+ }
+
+ public void forceRefresh(DungeonRoom dungeonRoom) {
+ if (latestFuture == null) {
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
+ }
+ }
+ @Override
+ public String toString() {
+ return "Move\n- target: "+target.toString();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java
new file mode 100755
index 00000000..54e8b1a8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionMoveNearestAir.java
@@ -0,0 +1,92 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree.ActionRouteProperties;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.Vec3;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionMoveNearestAir extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+ private OffsetPoint target;
+
+ public ActionMoveNearestAir(OffsetPoint target) {
+ this.target = target;
+ }
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return target.getBlockPos(dungeonRoom).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()) < 25;
+ }
+ @Override
+ public void onRenderWorld(DungeonRoom dungeonRoom, float partialTicks, ActionRouteProperties actionRouteProperties, boolean flag) {
+ ActionMove.draw(dungeonRoom, partialTicks, actionRouteProperties, flag, target, poses);
+ }
+
+ private int tick = -1;
+ private List poses;
+ private Future> latestFuture;
+ @Override
+ public void onTick(DungeonRoom dungeonRoom, ActionRouteProperties actionRouteProperties) {
+ tick = (tick+1) % Math.max(1, actionRouteProperties.getLineRefreshRate());
+ if (latestFuture != null && latestFuture.isDone()) {
+ try {
+ poses = latestFuture.get();
+ latestFuture = null;
+ } catch (InterruptedException | ExecutionException e) {
+ e.printStackTrace();
+ }
+ }
+
+ if (tick == 0 && actionRouteProperties.isPathfind() && latestFuture == null) {
+ if (!FeatureRegistry.SECRET_FREEZE_LINES.isEnabled() || poses == null) {
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
+ }
+ }
+ }
+
+
+ public void forceRefresh(DungeonRoom dungeonRoom) {
+ if (latestFuture == null) {
+ latestFuture = dungeonRoom.createEntityPathTo(dungeonRoom.getContext().getWorld(), Minecraft.getMinecraft().thePlayer, target.getBlockPos(dungeonRoom), Integer.MAX_VALUE, 10000);
+ }
+ }
+ @Override
+ public String toString() {
+ return "MoveNearestAir\n- target: "+target.toString();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionRoot.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionRoot.java
new file mode 100755
index 00000000..23b9fdce
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/ActionRoot.java
@@ -0,0 +1,47 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+@EqualsAndHashCode(callSuper=false)
+public class ActionRoot extends AbstractAction {
+ private Set preRequisite = new HashSet<>();
+
+ @Override
+ public Set getPreRequisites(DungeonRoom dungeonRoom) {
+ return preRequisite;
+ }
+
+ @Override
+ public boolean isComplete(DungeonRoom dungeonRoom) {
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ return "Action Root";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRoute.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRoute.java
new file mode 100644
index 00000000..17cea18d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRoute.java
@@ -0,0 +1,136 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree;
+
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.*;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.events.impl.PlayerInteractEntityEvent;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+import net.minecraftforge.event.entity.living.LivingDeathEvent;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+
+import java.util.List;
+
+public class ActionRoute {
+ @Getter
+ private final String mechanic;
+ @Getter
+ private final String state;
+
+ @Getter
+ private int current;
+ @Getter
+ private final List actions;
+
+ private final DungeonRoom dungeonRoom;
+
+ @Getter
+ private final ActionRouteProperties actionRouteProperties;
+
+ public ActionRoute(DungeonRoom dungeonRoom, String mechanic, String state, ActionRouteProperties actionRouteProperties) {
+ this.mechanic = mechanic;
+ this.state = state;
+ this.actionRouteProperties = actionRouteProperties;
+
+ System.out.println("Creating Action Route with mechanic:" + mechanic + " State:" + state);
+ ActionChangeState actionChangeState = new ActionChangeState(mechanic, state);
+ ActionTree tree= ActionTree.buildActionTree(actionChangeState, dungeonRoom);
+ actions = ActionTreeUtil.linearifyActionTree(tree);
+ actions.add(new ActionComplete());
+ ChatTransmitter.sendDebugChat("Created ActionRoute with " + actions.size() + " steps");
+ ChatTransmitter.sendDebugChat("========== STEPS ==========");
+ for (AbstractAction action : actions) {
+ ChatTransmitter.sendDebugChat(action.toString());
+ }
+ ChatTransmitter.sendDebugChat("=========== END ===========");
+
+
+ current = 0;
+ this.dungeonRoom = dungeonRoom;
+ }
+
+ public AbstractAction next() {
+ current ++;
+ if (current >= actions.size()) {
+ current = actions.size() - 1;
+ }
+ return getCurrentAction();
+ }
+
+ public AbstractAction prev() {
+ current --;
+ if (current < 0) {
+ current = 0;
+ }
+ return getCurrentAction();
+ }
+
+ public AbstractAction getCurrentAction() {
+ return actions.get(current);
+ }
+
+
+
+ public void onPlayerInteract(PlayerInteractEvent event) {
+ getCurrentAction().onPlayerInteract(dungeonRoom, event, actionRouteProperties );
+ }
+ public void onLivingDeath(LivingDeathEvent event) {
+ getCurrentAction().onLivingDeath(dungeonRoom, event, actionRouteProperties );
+ }
+ public void onRenderWorld(float partialTicks, boolean flag) {
+
+ if (current -1 >= 0) {
+ AbstractAction abstractAction = actions.get(current - 1);
+ if(((abstractAction instanceof ActionMove && ((ActionMove) abstractAction).getTarget().getBlockPos(dungeonRoom).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()) >= 25)
+ || (abstractAction instanceof ActionMoveNearestAir && ((ActionMoveNearestAir) abstractAction).getTarget().getBlockPos(dungeonRoom).distanceSq(Minecraft.getMinecraft().thePlayer.getPosition()) >= 25))){
+ abstractAction.onRenderWorld(dungeonRoom, partialTicks, actionRouteProperties, flag );
+ }
+ }
+ getCurrentAction().onRenderWorld(dungeonRoom, partialTicks, actionRouteProperties, flag);
+
+
+ getCurrentAction().onRenderWorld(dungeonRoom, partialTicks, actionRouteProperties, flag);
+ }
+
+ public void onRenderScreen(float partialTicks) {
+ getCurrentAction().onRenderScreen(dungeonRoom, partialTicks, actionRouteProperties);
+ }
+
+ public void onTick() {
+ AbstractAction currentAction = getCurrentAction();
+
+ currentAction.onTick(dungeonRoom, actionRouteProperties);
+ if (this.current -1 >= 0 && (actions.get(this.current-1) instanceof ActionMove || actions.get(this.current-1) instanceof ActionMoveNearestAir)) actions.get(this.current-1).onTick(dungeonRoom, actionRouteProperties );
+
+ if (dungeonRoom.getMechanics().get(mechanic).getCurrentState(dungeonRoom).equals(state)) {
+ this.current = actions.size() - 1;
+ }
+
+ if (currentAction.isComplete(dungeonRoom)) {
+ next();
+ }
+ }
+
+ public void onLivingInteract(PlayerInteractEntityEvent event) {
+ getCurrentAction().onLivingInteract(dungeonRoom, event, actionRouteProperties );
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRouteProperties.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRouteProperties.java
new file mode 100644
index 00000000..df32e718
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionRouteProperties.java
@@ -0,0 +1,16 @@
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree;
+
+import kr.syeyoung.dungeonsguide.mod.config.types.AColor;
+import lombok.Data;
+
+@Data
+public class ActionRouteProperties {
+ private boolean pathfind;
+ private int lineRefreshRate;
+ private AColor lineColor;
+ private float lineWidth;
+
+ private boolean beacon;
+ private AColor beaconColor;
+ private AColor beaconBeamColor;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTree.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTree.java
new file mode 100755
index 00000000..99846fc7
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTree.java
@@ -0,0 +1,94 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.AbstractAction;
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.ActionRoot;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.*;
+
+@Data
+public class ActionTree implements Cloneable {
+ @EqualsAndHashCode.Exclude
+ private Set parent;
+ private AbstractAction current;
+ private Set children;
+
+ @Override
+ public int hashCode() { return current == null ? 0 : current.hashCode(); }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ ActionTree that = (ActionTree) o;
+ return Objects.equals(parent, that.parent) && Objects.equals(current, that.current) && Objects.equals(children, that.children);
+ }
+
+ public static ActionTree buildActionTree(Set actions, DungeonRoom dungeonRoom) {
+ ActionRoot root = new ActionRoot();
+ root.setPreRequisite(actions);
+ ActionTree tree = new ActionTree();
+ tree.setParent(new HashSet<>());
+ tree.setCurrent(root);
+ HashSet set = new HashSet<>();
+ for (AbstractAction action : actions) {
+ set.add(buildActionTree(tree, action, dungeonRoom, new HashMap<>()));
+ }
+ tree.setChildren(set);
+ return tree;
+ }
+ public static ActionTree buildActionTree(AbstractAction actions, DungeonRoom dungeonRoom) {
+ return buildActionTree(null, actions, dungeonRoom, new HashMap<>());
+ }
+
+
+
+ private static ActionTree buildActionTree(ActionTree parent, @NotNull AbstractAction action,@NotNull DungeonRoom dungeonRoom, @NotNull Map alreadyBuilt) {
+ if (alreadyBuilt.containsKey(action)) {
+ ActionTree tree = alreadyBuilt.get(action);
+ tree.getParent().add(parent);
+ return tree;
+ }
+
+ ActionTree tree = new ActionTree();
+ alreadyBuilt.put(action, tree);
+ tree.setParent(new HashSet<>());
+ if (parent != null) {
+ tree.getParent().add(parent);
+ }
+ tree.setCurrent(action);
+ HashSet set = new HashSet<>();
+
+ Set preRequisites = action.getPreRequisites(dungeonRoom);
+ if(preRequisites != null){
+ for (AbstractAction action2 : preRequisites) {
+ ActionTree e = buildActionTree(tree, action2, dungeonRoom, alreadyBuilt);
+ set.add(e);
+ }
+ }
+
+ tree.setChildren(set);
+ return tree;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTreeUtil.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTreeUtil.java
new file mode 100644
index 00000000..18c17c17
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/actions/tree/ActionTreeUtil.java
@@ -0,0 +1,83 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.actions.tree;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.actions.AbstractAction;
+
+import java.util.*;
+
+public class ActionTreeUtil {
+ public static List linearifyActionTree(ActionTree input) {
+ ActionTree tree = copyActionTree(input);
+
+ List actions = new ArrayList();
+
+ int plsHalt = 0;
+ while (tree.getChildren().size() != 0) {
+ plsHalt ++;
+ if (plsHalt > 1000000) throw new IllegalStateException("Linearifying process ran for 1 million cycle");
+ Set visited = new HashSet();
+ ActionTree curr = tree;
+
+ int plsHalt2 = 0;
+ while (curr.getChildren().size() != 0) {
+ plsHalt2 ++;
+ if (plsHalt2 > 1000000) throw new IllegalStateException("Finding the leaf of tree ran for 1 million cycles");
+ if (visited.contains(curr)) throw new IllegalStateException("Circular Reference Detected");
+ visited.add(curr);
+ curr = curr.getChildren().iterator().next();
+ }
+
+ plsHalt2 =0;
+ while(curr.getChildren().size() == 0) {
+ plsHalt2 ++;
+ if (plsHalt2 > 1000000) throw new IllegalStateException("Building of array ran for 1 million cycles");
+
+ actions.add(curr.getCurrent());
+ if (curr.getParent().size() == 0) break;
+ for (ActionTree parentTree:curr.getParent())
+ parentTree.getChildren().remove(curr);
+ curr = curr.getParent().iterator().next();
+ }
+ }
+ return actions;
+ }
+
+ public static ActionTree copyActionTree(ActionTree tree) {
+ Map built = new HashMap();
+ if (tree.getParent().size() != 0) throw new IllegalArgumentException("that is not head of tree");
+ return copyActionTree(tree, built);
+ }
+ private static ActionTree copyActionTree(ActionTree tree, Map preBuilts) {
+ if (preBuilts.containsKey(tree)) return preBuilts.get(tree);
+
+ ActionTree clone = new ActionTree();
+ preBuilts.put(tree, clone);
+
+ clone.setCurrent(tree.getCurrent());
+ clone.setParent(new HashSet());
+ clone.setChildren(new HashSet());
+ for (ActionTree tree3 : tree.getChildren()) {
+ ActionTree clone3 = copyActionTree(tree3, preBuilts);
+ clone3.getParent().add(clone);
+ clone.getChildren().add(clone3);
+ }
+ return clone;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonDoor.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonDoor.java
new file mode 100755
index 00000000..15004dcc
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonDoor.java
@@ -0,0 +1,87 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder;
+
+import com.google.common.collect.Sets;
+import lombok.Getter;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.BlockPos;
+import net.minecraft.world.World;
+
+import java.util.Set;
+
+@Getter
+public class DungeonDoor {
+ private final World w;
+ private final BlockPos position;
+ private final EDungeonDoorType type;
+ private boolean isZDir;
+
+ private static final Set legalBlocks = Sets.newHashSet(Blocks.coal_block, Blocks.barrier, Blocks.monster_egg, Blocks.air, Blocks.stained_hardened_clay);
+
+ public DungeonDoor(World world, BlockPos pos, EDungeonDoorType type) {
+ this.w = world;
+ this.position = pos;
+ Block itshouldbeall = world.getChunkFromBlockCoords(pos).getBlock(pos);
+
+ if (type == EDungeonDoorType.WITHER && itshouldbeall == Blocks.air) type = EDungeonDoorType.WITHER_FAIRY;
+ this.type = type;
+ boolean exist = type.isExist();
+
+ for (int x = -1; x<=1; x++) {
+ for (int y = -1; y<=1; y++) {
+ for (int z = -1; z<=1; z++) {
+ BlockPos pos2 = pos.add(x,y,z);
+ Block block = world.getChunkFromBlockCoords(pos2).getBlock(pos2);
+ if (itshouldbeall != block) exist = false;
+ }
+ }
+ }
+ if (exist) {
+ BlockPos ZCheck = pos.add(0,0,2);
+ isZDir = world.getChunkFromBlockCoords(ZCheck).getBlock(ZCheck) == Blocks.air;
+
+ if (isZDir) {
+ for (int x = -1; x<=1; x++) {
+ for (int y = -1; y<=1; y++) {
+ for (int z = -2; z<=2; z+=4) {
+ BlockPos pos2 = pos.add(x,y,z);
+ Block block = world.getChunkFromBlockCoords(pos2).getBlock(pos2);
+ if (block != Blocks.air) exist = false;
+ }
+ }
+ }
+ } else {
+ for (int x = -2; x<=2; x+=4) {
+ for (int y = -1; y<=1; y++) {
+ for (int z = -1; z<=1; z++) {
+ BlockPos pos2 = pos.add(x,y,z);
+ Block block = world.getChunkFromBlockCoords(pos2).getBlock(pos2);
+ if (block != Blocks.air) exist = false;
+ }
+ }
+ }
+ }
+ }
+ if (!exist) {
+ isZDir = false;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProvider.java
new file mode 100755
index 00000000..b34986eb
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProvider.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.BossfightProcessor;
+import net.minecraft.util.BlockPos;
+import net.minecraft.world.World;
+
+import javax.vecmath.Vector2d;
+
+public interface DungeonSpecificDataProvider {
+
+ BlockPos findDoor(World w, String dungeonName);
+
+ Vector2d findDoorOffset(World w, String dungeonName);
+ BossfightProcessor createBossfightProcessor(World w, String dungeonName);
+
+ boolean isTrapSpawn(String dungeonName);
+
+ double secretPercentage(String dungeonName);
+
+ int speedSecond(String dungeonName);
+}
\ No newline at end of file
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProviderRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProviderRegistry.java
new file mode 100755
index 00000000..48b24120
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/DungeonSpecificDataProviderRegistry.java
@@ -0,0 +1,42 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.impl.NormalModeDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.impl.MasterModeDataProvider;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+public class DungeonSpecificDataProviderRegistry {
+ public static final Map doorFinders = new HashMap<>();
+
+ static {
+ doorFinders.put(Pattern.compile("The Catacombs (?:F[0-9]|E)"), new NormalModeDataProvider());
+ doorFinders.put(Pattern.compile("The Catacombs (?:M[0-9])"), new MasterModeDataProvider());
+ }
+
+ public static DungeonSpecificDataProvider getDoorFinder(String dungeonName) {
+ for (Map.Entry doorFinderEntry :doorFinders.entrySet()){
+ if (doorFinderEntry.getKey().matcher(dungeonName).matches()) return doorFinderEntry.getValue();
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/EDungeonDoorType.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/EDungeonDoorType.java
new file mode 100644
index 00000000..05915a1a
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/EDungeonDoorType.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+@AllArgsConstructor
+@Getter
+public enum EDungeonDoorType {
+ NONE(false, false, false,"?"), ENTRANCE(true, false, false, "entrance"),
+ WITHER(true, true,true,"withergate"),
+ WITHER_FAIRY(true, false,true,"wither-fairy-gate"),
+ BLOOD(true, true,true, "bloodgate"),
+ UNOPEN(true, false, false,"gate");
+
+
+ private final boolean exist;
+ private final boolean keyRequired;
+ private final boolean headToBlood;
+ private final String name;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/CatacombsDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/CatacombsDataProvider.java
new file mode 100644
index 00000000..b9052353
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/CatacombsDataProvider.java
@@ -0,0 +1,75 @@
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs;
+
+import com.google.common.collect.Sets;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProvider;
+import net.minecraft.entity.item.EntityArmorStand;
+import net.minecraft.init.Blocks;
+import net.minecraft.util.BlockPos;
+import net.minecraft.world.World;
+import org.jetbrains.annotations.Nullable;
+
+import javax.vecmath.Vector2d;
+import java.util.Collection;
+import java.util.Set;
+
+public abstract class CatacombsDataProvider implements DungeonSpecificDataProvider {
+
+ private static final Set directions = Sets.newHashSet(new Vector2d(0,1), new Vector2d(0, -1), new Vector2d(1, 0), new Vector2d(-1 , 0));
+
+ @Nullable
+ static Vector2d getVector2d(World w, Collection armorStand, Set directions) {
+ EntityArmorStand mort = armorStand.iterator().next();
+ BlockPos pos = mort.getPosition();
+ pos = pos.add(0, 3, 0);
+ for (int i = 0; i < 5; i++) {
+ for (Vector2d vector2d: directions) {
+ BlockPos test = pos.add(vector2d.x * i, 0, vector2d.y * i);
+ if (w.getChunkFromBlockCoords(test).getBlock(test) == Blocks.iron_bars) {
+ return vector2d;
+ }
+ }
+ }
+ return null;
+ }
+
+ public static Collection getMorts(World w){
+ return w.getEntities(EntityArmorStand.class, input -> input.getName().equals("§bMort"));
+ }
+
+ /**
+ * This gets all morts checks for iron bars near him
+ * and based on iron bars determine the door location
+ *
+ * @param w World that we are going to look for the door in
+ * world is explicitly specified instead of mc.theWorld bc we can use cached worlds
+ * @param dungeonName dungeon type eg master mode, currently unused
+ * @return Block pos of the dungeon entrance
+ */
+ public BlockPos findDoor(World w, String dungeonName) {
+ Collection armorStand = getMorts(w);
+
+ if (!armorStand.isEmpty()) {
+ EntityArmorStand mort = armorStand.iterator().next();
+ BlockPos pos = mort.getPosition();
+ pos = pos.add(0, 3, 0);
+ for (int i = 0; i < 5; i++) {
+ for (Vector2d vector2d:directions) {
+ BlockPos test = pos.add(vector2d.x * i, 0, vector2d.y * i);
+ if (w.getChunkFromBlockCoords(test).getBlock(test) == Blocks.iron_bars) {
+ return pos.add(vector2d.x * (i + 2), -2, vector2d.y * (i+2));
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ public Vector2d findDoorOffset(World w, String dungeonName) {
+ Collection armorStand = getMorts(w);
+
+ if (!armorStand.isEmpty()) {
+ return getVector2d(w, armorStand, directions);
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/MasterModeDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/MasterModeDataProvider.java
new file mode 100755
index 00000000..ab3f5df3
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/MasterModeDataProvider.java
@@ -0,0 +1,64 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.impl;
+
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.CatacombsDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.BossfightProcessor;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.BossfightProcessorLivid;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.world.World;
+
+public class MasterModeDataProvider extends CatacombsDataProvider {
+
+
+ @Override
+ public BossfightProcessor createBossfightProcessor(World w, String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Floor: Master mode "+floor+ " Building bossfight processor"));
+ if (floor.equals("M5")) {
+ return new BossfightProcessorLivid(true);
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isTrapSpawn(String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ switch (floor) {
+ case "M3":
+ case "M4":
+ case "M5":
+ case "M6":
+ return true;
+ default:
+ return floor.equals("M7");
+ }
+ }
+
+ @Override
+ public double secretPercentage(String dungeonName) {
+ return 1.0;
+ }
+
+ @Override
+ public int speedSecond(String dungeonName) {
+ return 480;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/NormalModeDataProvider.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/NormalModeDataProvider.java
new file mode 100755
index 00000000..880cf473
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/doorfinder/catacombs/impl/NormalModeDataProvider.java
@@ -0,0 +1,101 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.impl;
+
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.catacombs.CatacombsDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomprocessor.bossfight.*;
+import net.minecraft.util.ChatComponentText;
+import net.minecraft.world.World;
+
+public class NormalModeDataProvider extends CatacombsDataProvider {
+
+
+ @Override
+ public BossfightProcessor createBossfightProcessor(World w, String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Floor: "+floor+ " Building bossfight processor"));
+ switch (floor) {
+ case "F1":
+ return new BossfightProcessorBonzo();
+ case "F2":
+ return new BossfightProcessorScarf();
+ case "F3":
+ return new BossfightProcessorProf();
+ case "F4":
+ return new BossfightProcessorThorn();
+ case "F5":
+ return new BossfightProcessorLivid(false);
+ case "F6":
+ return new BossfightProcessorSadan();
+ case "F7":
+ return new BossfightProcessorNecron();
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public boolean isTrapSpawn(String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ switch (floor) {
+ case "F3":
+ case "F4":
+ case "F5":
+ case "F6":
+ return true;
+ default:
+ return floor.equals("F7");
+ }
+ }
+
+ @Override
+ public double secretPercentage(String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ switch (floor) {
+ case "F1":
+ case "E":
+ return 0.3;
+ case "F2":
+ return 0.4;
+ case "F3":
+ return 0.5;
+ case "F4":
+ return 0.6;
+ case "F5":
+ return 0.7;
+ case "F6":
+ return 0.85;
+ default:
+ return 1.0;
+ }
+ }
+
+ @Override
+ public int speedSecond(String dungeonName) {
+ String floor = dungeonName.substring(14).trim();
+ switch (floor) {
+ case "F5":
+ case "F7":
+ return 720;
+ default:
+ return 600;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEvent.java
new file mode 100644
index 00000000..0e71a65e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEvent.java
@@ -0,0 +1,41 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events;
+
+import kr.syeyoung.dungeonsguide.mod.features.FeatureRegistry;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class DungeonEvent implements Serializable {
+ private long UTCTime = System.currentTimeMillis();
+ private long realTimeElapsed;
+ private long skyblockTimeElapsed;
+
+ private String eventName;
+ private DungeonEventData data;
+
+ public DungeonEvent(DungeonEventData eventData){
+ this.data = eventData;
+ this.realTimeElapsed = FeatureRegistry.DUNGEON_REALTIME.getTimeElapsed();
+ this.skyblockTimeElapsed = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed();
+ this.eventName = eventData.getEventName();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventData.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventData.java
new file mode 100644
index 00000000..812e1488
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventData.java
@@ -0,0 +1,25 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events;
+
+import java.io.Serializable;
+
+public interface DungeonEventData extends Serializable {
+ String getEventName();
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventHolder.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventHolder.java
new file mode 100644
index 00000000..58799f80
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/DungeonEventHolder.java
@@ -0,0 +1,32 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+@Data
+public class DungeonEventHolder implements Serializable {
+ private long date;
+ private Set players;
+ private List eventDataList;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/SerializableBlockPos.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/SerializableBlockPos.java
new file mode 100644
index 00000000..d70ba2c2
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/SerializableBlockPos.java
@@ -0,0 +1,38 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import net.minecraft.util.BlockPos;
+
+import java.io.Serializable;
+
+@Data @AllArgsConstructor
+public class SerializableBlockPos implements Serializable {
+ private int x;
+ private int y;
+ private int z;
+
+ public SerializableBlockPos(BlockPos pos) {
+ this.x = pos.getX();
+ this.y = pos.getY();
+ this.z = pos.getZ();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonCryptBrokenEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonCryptBrokenEvent.java
new file mode 100644
index 00000000..c2a4f71e
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonCryptBrokenEvent.java
@@ -0,0 +1,35 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonCryptBrokenEvent implements DungeonEventData {
+ private int prevCrypts;
+ private int newCrypts;
+
+ @Override
+ public String getEventName() {
+ return "CRYPTS_CHANGE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonDeathEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonDeathEvent.java
new file mode 100644
index 00000000..09877b80
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonDeathEvent.java
@@ -0,0 +1,36 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonDeathEvent implements DungeonEventData {
+ private String playerName;
+ private String message;
+ private int cnt;
+
+ @Override
+ public String getEventName() {
+ return "PLAYER_DEATH";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonMapUpdateEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonMapUpdateEvent.java
new file mode 100644
index 00000000..023902c8
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonMapUpdateEvent.java
@@ -0,0 +1,34 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonMapUpdateEvent implements DungeonEventData {
+ private byte[] map;
+
+ @Override
+ public String getEventName() {
+ return "MAP_UPDATE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonNodataEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonNodataEvent.java
new file mode 100644
index 00000000..531f5990
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonNodataEvent.java
@@ -0,0 +1,29 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonNodataEvent implements DungeonEventData {
+ private String eventName;
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonPuzzleFailureEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonPuzzleFailureEvent.java
new file mode 100644
index 00000000..64621339
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonPuzzleFailureEvent.java
@@ -0,0 +1,34 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonPuzzleFailureEvent implements DungeonEventData {
+ private String playerName;
+ private String message;
+ @Override
+ public String getEventName() {
+ return "PUZZLE_FAILURE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonRoomDiscoverEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonRoomDiscoverEvent.java
new file mode 100644
index 00000000..09fd64a5
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonRoomDiscoverEvent.java
@@ -0,0 +1,46 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.SerializableBlockPos;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.awt.*;
+import java.util.UUID;
+
+@Data
+@AllArgsConstructor
+public class DungeonRoomDiscoverEvent implements DungeonEventData {
+ private Point unitPt;
+ private int rotation;
+ private SerializableBlockPos min;
+ private SerializableBlockPos max;
+ private int shape;
+ private int color;
+ private UUID roomUID;
+ private String roomName;
+ private String roomProc;
+
+ @Override
+ public String getEventName() {
+ return "ROOM_DISCOVER";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonSecretCountChangeEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonSecretCountChangeEvent.java
new file mode 100644
index 00000000..21ea853c
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonSecretCountChangeEvent.java
@@ -0,0 +1,37 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+@Data
+@AllArgsConstructor
+public class DungeonSecretCountChangeEvent implements DungeonEventData {
+ private int prevCount;
+ private int newCount;
+ private int totalSecret;
+ private boolean sureTotalSecret;
+
+ @Override
+ public String getEventName() {
+ return "SECRET_CNT_CHANGE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonStateChangeEvent.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonStateChangeEvent.java
new file mode 100644
index 00000000..f1cb1167
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/events/impl/DungeonStateChangeEvent.java
@@ -0,0 +1,40 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.events.impl;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.DungeonEventData;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+
+import java.awt.*;
+
+@Data
+@AllArgsConstructor
+public class DungeonStateChangeEvent implements DungeonEventData {
+ private Point unitPt;
+ private String roomName;
+ private DungeonRoom.RoomState from;
+ private DungeonRoom.RoomState to;
+
+ @Override
+ public String getEventName() {
+ return "ROOM_STATE_CHANGE";
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/map/DungeonMapData.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/map/DungeonMapData.java
new file mode 100644
index 00000000..9687d554
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/map/DungeonMapData.java
@@ -0,0 +1,121 @@
+package kr.syeyoung.dungeonsguide.mod.dungeon.map;
+
+import com.google.common.collect.Sets;
+import kr.syeyoung.dungeonsguide.mod.chat.ChatTransmitter;
+import kr.syeyoung.dungeonsguide.mod.dungeon.DungeonContext;
+import kr.syeyoung.dungeonsguide.mod.dungeon.MapProcessor;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProvider;
+import kr.syeyoung.dungeonsguide.mod.dungeon.doorfinder.DungeonSpecificDataProviderRegistry;
+import kr.syeyoung.dungeonsguide.mod.dungeon.events.impl.DungeonNodataEvent;
+import kr.syeyoung.dungeonsguide.mod.events.impl.DungeonContextInitializationEvent;
+import kr.syeyoung.dungeonsguide.mod.utils.MapUtils;
+import net.minecraft.client.Minecraft;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.ChatComponentText;
+import net.minecraftforge.common.MinecraftForge;
+
+import javax.vecmath.Vector2d;
+import java.awt.*;
+import java.util.Set;
+
+public class DungeonMapData {
+ private static final Set directions = Sets.newHashSet(new Vector2d(0, 1), new Vector2d(0, -1), new Vector2d(1, 0), new Vector2d(-1, 0));
+ private static final Set door_dirs = Sets.newHashSet(new Vector2d(0, 0.5), new Vector2d(0, -0.5), new Vector2d(0.5, 0), new Vector2d(-0.5, 0));
+ public Dimension unitRoomDimension;
+ public boolean bugged;
+ public Dimension doorDimensions;
+ public Point topLeftMapPoint;
+ private final DungeonContext context;
+ private final Minecraft mc;
+ public boolean initialized;
+
+ public DungeonMapData(DungeonContext context, Minecraft mc) {
+ this.context = context;
+ this.mc = mc;
+ }
+
+
+ public void eat(final byte[] mapData){
+ final Point firstRoom = MapUtils.findFirstColorWithIn(mapData, (byte) 30, new Rectangle(0, 0, 128, 128));
+ // Determine room dimension
+ int width = MapUtils.getWidthOfColorAt(mapData, (byte) 30, firstRoom);
+ int height = MapUtils.getHeightOfColorAt(mapData, (byte) 30, firstRoom);
+ unitRoomDimension = new Dimension(width, height);
+ Vector2d doorDir = null;
+ Point midfirstRoom = new Point(firstRoom.x + unitRoomDimension.width / 2, firstRoom.y + unitRoomDimension.height / 2);
+ final int halfWidth = unitRoomDimension.width / 2 + 2;
+ for (Vector2d v : directions) {
+ byte color = MapUtils.getMapColorAt(mapData, (int) (v.x * halfWidth + midfirstRoom.x), (int) (v.y * halfWidth + midfirstRoom.y));
+ if (color != 0) {
+ doorDir = v;
+ break;
+ }
+ }
+
+ if (doorDir == null) {
+ bugged = true;
+ return;
+ }
+
+ Point basePoint = new Point(firstRoom.x, firstRoom.y);
+ if (doorDir.x > 0) basePoint.x += unitRoomDimension.width;
+ if (doorDir.x < 0) basePoint.x -= 1;
+ if (doorDir.y > 0) basePoint.y += unitRoomDimension.height;
+ if (doorDir.y < 0) basePoint.y -= 1;
+ int gap = MapUtils.getLengthOfColorExtending(mapData, (byte) 0, basePoint, doorDir);
+ Point pt = MapUtils.findFirstColorWithInNegate(mapData, (byte) 0, new Rectangle(basePoint.x, basePoint.y, (int) Math.abs(doorDir.y) * unitRoomDimension.width + 1, (int) Math.abs(doorDir.x) * unitRoomDimension.height + 1));
+ if (pt == null) {
+ bugged = true;
+ return;
+ }
+ int doorWidth = MapUtils.getLengthOfColorExtending(mapData, MapUtils.getMapColorAt(mapData, pt.x, pt.y), pt, new Vector2d((int) Math.abs(doorDir.y), (int) Math.abs(doorDir.x)));
+ doorDimensions = new Dimension(doorWidth, gap);
+
+ // Determine Top Left
+ int topLeftX = firstRoom.x;
+ int topLeftY = firstRoom.y;
+ while (topLeftX >= unitRoomDimension.width + doorDimensions.height)
+ topLeftX -= unitRoomDimension.width + doorDimensions.height;
+ while (topLeftY >= unitRoomDimension.height + doorDimensions.height)
+ topLeftY -= unitRoomDimension.height + doorDimensions.height;
+ topLeftMapPoint = new Point(topLeftX, topLeftY);
+ // determine door location based on npc, and determine map min from there
+ DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(DungeonContext.getDungeonName());
+ if (doorFinder == null) {
+ bugged = true;
+ return;
+ }
+ BlockPos door = doorFinder.findDoor(mc.theWorld, DungeonContext.getDungeonName());
+ if (door == null) {
+ bugged = true;
+ return;
+ }
+
+ ChatTransmitter.sendDebugChat(new ChatComponentText("door Pos:" + door));
+
+ Point unitPoint = MapProcessor.mapPointToRoomPoint(firstRoom, topLeftMapPoint, unitRoomDimension, doorDimensions);
+ unitPoint.translate(unitPoint.x + 1, unitPoint.y + 1);
+ unitPoint.translate((int) doorDir.x, (int) doorDir.y);
+
+ Vector2d offset = doorFinder.findDoorOffset(mc.theWorld, DungeonContext.getDungeonName());
+ boolean axisMatch = doorDir.equals(offset);
+
+ int worldX = unitPoint.x * 16;
+ int worldY = unitPoint.y * 16;
+ BlockPos worldMin = door.add(-worldX, 0, -worldY);
+ context.setDungeonMin(worldMin);
+
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Found Green room:" + firstRoom));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Axis match:" + axisMatch));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("World Min:" + context.getDungeonMin()));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("Dimension:" + unitRoomDimension));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("top Left:" + topLeftMapPoint));
+ ChatTransmitter.sendDebugChat(new ChatComponentText("door dimension:" + doorDimensions));
+ context.createEvent(new DungeonNodataEvent("MAP_PROCESSOR_INIT"));
+ initialized = true;
+ MinecraftForge.EVENT_BUS.post(new DungeonContextInitializationEvent());
+
+
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarCornerCut.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarCornerCut.java
new file mode 100644
index 00000000..f6ac1777
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarCornerCut.java
@@ -0,0 +1,189 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import net.minecraft.util.*;
+import net.minecraft.world.World;
+
+import java.util.*;
+
+public class AStarCornerCut {
+ private final BlockPos min, max;
+ private final World world;
+
+ int lastSx, lastSy, lastSz;
+ final int dx, dy, dz;
+ private DungeonRoom dungeonRoom;
+
+ @Getter
+ private AxisAlignedBB destinationBB;
+
+ public AStarCornerCut(DungeonRoom dungeonRoom, Vec3 destination) {
+ this.min = new BlockPos(dungeonRoom.getMinx(), 0, dungeonRoom.getMinz());
+ this.max = new BlockPos(dungeonRoom.getMaxx(), 255, dungeonRoom.getMaxz());
+
+ this.world = dungeonRoom.getCachedWorld();
+ this.dungeonRoom = dungeonRoom;
+
+ this.dx = (int) (destination.xCoord * 2);
+ this.dy = (int) (destination.yCoord * 2);
+ this.dz = (int) (destination.zCoord * 2);
+ destinationBB = AxisAlignedBB.fromBounds(dx-2, dy-2, dz-2, dx+2, dy+2, dz+2);
+ }
+
+ private Map nodeMap = new HashMap<>();
+
+ private Node openNode(int x, int y, int z)
+ {
+ Node.Coordinate coordinate = new Node.Coordinate(x,y,z);
+ Node node = this.nodeMap.get(coordinate);
+
+ if (node == null)
+ {
+ node = new Node(coordinate);
+ this.nodeMap.put(coordinate, node);
+ }
+
+ return node;
+ }
+
+ @Getter
+ private LinkedList route = new LinkedList<>();
+
+ @Getter
+ private PriorityQueue open = new PriorityQueue<>(Comparator.comparing((Node a) -> a == null ? Float.MAX_VALUE : a.f).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.x).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.y).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.z));
+
+ private int pfindIdx = 0;
+
+ public boolean pathfind(Vec3 from, long timeout) {
+ pfindIdx ++;
+ if (lastSx != (int)Math.round(from.xCoord * 2) || lastSy != (int)Math.round(from.yCoord*2) || lastSz != (int)Math.round(from.zCoord * 2))
+ open.clear();
+
+ this.lastSx = (int) Math.round(from.xCoord * 2);
+ this.lastSy = (int) Math.round(from.yCoord * 2);
+ this.lastSz = (int) Math.round(from.zCoord * 2);
+
+ Node startNode = openNode(dx, dy, dz);
+ Node goalNode = openNode(lastSx, lastSy, lastSz);
+
+ if (goalNode.parent != null) {
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+
+ startNode.g = 0;
+ startNode.f = 0;
+ goalNode.g = Integer.MAX_VALUE; goalNode.f = Integer.MAX_VALUE;
+
+
+ open.add(startNode);
+
+ long end = System.currentTimeMillis() + timeout;
+
+ while (!open.isEmpty()) {
+ if (System.currentTimeMillis() > end) {
+ return false;
+ }
+
+ Node n = open.poll();
+ if (n.lastVisited == pfindIdx) continue;
+ n.lastVisited = pfindIdx;
+
+ if (n == goalNode) {
+ // route = reconstructPath(startNode)
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+
+ for (int z = -1; z <= 1; z++) {for (int y = -1; y <= 1; y ++) { for(int x = -1; x <= 1; x++) {
+ if (x == 0 && y == 0 && z == 0) continue;
+ Node neighbor = openNode(n.coordinate.x +x, n.coordinate.y +y, n.coordinate.z + z);
+
+ // check blocked.
+ if (!((destinationBB.minX <= neighbor.coordinate.x && neighbor.coordinate.x <= destinationBB.maxX &&
+ destinationBB.minY <= neighbor.coordinate.y && neighbor.coordinate.y <= destinationBB.maxY &&
+ destinationBB.minZ <= neighbor.coordinate.z && neighbor.coordinate.z <= destinationBB.maxZ) // near destination
+ || !dungeonRoom.isBlocked(neighbor.coordinate.x, neighbor.coordinate.y, neighbor.coordinate.z))) { // not blocked
+ continue;
+ }
+ if (neighbor.lastVisited == pfindIdx) continue;
+
+
+ float gScore = n.g + MathHelper.sqrt_float(x*x + y*y + z*z); // altho it's sq, it should be fine
+ if (gScore < neighbor.g ) {
+ neighbor.parent = n;
+ neighbor.g = gScore;
+ neighbor.f = gScore + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ } else if (neighbor.lastVisited != pfindIdx) {
+ neighbor.f = gScore + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ }
+ }}}
+ }
+ return true;
+ }
+
+ private int manhatten(int x, int y, int z) {return Math.abs(x)+ Math.abs(y)+ Math.abs(z);}
+ private float distSq(float x, float y, float z) {
+ return MathHelper.sqrt_float(x * x + y * y + z * z);
+ }
+
+ @RequiredArgsConstructor
+ @Data
+ public static final class Node {
+ @Data
+ @RequiredArgsConstructor
+ public static final class Coordinate {
+ private final int x, y, z;
+ }
+ private final Coordinate coordinate;
+
+ private float f = Float.MAX_VALUE, g = Float.MAX_VALUE;
+ private int lastVisited;
+
+ @EqualsAndHashCode.Exclude
+ private Node parent;
+
+ public static long makeHash(int x, int y, int z)
+ {
+ return y & 32767L | ((short)x & 32767L) << 16 | ((short)z & 32767L) << 32;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarFineGrid.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarFineGrid.java
new file mode 100644
index 00000000..8cb49a10
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/AStarFineGrid.java
@@ -0,0 +1,182 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import net.minecraft.util.*;
+import net.minecraft.world.World;
+
+import java.util.*;
+
+public class AStarFineGrid {
+ private final BlockPos min, max;
+ private final World world;
+
+ int lastSx, lastSy, lastSz;
+ final int dx, dy, dz;
+ private DungeonRoom dungeonRoom;
+
+ @Getter
+ private AxisAlignedBB destinationBB;
+
+ public AStarFineGrid(DungeonRoom dungeonRoom, Vec3 destination) {
+ this.min = new BlockPos(dungeonRoom.getMinx(), 0, dungeonRoom.getMinz());
+ this.max = new BlockPos(dungeonRoom.getMaxx(), 255, dungeonRoom.getMaxz());
+
+ this.world = dungeonRoom.getCachedWorld();
+ this.dungeonRoom = dungeonRoom;
+
+ this.dx = (int) (destination.xCoord * 2);
+ this.dy = (int) (destination.yCoord * 2);
+ this.dz = (int) (destination.zCoord * 2);
+ destinationBB = AxisAlignedBB.fromBounds(dx-2, dy-2, dz-2, dx+2, dy+2, dz+2);
+ }
+
+ private Map nodeMap = new HashMap<>();
+
+ private Node openNode(int x, int y, int z)
+ {
+ Node.Coordinate coordinate = new Node.Coordinate(x,y,z);
+ Node node = this.nodeMap.get(coordinate);
+
+ if (node == null)
+ {
+ node = new Node(coordinate);
+ this.nodeMap.put(coordinate, node);
+ }
+
+ return node;
+ }
+
+ @Getter
+ private LinkedList route = new LinkedList<>();
+
+ @Getter
+ private PriorityQueue open = new PriorityQueue<>(Comparator.comparing((Node a) -> a == null ? Float.MAX_VALUE : a.f).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.x).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.y).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.z));
+
+ private int pfindIdx = 0;
+
+ public boolean pathfind(Vec3 from, long timeout) {
+ pfindIdx ++;
+ if (lastSx != (int)Math.round(from.xCoord * 2) || lastSy != (int)Math.round(from.yCoord*2) || lastSz != (int)Math.round(from.zCoord * 2))
+ open.clear();
+
+ this.lastSx = (int) Math.round(from.xCoord * 2);
+ this.lastSy = (int) Math.round(from.yCoord * 2);
+ this.lastSz = (int) Math.round(from.zCoord * 2);
+
+ Node startNode = openNode(dx, dy, dz);
+ Node goalNode = openNode(lastSx, lastSy, lastSz);
+ startNode.g = 0;
+ startNode.f = 0;
+ goalNode.g = Integer.MAX_VALUE; goalNode.f = Integer.MAX_VALUE;
+ if (goalNode.parent != null) {
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+ open.add(startNode);
+
+ long end = System.currentTimeMillis() + timeout;
+
+ while (!open.isEmpty()) {
+ if (System.currentTimeMillis() > end) {
+ return false;
+ }
+
+ Node n = open.poll();
+ if (n.lastVisited == pfindIdx) continue;
+ n.lastVisited = pfindIdx;
+
+ if (n == goalNode) {
+ // route = reconstructPath(startNode)
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+
+ for (EnumFacing value : EnumFacing.VALUES) {
+ Node neighbor = openNode(n.coordinate.x + value.getFrontOffsetX(), n.coordinate.y + value.getFrontOffsetY(), n.coordinate.z + value.getFrontOffsetZ());
+
+ // check blocked.
+ if (!((destinationBB.minX <= neighbor.coordinate.x && neighbor.coordinate.x <= destinationBB.maxX &&
+ destinationBB.minY <= neighbor.coordinate.y && neighbor.coordinate.y <= destinationBB.maxY &&
+ destinationBB.minZ <= neighbor.coordinate.z && neighbor.coordinate.z <= destinationBB.maxZ) // near destination
+ || !dungeonRoom.isBlocked(neighbor.coordinate.x, neighbor.coordinate.y, neighbor.coordinate.z))) { // not blocked
+ continue;
+ }
+
+ float gScore = n.g + 1; // altho it's sq, it should be fine
+ if (gScore < neighbor.g) {
+ neighbor.parent = n;
+ neighbor.g = gScore;
+ neighbor.f = gScore + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ } else if (neighbor.lastVisited != pfindIdx) {
+ neighbor.f = gScore + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ }
+ }
+ }
+ return true;
+ }
+
+ private int manhatten(int x, int y, int z) {return Math.abs(x)+ Math.abs(y)+ Math.abs(z);}
+ private float distSq(float x, float y, float z) {
+ return MathHelper.sqrt_float(x * x + y * y + z * z);
+ }
+
+ @RequiredArgsConstructor
+ @Data
+ public static final class Node {
+ @Data
+ @RequiredArgsConstructor
+ public static final class Coordinate {
+ private final int x, y, z;
+ }
+ private final Coordinate coordinate;
+
+ private float f = Float.MAX_VALUE, g = Float.MAX_VALUE;
+ private int lastVisited;
+
+ @EqualsAndHashCode.Exclude
+ private Node parent;
+
+ public static long makeHash(int x, int y, int z)
+ {
+ return y & 32767L | ((short)x & 32767L) << 16 | ((short)z & 32767L) << 32;
+ }
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/CachedWorld.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/CachedWorld.java
new file mode 100644
index 00000000..9d9644c6
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/CachedWorld.java
@@ -0,0 +1,85 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.world.*;
+import net.minecraft.world.chunk.IChunkProvider;
+
+public class CachedWorld extends World {
+ private ChunkCache chunkCache;
+
+ public CachedWorld(ChunkCache chunkCache) {
+ super(null, null, new WorldProviderSurface(), null, true);
+ this.chunkCache = chunkCache;
+ }
+
+ @Override
+ protected IChunkProvider createChunkProvider() {
+ return null;
+ }
+
+ @Override
+ protected int getRenderDistanceChunks() {
+ return 999;
+ }
+
+ @Override
+ public boolean extendedLevelsInChunkCache() {
+ return chunkCache.extendedLevelsInChunkCache();
+ }
+
+ @Override
+ public TileEntity getTileEntity(BlockPos pos) {
+ return chunkCache.getTileEntity(pos);
+ }
+
+ @Override
+ public int getCombinedLight(BlockPos pos, int lightValue) {
+ return chunkCache.getCombinedLight(pos, lightValue);
+ }
+
+ @Override
+ public IBlockState getBlockState(BlockPos pos) {
+ return chunkCache.getBlockState(pos);
+ }
+
+ @Override
+ public int getLightFor(EnumSkyBlock type, BlockPos pos) {
+ return chunkCache.getLightFor(type, pos);
+ }
+
+ @Override
+ public boolean isAirBlock(BlockPos pos) {
+ return chunkCache.isAirBlock(pos);
+ }
+
+ @Override
+ public int getStrongPower(BlockPos pos, EnumFacing direction) {
+ return chunkCache.getStrongPower(pos, direction);
+ }
+
+ @Override
+ public boolean isSideSolid(BlockPos pos, EnumFacing side, boolean _default) {
+ return chunkCache.isSideSolid(pos, side, _default);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/JPSPathfinder.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/JPSPathfinder.java
new file mode 100644
index 00000000..0a4e1b7d
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/JPSPathfinder.java
@@ -0,0 +1,306 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import net.minecraft.util.*;
+import net.minecraft.world.World;
+
+import java.util.*;
+
+public class JPSPathfinder {
+ private final BlockPos min, max;
+ private final World world;
+
+ private Vec3 start;
+ private Vec3 destination;
+ private DungeonRoom dungeonRoom;
+
+ @Getter
+ private AxisAlignedBB destinationBB;
+
+ public JPSPathfinder(DungeonRoom dungeonRoom){
+ this.min = new BlockPos(dungeonRoom.getMinx(), 0, dungeonRoom.getMinz());
+ this.max = new BlockPos(dungeonRoom.getMaxx(), 255, dungeonRoom.getMaxz());
+
+ this.world = dungeonRoom.getCachedWorld();
+ this.dungeonRoom = dungeonRoom;
+ }
+
+ private IntHashMap nodeMap = new IntHashMap();
+
+ private Node openNode(int x, int y, int z)
+ {
+ int i = Node.makeHash(x, y, z);
+ Node node = this.nodeMap.lookup(i);
+
+ if (node == null)
+ {
+ node = new Node(x, y, z);
+ this.nodeMap.addKey(i, node);
+ }
+
+ return node;
+ }
+
+ @Getter
+ private LinkedList route = new LinkedList<>();
+
+ @Getter
+ private PriorityQueue open = new PriorityQueue<>(Comparator.comparing((Node a) -> a == null ? Float.MAX_VALUE : a.f).thenComparing(a -> a == null ? Float.MAX_VALUE : a.x).thenComparing(a -> a == null ? Float.MAX_VALUE : a.y).thenComparing(a -> a == null ? Float.MAX_VALUE : a.z));
+
+ private int tx, ty, tz;
+
+ private Node addNode(Node parent, Node jumpPt, boolean addToOpen) {
+ float ng = parent.g + distSq(jumpPt.x - parent.x, jumpPt.y - parent.y, jumpPt.z - parent.z);
+
+ if (ng < jumpPt.g) {
+ if (addToOpen)
+ open.remove(jumpPt);
+ jumpPt.g = ng;
+ jumpPt.h = jumpPt.h == -1 ? distSq(tx - jumpPt.x, ty - jumpPt.y, tz - jumpPt.z) : jumpPt.h;
+ jumpPt.f = jumpPt.h + jumpPt.g;
+ jumpPt.parent = parent;
+ if (addToOpen)
+ open.add(jumpPt);
+ }
+ return jumpPt;
+ }
+
+
+ long arr[];
+
+ public boolean pathfind(Vec3 from, Vec3 to, float within, long timeout) {
+ route.clear(); nodeMap.clearMap();
+
+ {
+ from = new Vec3(((int)(from.xCoord * 2)) / 2.0, ((int)(from.yCoord * 2)) / 2.0, ((int)(from.zCoord* 2)) / 2.0);
+ to = new Vec3(((int)(to.xCoord * 2)) / 2.0, ((int)(to.yCoord * 2)) / 2.0, ((int)(to.zCoord* 2)) / 2.0);
+ }
+
+ this.start = from; this.destination = to;
+ tx = (int)(to.xCoord * 2);
+ ty = (int)(to.yCoord * 2);
+ tz = (int)(to.zCoord * 2);
+
+ destinationBB = AxisAlignedBB.fromBounds((to.xCoord - within)* 2, (to.yCoord - within) * 2, (to.zCoord - within) * 2, (to.xCoord + within) * 2, (to.yCoord + within)* 2, (to.zCoord + within) *2);
+ open.clear();
+ Node start;
+ open.add(start = openNode((int)from.xCoord * 2 + 1, (int)from.yCoord * 2, (int)from.zCoord * 2+1));
+ start.g = 0; start.f = 0; start.h = (float) from.squareDistanceTo(to);
+
+ Node end = null; float minDist = Float.MAX_VALUE;
+ long forceEnd = System.currentTimeMillis() + timeout + 999999999L;
+ while(!open.isEmpty()) {
+ if (forceEnd < System.currentTimeMillis() && timeout != -1) break;
+ Node n = open.poll();
+ n.closed= true;
+ if (minDist > n.h) {
+ minDist = n.h;
+ end = n;
+ }
+ if (n.x > destinationBB.minX && n.x < destinationBB.maxX && n.y > destinationBB.minY && n.y < destinationBB.maxY && n.z > destinationBB.minZ && n.z < destinationBB.maxZ) {
+ break;
+ }
+
+ for (Node neighbor : getNeighbors(n.parent == null ? n : n.parent, n)) {
+ Node jumpPT = expand(n.x, n.y, n.z, neighbor.x - n.x, neighbor.y - n.y, neighbor.z - n.z);
+ if (jumpPT == null || jumpPT.closed) continue;
+
+ addNode(n, jumpPT, true);
+ }
+ }
+
+ if (end == null) return false;
+ Node p = end;
+ while (p != null) {
+ route.addLast(new Vec3(p.x / 2.0f, p.y / 2.0f + 0.1, p.z / 2.0f));
+ p = p.parent;
+ }
+
+
+ return true;
+ }
+
+ private float distSq(float x, float y, float z) {
+ return MathHelper.sqrt_float(x * x + y * y + z * z);
+ }
+
+ public Set getNeighbors(Node prevN, Node n) {
+// if (true) throw new RuntimeException("ah");
+ int dx = MathHelper.clamp_int(n.x - prevN.x, -1, 1);
+ int dy = MathHelper.clamp_int(n.y - prevN.y, -1, 1);
+ int dz = MathHelper.clamp_int(n.z - prevN.z, -1, 1);
+ int x = n.x, y = n.y, z = n.z;
+ int nx = n.x + dx, ny = n.y + dy, nz = n.z + dz;
+
+ Set nexts = new HashSet<>();
+ int determinant = Math.abs(dx) + Math.abs(dy) + Math.abs(dz);
+ if (determinant == 0) {
+ for (int i = -1; i <= 1; i++)
+ for (int j = -1; j <= 1; j++)
+ for (int k = -1; k <= 1; k++) {
+ if (i == 0 && j == 0 && k == 0) continue;
+ nexts.add(openNode(x+i, y+j, z+k));
+ }
+ } else if (determinant == 1) {
+ nexts.add(openNode(nx,ny,nz));
+ for (int i = -1; i<=1; i++) {
+ for (int j = - 1; j<=1; j++) {
+ if (i == 0 && j == 0) continue;
+ if (dx != 0 && dungeonRoom.isBlocked(x, y + i, z + j)) nexts.add(openNode(nx,y+i,z+j));
+ if (dy != 0 && dungeonRoom.isBlocked(x + i, y, z + j)) nexts.add(openNode(x+i,ny,z+j));
+ if (dz != 0 && dungeonRoom.isBlocked(x + i, y + j, z)) nexts.add(openNode(x+i,y+j,nz));
+ }
+ }
+ } else if (determinant == 2) {
+ if (dz != 0) nexts.add(openNode(x,y,nz));
+ if (dy != 0) nexts.add(openNode(x,ny,z));
+ if (dx != 0) nexts.add(openNode(nx,y,z));
+ nexts.add(openNode(nx,ny,nz));
+ if (dx == 0) {
+ if (dungeonRoom.isBlocked(x, y, z-dz)) {
+ nexts.add(openNode(x, ny, z-dz));
+ if (dungeonRoom.isBlocked(x+1, y, z-dz)) nexts.add(openNode(x+1, ny, z-dz));
+ if (dungeonRoom.isBlocked(x-1, y, z-dz)) nexts.add(openNode(x-1, ny, z-dz));
+ }
+ if (dungeonRoom.isBlocked(x, y-dy, z)) {
+ nexts.add(openNode(x, y-dy, nz));
+ if (dungeonRoom.isBlocked(x+1, y-dy, z)) nexts.add(openNode(x+1, y-dy, nz));
+ if (dungeonRoom.isBlocked(x-1, y-dy, z)) nexts.add(openNode(x+1, y-dy, nz));
+ }
+ } else if (dy == 0) {
+ if (dungeonRoom.isBlocked(x, y, z-dz)) {
+ nexts.add(openNode(nx, y, z-dz));
+ if (dungeonRoom.isBlocked(x, y+1, z-dz)) nexts.add(openNode(nx, y+1, z-dz));
+ if (dungeonRoom.isBlocked(x, y-1, z-dz)) nexts.add(openNode(nx, y-1, z-dz));
+ }
+ if (dungeonRoom.isBlocked(x-dx, y, z)) {
+ nexts.add(openNode(x-dx, y, nz));
+ if (dungeonRoom.isBlocked(x-dx, y+1, z)) nexts.add(openNode(x-dx, y+1, nz));
+ if (dungeonRoom.isBlocked(x-dx, y-1, z)) nexts.add(openNode(x-dx, y-1, nz));
+ }
+ } else if (dz == 0) {
+ if (dungeonRoom.isBlocked(x, y-dy, z)) {
+ nexts.add(openNode(nx, y-dy, z));
+ if (dungeonRoom.isBlocked(x, y-dy, z+1)) nexts.add(openNode(nx, y-dy, z+1));
+ if (dungeonRoom.isBlocked(x, y-dy, z-1)) nexts.add(openNode(nx, y-dy, z-1));
+ }
+ if (dungeonRoom.isBlocked(x-dx, y, z)) {
+ nexts.add(openNode(x-dx, ny, z));
+ if (dungeonRoom.isBlocked(x-dx, y, z+1)) nexts.add(openNode(x-dx, ny, z+1));
+ if (dungeonRoom.isBlocked(x-dx, y, z-1)) nexts.add(openNode(x-dx, ny, z-1));
+ }
+ }
+ } else if (determinant == 3) {
+ nexts.add(openNode(x,y,nz));
+ nexts.add(openNode(x,ny,z));
+ nexts.add(openNode(nx,y,z));
+ nexts.add(openNode(nx,y,nz));
+ nexts.add(openNode(x,ny,nz));
+ nexts.add(openNode(nx,ny,z));
+ nexts.add(openNode(nx,ny,nz));
+
+ if (dungeonRoom.isBlocked(x,y,z-dz)) {
+ nexts.add(openNode(x,ny,z-dz));
+ nexts.add(openNode(nx,ny,z-dz));
+ nexts.add(openNode(nx,y,z-dz));
+ }
+ if (dungeonRoom.isBlocked(x-dx,y,z)) {
+ nexts.add(openNode(x-dx,ny,nz));
+ nexts.add(openNode(x-dx,ny,z));
+ nexts.add(openNode(x-dx,y,nz));
+ }
+ if (dungeonRoom.isBlocked(x,y-dy,z)) {
+ nexts.add(openNode(x,y-dy,nz));
+ nexts.add(openNode(nx,y-dy,z));
+ nexts.add(openNode(nx,y-dy,nz));
+ }
+ }
+ return nexts;
+ }
+
+ public Node expand(int x, int y, int z, int dx, int dy, int dz) {
+ while(true) {
+ int nx = x + dx, ny = y + dy, nz = z + dz;
+ if (dungeonRoom.isBlocked(nx, ny, nz)) return null;
+
+ if (nx > destinationBB.minX && nx < destinationBB.maxX && ny > destinationBB.minY && ny < destinationBB.maxY && nz > destinationBB.minZ && nz < destinationBB.maxZ) return openNode(nx,ny,nz);
+
+ int determinant = Math.abs(dx) + Math.abs(dy) + Math.abs(dz);
+ if (determinant == 1) {
+ for (int i = -1; i<=1; i++) {
+ for (int j = - 1; j<=1; j++) {
+ if (i == 0 && j == 0) continue;
+ if (dx != 0 && dungeonRoom.isBlocked(nx, ny + i, nz + j) && !dungeonRoom.isBlocked(nx+dx, ny + i, nz + j)) return openNode(nx,ny,nz);
+ if (dy != 0 && dungeonRoom.isBlocked(nx + i, ny, nz + j) && !dungeonRoom.isBlocked(nx + i, ny+dy, nz + j)) return openNode(nx,ny,nz);
+ if (dz != 0 && dungeonRoom.isBlocked(nx + i, ny + j , nz) && !dungeonRoom.isBlocked(nx + i, ny + j , nz+dz)) return openNode(nx,ny,nz);
+ }
+ }
+ } else if (determinant == 2) {
+ for (EnumFacing value : EnumFacing.VALUES) {
+ if (value.getFrontOffsetX() == dx || value.getFrontOffsetY() == dy || value.getFrontOffsetZ() == dz) continue;
+ int tx = nx + value.getFrontOffsetX();
+ int ty = ny + value.getFrontOffsetY();
+ int tz = nz + value.getFrontOffsetZ();
+ if (dungeonRoom.isBlocked(tx, ty, tz)) return openNode(nx, ny, nz);
+ }
+ if (dx != 0 && expand(nx, ny, nz, dx, 0,0) != null) return openNode(nx,ny,nz);
+ if (dy != 0 && expand(nx, ny, nz, 0, dy,0) != null) return openNode(nx,ny,nz);
+ if (dz != 0 && expand(nx, ny, nz, 0, 0,dz) != null) return openNode(nx,ny,nz);
+ } else if (determinant == 3) {
+ if (dungeonRoom.isBlocked(x, ny, nz ) || dungeonRoom.isBlocked(nx, y , nz) || dungeonRoom.isBlocked(nx, ny, z)) return openNode(nx,ny,nz);
+ if (expand(nx, ny, nz, dx, 0, 0) != null ||
+ expand(nx, ny, nz, dx, dy, 0) != null ||
+ expand(nx, ny, nz, dx, 0, dz) != null ||
+ expand(nx, ny, nz, 0, dy, 0) != null ||
+ expand(nx, ny, nz, 0, dy, dz) != null ||
+ expand(nx, ny, nz, 0, 0, dz) != null) return openNode(nx,ny,nz);
+ }
+ x = nx; y = ny; z = nz;
+ }
+ }
+
+ @RequiredArgsConstructor
+ @Data
+ public static final class Node {
+ private final int x, y, z;
+
+ private float f, g = Float.MAX_VALUE, h = -1;
+ private boolean closed;
+
+ @EqualsAndHashCode.Exclude
+ private Node parent;
+
+ public static int makeHash(int x, int y, int z)
+ {
+ return y & 255 | (x & 32767) << 8 | (z & 32767) << 24 | (x < 0 ? Integer.MIN_VALUE : 0) | (z < 0 ? 32768 : 0);
+ }
+
+ public Node close() {
+ this.closed = true;
+ return this;
+ }
+
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/NodeProcessorDungeonRoom.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/NodeProcessorDungeonRoom.java
new file mode 100644
index 00000000..cdce6cf4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/NodeProcessorDungeonRoom.java
@@ -0,0 +1,144 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import com.google.common.collect.Sets;
+import kr.syeyoung.dungeonsguide.mod.DungeonsGuide;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.Entity;
+import net.minecraft.init.Blocks;
+import net.minecraft.pathfinding.PathPoint;
+import net.minecraft.util.BlockPos;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.Vec3i;
+import net.minecraft.world.World;
+import net.minecraft.world.pathfinder.NodeProcessor;
+
+import java.util.Set;
+
+public class NodeProcessorDungeonRoom extends NodeProcessor {
+ private final DungeonRoom dungeonRoom;
+ private final BlockPos sub;
+
+ public NodeProcessorDungeonRoom(DungeonRoom dungeonRoom) {
+ this.dungeonRoom = dungeonRoom;
+ sub = dungeonRoom.getMax().subtract(dungeonRoom.getMin());
+ }
+
+ @Override
+ public PathPoint getPathPointTo(Entity entityIn) {
+ return openPoint((int) entityIn.posX - dungeonRoom.getMin().getX(), (int) entityIn.posY - dungeonRoom.getMin().getY(),
+ (int) entityIn.posZ - dungeonRoom.getMin().getZ());
+ }
+
+ @Override
+ public PathPoint getPathPointToCoords(Entity entityIn, double x, double y, double z) {
+ return openPoint((int) x - dungeonRoom.getMin().getX(), (int) y - dungeonRoom.getMin().getY(),
+ (int) z - dungeonRoom.getMin().getZ());
+ }
+
+ private static final EnumFacing[] values2 = new EnumFacing[] {
+ EnumFacing.DOWN, EnumFacing.NORTH, EnumFacing.SOUTH, EnumFacing.EAST, EnumFacing.WEST, EnumFacing.UP
+ };
+
+
+
+ @Override
+ public int findPathOptions(PathPoint[] pathOptions, Entity entityIn, PathPoint currentPoint, PathPoint targetPoint, float maxDistance) {
+
+ int i = 0;
+ for (EnumFacing ef : values2) {
+ Vec3i dir = ef.getDirectionVec();
+ int newX = currentPoint.xCoord + dir.getX();
+ int newY = currentPoint.yCoord + dir.getY();
+ int newZ = currentPoint.zCoord + dir.getZ();
+
+ if (newX < 0 || newZ < 0) continue;
+ if (newX > sub.getX() || newZ > sub.getZ()) continue;
+
+ BlockPos add1 = dungeonRoom.getMin().add(newX, newY, newZ);
+ World playerWorld = entityIn.getEntityWorld();
+
+ IBlockState curr = DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(add1);
+
+
+ IBlockState up = DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(dungeonRoom.getMin().add(newX, newY + 1, newZ));
+
+ if (isValidBlock(curr) && isValidBlock(up)) {
+ PathPoint pt = openPoint(newX, newY, newZ);
+ if (pt.visited) continue;
+ pathOptions[i++] = pt;
+ continue;
+ }
+
+ if (curr.getBlock() == Blocks.air) {
+ if (up.getBlock() == Blocks.stone_slab
+ || up.getBlock() == Blocks.wooden_slab
+ || up.getBlock() == Blocks.stone_slab2) {
+ IBlockState up2 = DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(dungeonRoom.getMin().add(newX, newY - 1, newZ));
+ if (up2.getBlock() == Blocks.stone_slab
+ || up2.getBlock() == Blocks.wooden_slab
+ || up2.getBlock() == Blocks.stone_slab2) {
+ PathPoint pt = openPoint(newX, newY, newZ);
+ if (pt.visited) continue;
+ pathOptions[i++] = pt;
+ continue;
+ }
+ }
+ }
+
+ if (dir.getY() == 0
+ && curr.getBlock() == Blocks.iron_bars
+ && up.getBlock() == Blocks.air
+ && DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(new BlockPos(currentPoint.xCoord, currentPoint.yCoord, currentPoint.zCoord)).getBlock() != Blocks.iron_bars) {
+
+ boolean theFlag = false;
+ if (dir.getZ() == 0) {
+ if (DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(
+ add1.add(0, 0, 1)).getBlock() == Blocks.air ||
+ DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(add1.add(0, 0, -1)).getBlock() == Blocks.air) {
+ theFlag = true;
+ }
+ } else if (dir.getX() == 0) {
+ if (DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(add1.add(-1, 0, 0)).getBlock() == Blocks.air ||
+ DungeonsGuide.getDungeonsGuide().getBlockCache().getBlockState(add1.add(1, 0, 0)).getBlock() == Blocks.air) {
+ theFlag = true;
+ }
+ }
+ if (theFlag) {
+ PathPoint pt = openPoint(newX, newY, newZ);
+ if (pt.visited) continue;
+ pathOptions[i++] = pt;
+ }
+ }
+ }
+ return i;
+ }
+
+ public static final Set allowed = Sets.newHashSet(Blocks.air, Blocks.water, Blocks.lava, Blocks.flowing_water, Blocks.flowing_lava, Blocks.vine, Blocks.ladder
+ , Blocks.standing_sign, Blocks.wall_sign, Blocks.trapdoor, Blocks.iron_trapdoor, Blocks.wooden_button, Blocks.stone_button, Blocks.fire,
+ Blocks.torch, Blocks.rail, Blocks.golden_rail, Blocks.activator_rail, Blocks.detector_rail, Blocks.carpet, Blocks.redstone_torch);
+ public static final IBlockState preBuilt = Blocks.stone.getStateFromMeta(2);
+
+ public static boolean isValidBlock(IBlockState state) {
+ return state.equals(preBuilt) || allowed.contains(state.getBlock());
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/ThetaStar.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/ThetaStar.java
new file mode 100644
index 00000000..4a4cf786
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/pathfinding/ThetaStar.java
@@ -0,0 +1,209 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.pathfinding;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import lombok.*;
+import net.minecraft.util.*;
+import net.minecraft.world.World;
+
+import java.util.*;
+
+public class ThetaStar {
+ private final BlockPos min, max;
+ private final World world;
+
+ int lastSx, lastSy, lastSz;
+ final int dx, dy, dz;
+ private DungeonRoom dungeonRoom;
+
+ @Getter
+ private AxisAlignedBB destinationBB;
+
+ public ThetaStar(DungeonRoom dungeonRoom, Vec3 destination) {
+ this.min = new BlockPos(dungeonRoom.getMinx(), 0, dungeonRoom.getMinz());
+ this.max = new BlockPos(dungeonRoom.getMaxx(), 255, dungeonRoom.getMaxz());
+
+ this.world = dungeonRoom.getCachedWorld();
+ this.dungeonRoom = dungeonRoom;
+
+ this.dx = (int) (destination.xCoord * 2);
+ this.dy = (int) (destination.yCoord * 2);
+ this.dz = (int) (destination.zCoord * 2);
+ destinationBB = AxisAlignedBB.fromBounds(dx-2, dy-2, dz-2, dx+2, dy+2, dz+2);
+ }
+
+ private Map nodeMap = new HashMap<>();
+
+ private Node openNode(int x, int y, int z)
+ {
+ Node.Coordinate coordinate = new Node.Coordinate(x,y,z);
+ Node node = this.nodeMap.get(coordinate);
+
+ if (node == null)
+ {
+ node = new Node(coordinate);
+ this.nodeMap.put(coordinate, node);
+ }
+
+ return node;
+ }
+
+ @Getter
+ private LinkedList route = new LinkedList<>();
+
+ @Getter
+ private PriorityQueue open = new PriorityQueue<>(Comparator.comparing((Node a) -> a == null ? Float.MAX_VALUE : a.f).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.x).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.y).thenComparing(a -> a == null ? Float.MAX_VALUE : a.coordinate.z));
+
+ private int pfindIdx = 0;
+
+ public boolean pathfind(Vec3 from, long timeout) {
+
+ pfindIdx ++;
+ if (lastSx != (int)Math.round(from.xCoord * 2) || lastSy != (int)Math.round(from.yCoord*2) || lastSz != (int)Math.round(from.zCoord * 2))
+ open.clear();
+
+ this.lastSx = (int) Math.round(from.xCoord * 2);
+ this.lastSy = (int) Math.round(from.yCoord * 2);
+ this.lastSz = (int) Math.round(from.zCoord * 2);
+ if (dungeonRoom.isBlocked(lastSx, lastSy, lastSz)) return false;
+
+ Node startNode = openNode(dx, dy, dz);
+ Node goalNode = openNode(lastSx, lastSy, lastSz);
+ startNode.g = 0;
+ startNode.f = 0;
+ goalNode.g = Integer.MAX_VALUE; goalNode.f = Integer.MAX_VALUE;
+ if (goalNode.parent != null) {
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+ open.add(startNode);
+
+ long end = System.currentTimeMillis() + timeout;
+
+ while (!open.isEmpty()) {
+ if (System.currentTimeMillis() > end) {
+ return false;
+ }
+ Node n = open.poll();
+ if (n.lastVisited == pfindIdx) continue;
+ n.lastVisited = pfindIdx;
+
+ if (n == goalNode) {
+ // route = reconstructPath(startNode)
+ LinkedList route = new LinkedList<>();
+ Node curr =goalNode;
+ while(curr.parent != null) {
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ curr = curr.parent;
+ }
+ route.addLast(new Vec3(curr.coordinate.x / 2.0, curr.coordinate.y / 2.0 + 0.1, curr.coordinate.z/ 2.0));
+ this.route = route;
+ return true;
+ }
+
+ for (EnumFacing value : EnumFacing.VALUES) {
+ Node neighbor = openNode(n.coordinate.x + value.getFrontOffsetX(), n.coordinate.y + value.getFrontOffsetY(), n.coordinate.z + value.getFrontOffsetZ());
+
+ // check blocked.
+ if (!((destinationBB.minX <= neighbor.coordinate.x && neighbor.coordinate.x <= destinationBB.maxX &&
+ destinationBB.minY <= neighbor.coordinate.y && neighbor.coordinate.y <= destinationBB.maxY &&
+ destinationBB.minZ <= neighbor.coordinate.z && neighbor.coordinate.z <= destinationBB.maxZ) // near destination
+ || !dungeonRoom.isBlocked(neighbor.coordinate.x, neighbor.coordinate.y, neighbor.coordinate.z))) { // not blocked
+ continue;
+ }
+ if (neighbor.lastVisited == pfindIdx) continue;
+
+ boolean flag = false;
+ if (n. parent != null) {
+ float tempGScore = n.parent.g + distSq(n.parent.coordinate.x - neighbor.coordinate.x, n.parent.coordinate.y - neighbor.coordinate.y, n.parent.coordinate.z - neighbor.coordinate.z);
+ if (tempGScore < neighbor.g && lineofsight(n.parent, neighbor)) {
+ neighbor.parent = n.parent;
+ neighbor.g = tempGScore;
+ neighbor.f = tempGScore + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ flag = true;
+ }
+ }
+ if (!flag) {
+ float gScore = n.g + 1; // altho it's sq, it should be fine
+ if (gScore < neighbor.g) {
+ neighbor.parent = n;
+ neighbor.g = gScore;
+ neighbor.f = gScore +distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ } else if (neighbor.lastVisited != pfindIdx) {
+ neighbor.f = neighbor.g + distSq(goalNode.coordinate.x - neighbor.coordinate.x, goalNode.coordinate.y - neighbor.coordinate.y, goalNode.coordinate.z - neighbor.coordinate.z);
+ open.add(neighbor);
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ private boolean lineofsight(Node a, Node b) {
+ if (a == null || b == null) return false;
+ float sx = a.coordinate.x, sy = a.coordinate.y, sz = a.coordinate.z;
+ int ex = b.coordinate.x, ey = b.coordinate.y, ez = b.coordinate.z;
+
+ float dx = ex - sx, dy = ey - sy, dz = ez - sz;
+ float len = distSq(dx, dy, dz);
+ dx /= len; dy /= len; dz /= len;
+
+ for (int d = 0; d <= len; d += 1) {
+ if (dungeonRoom.isBlocked(Math.round(sx), (int) Math.ceil(sy), Math.round(sz))) return false;
+ if (dungeonRoom.isBlocked(Math.round(sx)+1, (int) Math.ceil(sy), Math.round(sz)+1)) return false;
+ if (dungeonRoom.isBlocked(Math.round(sx)-1, (int) Math.ceil(sy), Math.round(sz)-1)) return false;
+ if (dungeonRoom.isBlocked(Math.round(sx)+1, (int) Math.ceil(sy), Math.round(sz)-1)) return false;
+ if (dungeonRoom.isBlocked(Math.round(sx)-1, (int) Math.ceil(sy), Math.round(sz)+1)) return false;
+ sx += dx; sy += dy; sz += dz;
+ }
+ return true;
+ }
+
+ private int manhatten(int x, int y, int z) {return Math.abs(x)+ Math.abs(y)+ Math.abs(z);}
+ private float distSq(float x, float y, float z) {
+ return MathHelper.sqrt_float(x * x + y * y + z * z);
+ }
+
+ @Data
+ public static final class Node {
+ @Data
+ public static final class Coordinate {
+ private final int x, y, z;
+ }
+
+ private final Coordinate coordinate;
+
+ private float f = Float.MAX_VALUE, g = Float.MAX_VALUE;
+ private int lastVisited;
+
+ @EqualsAndHashCode.Exclude
+ @ToString.Exclude
+ private Node parent;
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/EditingContext.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/EditingContext.java
new file mode 100755
index 00000000..8f5fec3f
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/EditingContext.java
@@ -0,0 +1,83 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui.GuiDungeonRoomEdit;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.GuiScreen;
+
+import java.util.Stack;
+
+public class EditingContext {
+
+ private static EditingContext editingContext;
+
+ public static void createEditingContext(DungeonRoom dungeonRoom) {
+ editingContext = new EditingContext(dungeonRoom);
+ }
+
+ public static EditingContext getEditingContext() {
+ return editingContext;
+ }
+
+ public static void endEditingSession() {
+ editingContext = null;
+ Minecraft.getMinecraft().displayGuiScreen(null);
+ }
+
+
+ private EditingContext(DungeonRoom dungeonRoom) {
+ this.room = dungeonRoom;
+ }
+
+ @Getter
+ private final DungeonRoom room;
+
+ @Getter
+ private final Stack guiStack = new Stack();
+
+ public boolean isEditingSecrets() {
+ return guiDungeonRoomEdit.isEditingSelected();
+ }
+ public void endEditing() {
+ guiDungeonRoomEdit.endEditing();
+ }
+
+ private GuiDungeonRoomEdit guiDungeonRoomEdit;
+ @Getter
+ private GuiScreen current;
+
+ public void openGui(GuiScreen gui) {
+ if (gui instanceof GuiDungeonRoomEdit) guiDungeonRoomEdit = (GuiDungeonRoomEdit) gui;
+ guiStack.push(current);
+ this.current = gui;
+ Minecraft.getMinecraft().displayGuiScreen(gui);
+ }
+
+ public void goBack() {
+ current = guiStack.pop();
+ Minecraft.getMinecraft().displayGuiScreen(current);
+ }
+
+ public void reopen() {
+ Minecraft.getMinecraft().displayGuiScreen(current);
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/Parameter.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/Parameter.java
new file mode 100755
index 00000000..850cbe11
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/Parameter.java
@@ -0,0 +1,39 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit;
+
+import lombok.Data;
+
+@Data
+public class Parameter {
+ private String name;
+ private Object previousData;
+ private Object newData;
+
+ public Parameter(String name, Object previousData, Object newData) {
+ this.name = name; this.previousData = previousData; this.newData = newData;
+ }
+
+ private Runnable onSetNewData;
+
+ public void setNewData(Object newData) {
+ this.newData = newData;
+ if (onSetNewData != null) onSetNewData.run();
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonAddSet.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonAddSet.java
new file mode 100755
index 00000000..4e4b5da4
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonAddSet.java
@@ -0,0 +1,136 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui;
+
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.EditingContext;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditOffsetPointSet;
+import kr.syeyoung.dungeonsguide.mod.utils.RenderUtils;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class GuiDungeonAddSet extends MGui {
+
+ private final ValueEditOffsetPointSet valueEditOffsetPointSet;
+
+ private final MButton add;
+ private final MButton back;
+
+
+ @Getter
+ private final OffsetPoint start;
+ @Getter
+ private final OffsetPoint end;
+
+ public void onWorldRender(float partialTicks) {
+ for (OffsetPoint pos:getBlockPoses()) {
+ RenderUtils.highlightBlock(pos.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(0,255,255,50), partialTicks);
+ }
+ RenderUtils.highlightBlock(start.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(255,0,0,100), partialTicks);
+ RenderUtils.highlightBlock(end.getBlockPos(EditingContext.getEditingContext().getRoom()), new Color(0,255,0,100), partialTicks);
+ }
+
+ public List getBlockPoses() {
+ int minX = Math.min(start.getX(), end.getX());
+ int minY = Math.min(start.getY(), end.getY());
+ int minZ = Math.min(start.getZ(), end.getZ());
+ int maxX = Math.max(start.getX(), end.getX());
+ int maxY = Math.max(start.getY(), end.getY());
+ int maxZ = Math.max(start.getZ(), end.getZ());
+
+ List offsetPoints = new ArrayList();
+ for (int z = minZ; z <= maxZ; z++) {
+ for (int x = minX; x <=maxX; x++) {
+ for (int y = maxY; y >= minY; y --) {
+ offsetPoints.add(new OffsetPoint(x,y,z));
+ }
+ }
+ }
+ return offsetPoints;
+ }
+
+ public void add() {
+ valueEditOffsetPointSet.addAll(getBlockPoses());
+ }
+
+ public GuiDungeonAddSet(final ValueEditOffsetPointSet processorParameterEditPane) {
+ this.valueEditOffsetPointSet = processorParameterEditPane;
+ getMainPanel().setBackgroundColor(new Color(17, 17, 17, 179));
+ {
+ start = new OffsetPoint(EditingContext.getEditingContext().getRoom(), Minecraft.getMinecraft().thePlayer.getPosition());
+ end = new OffsetPoint(EditingContext.getEditingContext().getRoom(), Minecraft.getMinecraft().thePlayer.getPosition());
+ }
+ {
+ MValue mValue = new MValue(start, Collections.emptyList());
+ mValue.setBounds(new Rectangle(0,0,150,20));
+ getMainPanel().add(mValue);
+ MValue mValue2 = new MValue(end,Collections.emptyList());
+ mValue2.setBounds(new Rectangle(0,20,150,20));
+ getMainPanel().add(mValue2);
+ }
+ {
+ add = new MButton() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0,parentHeight - 20, parentWidth / 2, 20));
+ }
+ };
+ add.setText("Add");
+ add.setBackgroundColor(Color.red);
+ add.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ add();
+ EditingContext.getEditingContext().goBack();
+ }
+ });
+
+ back = new MButton(){
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(parentWidth / 2,parentHeight - 20, parentWidth / 2, 20));
+ }
+ };
+ back.setText("Go back");
+ back.setBackgroundColor(Color.green);
+ back.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ EditingContext.getEditingContext().goBack();
+ }
+ });
+ getMainPanel().add(add);
+ getMainPanel().add(back);
+ }
+ }
+
+ @Override
+ public void initGui() {
+ super.initGui();
+ // update bounds
+ getMainPanel().setBounds(new Rectangle(10, Math.min((Minecraft.getMinecraft().displayHeight - 300) / 2, Minecraft.getMinecraft().displayHeight),200,300));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonParameterEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonParameterEdit.java
new file mode 100755
index 00000000..0f2764de
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonParameterEdit.java
@@ -0,0 +1,173 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.EditingContext;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.Parameter;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.panes.DynamicEditor;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEdit;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditCreator;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditRegistry;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+
+import java.awt.*;
+
+public class GuiDungeonParameterEdit extends MGui {
+
+ private final Parameter parameter;
+ private final DungeonRoom dungeonRoom;
+
+ private String classSelection;
+
+ private final MPanel currentValueEdit;
+
+ private final MButton save;
+ private final MButton delete;
+
+ @Getter
+ private ValueEdit valueEdit;
+
+ public GuiDungeonParameterEdit(final MParameter parameter2, final DynamicEditor processorParameterEditPane) {
+ dungeonRoom = EditingContext.getEditingContext().getRoom();
+ getMainPanel().setBackgroundColor(new Color(17, 17, 17, 179));
+ this.parameter = parameter2.getParameter();
+ {
+ MTextField mTextField = new MTextField() {
+ @Override
+ public void edit(String str) {
+ parameter.setName(str);
+ }
+ };
+ MLabelAndElement mLabelAndElement = new MLabelAndElement("Name", mTextField);
+
+ mTextField.setText(parameter.getName());
+ mLabelAndElement.setBounds(new Rectangle(0,0,200, 20));
+ getMainPanel().add(mLabelAndElement);
+ }
+ {
+ classSelection = parameter.getNewData() == null ?"null" : parameter.getNewData().getClass().getName();
+ final MStringSelectionButton mStringSelectionButton = new MStringSelectionButton(processorParameterEditPane.allowedClass(), classSelection) {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, 20, parentWidth,20));
+ }
+
+ @Override
+ public String selectionToDisplay(String selection) {
+ String[] split = selection.split("\\.");
+ return super.selectionToDisplay(split[split.length - 1]);
+ }
+ };
+
+ mStringSelectionButton.setOnUpdate(new Runnable() {
+ @Override
+ public void run() {
+ classSelection = mStringSelectionButton.getSelected();
+ updateClassSelection();
+ }
+ });
+ mStringSelectionButton.setBounds(new Rectangle(0,20,150,20));
+ getMainPanel().add(mStringSelectionButton);
+ }
+ {
+ currentValueEdit = new MPanel(){
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, 40, parentWidth,parentHeight - 60));
+ }
+ };
+ getMainPanel().add(currentValueEdit);
+ }
+ {
+ delete = new MButton() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0,parentHeight - 20, parentWidth / 2, 20));
+ }
+ };
+ delete.setText("Delete");
+ delete.setBackgroundColor(Color.red);
+ delete.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ processorParameterEditPane.delete(parameter2);
+ EditingContext.getEditingContext().goBack();
+ }
+ });
+
+ save = new MButton(){
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(parentWidth / 2,parentHeight - 20, parentWidth / 2, 20));
+ }
+ };
+ save.setText("Go back");
+ save.setBackgroundColor(Color.green);
+ save.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ EditingContext.getEditingContext().goBack();
+ }
+ });
+ getMainPanel().add(delete);
+ getMainPanel().add(save);
+ }
+ updateClassSelection();
+ }
+
+ public void updateClassSelection() {
+ currentValueEdit.getChildComponents().clear();
+
+ ValueEditCreator valueEditCreator = ValueEditRegistry.getValueEditMap(classSelection);
+
+ if (!classSelection.equals(parameter.getNewData() == null ?"null" :parameter.getNewData().getClass().getName())) {
+ parameter.setNewData(valueEditCreator.createDefaultValue(parameter));
+ parameter.setPreviousData(valueEditCreator.cloneObj(parameter.getNewData()));
+ }
+
+ MPanel valueEdit = (MPanel) valueEditCreator.createValueEdit(parameter);
+ if (valueEdit == null) {
+ MLabel valueEdit2 = new MLabel() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, 0, parentWidth,20));
+ }
+ };
+ valueEdit2.setText("No Value Edit");
+ valueEdit2.setBounds(new Rectangle(0,0,150,20));
+ valueEdit = valueEdit2;
+ this.valueEdit = null;
+ } else{
+ this.valueEdit = (ValueEdit) valueEdit;
+ }
+ valueEdit.resize0(currentValueEdit.getBounds().width, currentValueEdit.getBounds().height);
+ currentValueEdit.add(valueEdit);
+ }
+ @Override
+ public void initGui() {
+ super.initGui();
+ // update bounds
+ getMainPanel().setBounds(new Rectangle(10, Math.min((Minecraft.getMinecraft().displayHeight - 300) / 2, Minecraft.getMinecraft().displayHeight),200,300));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonRoomEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonRoomEdit.java
new file mode 100755
index 00000000..181ff640
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonRoomEdit.java
@@ -0,0 +1,68 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.MTabbedPane;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.panes.*;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+
+import java.awt.*;
+
+public class GuiDungeonRoomEdit extends MGui {
+
+ private final DungeonRoom room;
+
+ private final MTabbedPane tabbedPane;
+ @Getter
+ private final SecretEditPane sep;
+
+ public GuiDungeonRoomEdit(DungeonRoom room) {
+ this.room = room;
+
+ MTabbedPane tabbedPane = new MTabbedPane();
+ getMainPanel().add(tabbedPane);
+ tabbedPane.setBackground2(new Color(17, 17, 17, 179));
+
+
+ tabbedPane.addTab("General", new GeneralEditPane(room));
+ tabbedPane.addTab("Match", new RoomDataDisplayPane(room));
+ tabbedPane.addTab("Secrets", sep = new SecretEditPane(room));
+ tabbedPane.addTab("Actions", new ActionDisplayPane(room));
+ tabbedPane.addTab("Test", new RoommatchingPane(room));
+ tabbedPane.addTab("Proc.Params", new ProcessorParameterEditPane(room));
+ this.tabbedPane = tabbedPane;
+ }
+
+ public boolean isEditingSelected() {
+ return "Secrets".equals(tabbedPane.getSelectedKey());
+ }
+ public void endEditing() {
+ tabbedPane.setSelectedKey("General");
+ }
+
+ @Override
+ public void initGui() {
+ super.initGui();
+ // update bounds
+ getMainPanel().setBounds(new Rectangle(Math.min((Minecraft.getMinecraft().displayWidth - 500) / 2, Minecraft.getMinecraft().displayWidth), Math.min((Minecraft.getMinecraft().displayHeight - 300) / 2, Minecraft.getMinecraft().displayHeight),500,300));
+ }
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonValueEdit.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonValueEdit.java
new file mode 100755
index 00000000..af4657f5
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/gui/GuiDungeonValueEdit.java
@@ -0,0 +1,127 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.gui;
+
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomfinder.DungeonRoom;
+import kr.syeyoung.dungeonsguide.mod.gui.MGui;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.EditingContext;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.Parameter;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEdit;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditCreator;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditRegistry;
+import lombok.Getter;
+import net.minecraft.client.Minecraft;
+
+import java.awt.*;
+import java.util.List;
+
+public class GuiDungeonValueEdit extends MGui {
+ private DungeonRoom dungeonRoom;
+
+
+ private MPanel currentValueEdit;
+
+ private MButton save;
+
+ @Getter
+ private ValueEdit valueEdit;
+
+ private List addons;
+
+ private Object editingObj;
+
+ public GuiDungeonValueEdit(final Object object, final List addons) {
+ try {
+ dungeonRoom = EditingContext.getEditingContext().getRoom();
+ this.addons = addons;
+ this.editingObj = object;
+ getMainPanel().setBackgroundColor(new Color(17, 17, 17, 179));
+ {
+ currentValueEdit = new MPanel() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, 0, parentWidth, parentHeight - 20 - addons.size() * 20));
+ }
+ };
+ getMainPanel().add(currentValueEdit);
+ }
+
+ for (MPanel addon : addons) {
+ getMainPanel().add(addon);
+ }
+ {
+ save = new MButton() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, parentHeight - 20, parentWidth, 20));
+ }
+ };
+ save.setText("Go back");
+ save.setBackgroundColor(Color.green);
+ save.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ EditingContext.getEditingContext().goBack();
+ }
+ });
+ getMainPanel().add(save);
+ }
+ updateClassSelection();
+ } catch (Exception e){}
+ }
+
+ public void updateClassSelection() {
+ currentValueEdit.getChildComponents().clear();
+
+ ValueEditCreator valueEditCreator = ValueEditRegistry.getValueEditMap(editingObj == null ?"null":editingObj.getClass().getName());
+
+ MPanel valueEdit = (MPanel) valueEditCreator.createValueEdit(new Parameter("", editingObj, editingObj));
+ if (valueEdit == null) {
+ MLabel valueEdit2 = new MLabel() {
+ @Override
+ public void resize(int parentWidth, int parentHeight) {
+ setBounds(new Rectangle(0, 0, parentWidth,20));
+ }
+ };
+ valueEdit2.setText("No Value Edit");
+ valueEdit2.setBounds(new Rectangle(0,0,150,20));
+ valueEdit = valueEdit2;
+ this.valueEdit = null;
+ } else{
+ this.valueEdit = (ValueEdit) valueEdit;
+ }
+ valueEdit.resize0(currentValueEdit.getBounds().width, currentValueEdit.getBounds().height);
+ currentValueEdit.add(valueEdit);
+ }
+ @Override
+ public void initGui() {
+ super.initGui();
+ // update bounds
+ getMainPanel().setBounds(new Rectangle(10, Math.min((Minecraft.getMinecraft().displayHeight - 300) / 2, Minecraft.getMinecraft().displayHeight),200,300));
+
+
+ for (int i = 0; i < addons.size(); i++) {
+ addons.get(i).setBounds(new Rectangle(0, getMainPanel().getBounds().height - (i+1) * 20 - 20, getMainPanel().getBounds().width, 20));
+ }
+ save.setBounds(new Rectangle(0 ,getMainPanel().getBounds().height - 20, getMainPanel().getBounds().width, 20));
+ }
+
+}
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditBreakableWall.java b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditBreakableWall.java
new file mode 100755
index 00000000..bcde40b9
--- /dev/null
+++ b/src/main/java/kr/syeyoung/dungeonsguide/mod/dungeon/roomedit/mechanicedit/ValueEditBreakableWall.java
@@ -0,0 +1,143 @@
+/*
+ * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod
+ * Copyright (C) 2021 cyoung06
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published
+ * by the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.mechanicedit;
+
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPoint;
+import kr.syeyoung.dungeonsguide.dungeon.data.OffsetPointSet;
+import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonBreakableWall;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.EditingContext;
+import kr.syeyoung.dungeonsguide.mod.gui.MPanel;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.Parameter;
+import kr.syeyoung.dungeonsguide.mod.gui.elements.*;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEdit;
+import kr.syeyoung.dungeonsguide.mod.dungeon.roomedit.valueedit.ValueEditCreator;
+import kr.syeyoung.dungeonsguide.mod.utils.TextUtils;
+import net.minecraft.init.Blocks;
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Collections;
+
+public class ValueEditBreakableWall extends MPanel implements ValueEdit {
+ private Parameter parameter;
+
+ // scroll pane
+ // just create
+ // add set
+ private final DungeonBreakableWall dungeonBreakableWall;
+
+ private final MLabel label;
+ private final MValue value;
+ private final MTextField preRequisite;
+ private final MLabelAndElement preRequisite2;
+ private final MButton updateOnlyAir;
+
+ public ValueEditBreakableWall(final Parameter parameter2) {
+ this.parameter = parameter2;
+ this.dungeonBreakableWall = (DungeonBreakableWall) parameter2.getNewData();
+
+
+ label = new MLabel();
+ label.setText("Wall Points");
+ label.setAlignment(MLabel.Alignment.LEFT);
+ add(label);
+
+ value = new MValue(dungeonBreakableWall.getSecretPoint(), Collections.emptyList());
+ add(value);
+
+ updateOnlyAir = new MButton();
+ updateOnlyAir.setText("Update Air");
+ updateOnlyAir.setBackgroundColor(Color.green);
+ updateOnlyAir.setForeground(Color.black);
+ updateOnlyAir.setBounds(new Rectangle(0,40,getBounds().width, 20));
+ add(updateOnlyAir);
+ updateOnlyAir.setOnActionPerformed(new Runnable() {
+ @Override
+ public void run() {
+ OffsetPointSet ofs = dungeonBreakableWall.getSecretPoint();
+ List filtered = new ArrayList