From fcb5be69211638ed6f0ac6414b116b3f2d48240f Mon Sep 17 00:00:00 2001 From: nopo Date: Thu, 17 Oct 2024 22:08:40 +1100 Subject: [PATCH 01/37] Changes by Cal --- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +- .../skyhanni/config/ConfigUpdaterMigrator.kt | 6 +-- .../hannibal2/skyhanni/data/ActionBarData.kt | 4 +- .../at/hannibal2/skyhanni/data/BitsAPI.kt | 4 +- .../at/hannibal2/skyhanni/data/BossbarData.kt | 8 ++-- .../at/hannibal2/skyhanni/data/ChatManager.kt | 4 +- .../at/hannibal2/skyhanni/data/EntityData.kt | 8 ++-- .../skyhanni/data/EntityMovementData.kt | 6 +-- .../at/hannibal2/skyhanni/data/FriendAPI.kt | 6 +-- .../skyhanni/data/GardenCropUpgrades.kt | 4 +- .../hannibal2/skyhanni/data/GuiEditManager.kt | 8 ++-- .../at/hannibal2/skyhanni/data/GuildAPI.kt | 4 +- .../skyhanni/data/NotificationManager.kt | 4 +- .../skyhanni/data/OtherInventoryData.kt | 4 +- .../at/hannibal2/skyhanni/data/PartyAPI.kt | 4 +- .../skyhanni/data/PlayerDeathManager.kt | 4 +- .../skyhanni/data/ProfileStorageData.kt | 8 ++-- .../at/hannibal2/skyhanni/data/QuiverAPI.kt | 4 +- .../at/hannibal2/skyhanni/data/RenderData.kt | 4 +- .../at/hannibal2/skyhanni/data/SackAPI.kt | 4 +- .../hannibal2/skyhanni/data/ScoreboardData.kt | 4 +- .../at/hannibal2/skyhanni/data/ScreenData.kt | 4 +- .../at/hannibal2/skyhanni/data/SlayerAPI.kt | 8 ++-- .../at/hannibal2/skyhanni/data/ToolTipData.kt | 4 +- .../data/bazaar/HypixelBazaarFetcher.kt | 4 +- .../data/hypixel/chat/PlayerChatManager.kt | 12 +++--- .../hypixel/chat/event/AbstractChatEvent.kt | 4 +- .../hypixel/chat/event/SystemMessageEvent.kt | 4 +- .../skyhanni/events/ActionBarUpdateEvent.kt | 3 +- .../events/ActionBarValueUpdateEvent.kt | 3 +- .../events/BazaarOpenedProductEvent.kt | 3 +- .../skyhanni/events/BitsUpdateEvent.kt | 4 +- .../skyhanni/events/BossHealthChangeEvent.kt | 3 +- .../skyhanni/events/BossbarUpdateEvent.kt | 4 +- .../skyhanni/events/BurrowDetectEvent.kt | 3 +- .../skyhanni/events/BurrowDugEvent.kt | 3 +- .../skyhanni/events/BurrowGuessEvent.kt | 3 +- .../skyhanni/events/ChatHoverEvent.kt | 3 +- .../skyhanni/events/CheckRenderEntityEvent.kt | 5 +-- .../skyhanni/events/ColdUpdateEvent.kt | 4 +- .../skyhanni/events/ConfigLoadEvent.kt | 4 +- .../skyhanni/events/CropClickEvent.kt | 3 +- .../events/DamageIndicatorDeathEvent.kt | 3 +- .../events/DamageIndicatorDetectedEvent.kt | 3 +- .../events/DamageIndicatorFinalBossEvent.kt | 4 +- .../events/DataWatcherUpdatedEvent.kt | 3 +- .../skyhanni/events/DebugDataCollectEvent.kt | 3 +- .../skyhanni/events/DrawScreenAfterEvent.kt | 3 +- .../skyhanni/events/DungeonCompleteEvent.kt | 4 +- .../skyhanni/events/DungeonEnterEvent.kt | 4 +- .../skyhanni/events/DungeonStartEvent.kt | 4 +- .../events/EntityCustomNameUpdateEvent.kt | 3 +- .../events/EntityEquipmentChangeEvent.kt | 3 +- .../events/EntityHealthUpdateEvent.kt | 3 +- .../events/EntityMaxHealthUpdateEvent.kt | 3 +- .../skyhanni/events/EntityMoveEvent.kt | 3 +- .../skyhanni/events/FarmingContestEvent.kt | 3 +- .../skyhanni/events/FishingBobberCastEvent.kt | 3 +- .../events/FishingBobberInLiquidEvent.kt | 3 +- .../skyhanni/events/GardenToolChangeEvent.kt | 3 +- .../skyhanni/events/GuiContainerEvent.kt | 17 ++++---- .../skyhanni/events/GuiPositionMovedEvent.kt | 4 +- .../skyhanni/events/GuiRenderEvent.kt | 4 +- .../skyhanni/events/GuiRenderItemEvent.kt | 3 +- .../skyhanni/events/HypixelJoinEvent.kt | 4 +- .../skyhanni/events/InventoryCloseEvent.kt | 4 +- .../events/InventoryFullyOpenedEvent.kt | 3 +- .../skyhanni/events/IslandChangeEvent.kt | 3 +- .../hannibal2/skyhanni/events/ItemAddEvent.kt | 3 +- .../skyhanni/events/ItemInHandChangeEvent.kt | 3 +- .../skyhanni/events/KeyPressEvent.kt | 5 +++ .../skyhanni/events/KuudraCompleteEvent.kt | 4 +- .../skyhanni/events/KuudraEnterEvent.kt | 4 +- .../skyhanni/events/LorenzKeyPressEvent.kt | 3 -- .../skyhanni/events/LorenzRenderWorldEvent.kt | 3 -- .../skyhanni/events/LorenzWorldChangeEvent.kt | 3 -- .../skyhanni/events/MinionOpenEvent.kt | 7 ++-- .../at/hannibal2/skyhanni/events/MobEvent.kt | 3 +- .../events/NeuProfileDataLoadedEvent.kt | 3 +- .../events/NeuRepositoryReloadEvent.kt | 3 +- .../events/OwnInventoryItemUpdateEvent.kt | 3 +- .../skyhanni/events/PlaySoundEvent.kt | 5 ++- .../skyhanni/events/ProfileJoinEvent.kt | 4 +- .../skyhanni/events/PurseChangeEvent.kt | 4 +- .../skyhanni/events/QuiverUpdateEvent.kt | 3 +- .../events/RawScoreboardUpdateEvent.kt | 4 +- .../skyhanni/events/ReceiveParticleEvent.kt | 5 ++- .../events/RenderBlockInWorldEvent.kt | 3 +- .../events/RenderEntityOutlineEvent.kt | 3 +- .../events/RenderGuiItemOverlayEvent.kt | 3 +- .../events/RenderInventoryItemTipEvent.kt | 3 +- .../skyhanni/events/RenderItemTipEvent.kt | 3 +- .../skyhanni/events/RenderItemTooltipEvent.kt | 3 +- .../skyhanni/events/RepositoryReloadEvent.kt | 3 +- .../skyhanni/events/SackChangeEvent.kt | 3 +- .../skyhanni/events/ScoreboardUpdateEvent.kt | 4 +- .../skyhanni/events/SeaCreatureFishEvent.kt | 5 ++- .../skyhanni/events/SecondPassedEvent.kt | 4 +- .../skyhanni/events/ServerBlockChangeEvent.kt | 3 +- .../skyhanni/events/SkillExpGainEvent.kt | 3 +- .../events/SkillOverflowLevelUpEvent.kt | 3 +- .../skyhanni/events/SkipTabListLineEvent.kt | 4 +- .../events/SkyHanniRenderEntityEvent.kt | 4 +- ...orenzChatEvent.kt => SkyhanniChatEvent.kt} | 5 ++- .../events/SkyhanniRenderWorldEvent.kt | 5 +++ ...orenzTickEvent.kt => SkyhanniTickEvent.kt} | 4 +- ...oolTipEvent.kt => SkyhanniToolTipEvent.kt} | 7 ++-- .../skyhanni/events/SlayerChangeEvent.kt | 4 +- .../events/SlayerProgressChangeEvent.kt | 4 +- .../skyhanni/events/TabCompletionEvent.kt | 4 +- .../skyhanni/events/TabListLineRenderEvent.kt | 4 +- .../skyhanni/events/TabListUpdateEvent.kt | 4 +- .../events/TablistFooterUpdateEvent.kt | 4 +- .../skyhanni/events/TitleReceivedEvent.kt | 5 +-- .../skyhanni/events/WidgetUpdateEvent.kt | 3 +- .../skyhanni/events/WorldChangeEvent.kt | 5 +++ .../events/entity/EntityDisplayNameEvent.kt | 4 +- .../events/entity/EntityHealthDisplayEvent.kt | 4 +- .../events/entity/ItemAddInInventoryEvent.kt | 4 +- .../garden/visitor/VisitorAcceptedEvent.kt | 4 +- .../garden/visitor/VisitorRefusedEvent.kt | 4 +- .../events/mining/CorpseLootedEvent.kt | 4 +- .../events/mining/FossilExcavationEvent.kt | 2 +- .../events/player/PlayerDeathEvent.kt | 5 ++- .../events/render/EntityRenderLayersEvent.kt | 2 +- .../events/render/gui/ReplaceItemEvent.kt | 5 ++- .../features/bingo/CompactBingoChat.kt | 4 +- .../features/bingo/MinionCraftHelper.kt | 8 ++-- .../features/bingo/card/BingoCardReader.kt | 4 +- .../features/bingo/card/BingoCardTips.kt | 4 +- .../nextstephelper/BingoNextStepHelper.kt | 8 ++-- .../features/chat/ArachneChatMessageHider.kt | 4 +- .../skyhanni/features/chat/ChatFilter.kt | 6 +-- .../chat/CompactBestiaryChatMessage.kt | 4 +- .../features/chat/CompactExperimentRewards.kt | 4 +- .../chat/CompactSplashPotionMessage.kt | 4 +- .../features/chat/RareDropMessages.kt | 4 +- .../skyhanni/features/chat/StashCompact.kt | 4 +- .../skyhanni/features/chat/WatchdogHider.kt | 4 +- .../features/chat/translation/Translator.kt | 4 +- .../features/combat/BroodmotherFeatures.kt | 4 +- .../skyhanni/features/combat/FlareDisplay.kt | 4 +- .../damageindicator/DamageIndicatorManager.kt | 8 ++-- .../endernodetracker/EnderNodeTracker.kt | 2 +- .../features/combat/mobs/ArachneKillTimer.kt | 8 ++-- .../features/combat/mobs/ArachneSpawnTimer.kt | 12 +++--- .../combat/mobs/AreaMiniBossFeatures.kt | 8 ++-- .../features/combat/mobs/MobHighlight.kt | 8 ++-- .../skyhanni/features/cosmetics/ArrowTrail.kt | 8 ++-- .../cosmetics/CosmeticFollowingLine.kt | 18 ++++---- .../skyhanni/features/dungeon/DungeonAPI.kt | 6 +-- .../dungeon/DungeonArchitectFeatures.kt | 6 +-- .../features/dungeon/DungeonBossAPI.kt | 8 ++-- .../features/dungeon/DungeonBossMessages.kt | 4 +- .../features/dungeon/DungeonChatFilter.kt | 4 +- .../features/dungeon/DungeonCleanEnd.kt | 4 +- .../features/dungeon/DungeonCopilot.kt | 8 ++-- .../features/dungeon/DungeonDeathCounter.kt | 8 ++-- .../features/dungeon/DungeonFinderFeatures.kt | 2 +- .../features/dungeon/DungeonHideItems.kt | 2 +- .../dungeon/DungeonHighlightClickedBlocks.kt | 8 ++-- .../features/dungeon/DungeonLividFinder.kt | 2 +- .../dungeon/DungeonMilestonesDisplay.kt | 12 +++--- .../features/dungeon/DungeonMobManager.kt | 4 +- .../features/dungeon/DungeonsRaceGuide.kt | 2 +- .../dungeon/floor7/TerminalWaypoints.kt | 12 +++--- .../UniqueGiftingOpportunitiesFeatures.kt | 12 +++--- .../event/anniversary/Year300RaffleEvent.kt | 8 ++-- .../features/event/carnival/CarnivalGoal.kt | 4 +- .../event/carnival/CarnivalQuickStart.kt | 4 +- .../event/carnival/CarnivalReminder.kt | 4 +- .../event/carnival/CarnivalZombieShootout.kt | 8 ++-- .../features/event/diana/AllBurrowsList.kt | 4 +- .../features/event/diana/BurrowWarpHelper.kt | 12 +++--- .../features/event/diana/DianaFixChat.kt | 2 +- .../event/diana/DianaProfitTracker.kt | 2 +- .../diana/GriffinBurrowParticleFinder.kt | 8 ++-- .../features/event/diana/GriffinPetWarning.kt | 4 +- .../diana/MythologicalCreatureTracker.kt | 4 +- .../features/event/diana/SoopyGuessBurrow.kt | 4 +- .../event/hoppity/HoppityEggsCompactChat.kt | 6 +-- .../event/hoppity/HoppityEggsShared.kt | 4 +- .../event/hoppity/NucleusBarriersBox.kt | 8 ++-- .../features/event/hoppity/WarpMenuUniques.kt | 4 +- .../frozentreasure/FrozenTreasureTracker.kt | 4 +- .../waypoints/christmas/PresentWaypoints.kt | 18 ++++---- .../waypoints/easter/EasterEggWaypoints.kt | 4 +- .../waypoints/halloween/BasketWaypoints.kt | 8 ++-- .../event/winter/ReindrakeWarpHelper.kt | 4 +- .../features/fishing/ChumBucketHider.kt | 4 +- .../skyhanni/features/fishing/FishingAPI.kt | 4 +- .../features/fishing/FishingBaitWarnings.kt | 4 +- .../features/fishing/FishingHookDisplay.kt | 8 ++-- .../skyhanni/features/fishing/FishingTimer.kt | 6 +-- .../features/fishing/IsFishingDetection.kt | 4 +- .../features/fishing/SeaCreatureFeatures.kt | 4 +- .../features/fishing/SeaCreatureManager.kt | 4 +- .../features/fishing/SharkFishCounter.kt | 8 ++-- .../features/fishing/ShowFishingItemName.kt | 8 ++-- .../fishing/ThunderSparksHighlight.kt | 12 +++--- .../fishing/tracker/FishingProfitTracker.kt | 4 +- .../features/fishing/trophy/OdgerWaypoint.kt | 8 ++-- .../fishing/trophy/TrophyFishFillet.kt | 4 +- .../fishing/trophy/TrophyFishMessages.kt | 4 +- .../features/garden/FarmingFortuneDisplay.kt | 4 +- .../features/garden/GardenCropMilestoneFix.kt | 4 +- .../features/garden/GardenOptimalSpeed.kt | 4 +- .../skyhanni/features/garden/GardenPlotAPI.kt | 10 ++--- .../features/garden/GardenPlotBorders.kt | 8 ++-- .../features/garden/GardenWarpCommands.kt | 4 +- .../features/garden/SensitivityReducer.kt | 4 +- .../features/garden/ToolTooltipTweaks.kt | 4 +- .../garden/composter/ComposterOverlay.kt | 8 ++-- .../GardenComposterInventoryFeatures.kt | 4 +- .../garden/contest/FarmingPersonalBestGain.kt | 4 +- .../contest/JacobFarmingContestsInventory.kt | 4 +- .../garden/farming/ArmorDropTracker.kt | 4 +- .../features/garden/farming/CropSpeedMeter.kt | 4 +- .../garden/farming/DicerRngDropTracker.kt | 4 +- .../garden/farming/FarmingWeightDisplay.kt | 4 +- .../farming/GardenBurrowingSporesNotifier.kt | 4 +- .../garden/farming/GardenStartLocation.kt | 4 +- .../garden/farming/WrongFungiCutterWarning.kt | 4 +- .../garden/farming/lane/FarmingLaneCreator.kt | 4 +- .../farming/lane/FarmingLaneFeatures.kt | 8 ++-- .../garden/fortuneguide/CaptureFarmingGear.kt | 4 +- .../inventory/AnitaExtraFarmingFortune.kt | 4 +- .../GardenInventoryTooltipOverflow.kt | 4 +- .../inventory/plots/GardenNextPlotPrice.kt | 4 +- .../garden/inventory/plots/GardenPlotIcon.kt | 4 +- .../features/garden/pests/PestSpawn.kt | 4 +- .../features/garden/pests/SprayDisplay.kt | 4 +- .../features/garden/pests/SprayFeatures.kt | 8 ++-- .../garden/pests/StereoHarmonyDisplay.kt | 8 ++-- .../visitor/GardenVisitorCompactChat.kt | 8 ++-- .../features/garden/visitor/NPCVisitorFix.kt | 4 +- .../garden/visitor/VisitorRewardWarning.kt | 4 +- .../gui/customscoreboard/CustomScoreboard.kt | 8 ++-- .../features/gui/quiver/QuiverWarning.kt | 4 +- .../inventory/AuctionOutbidWarning.kt | 4 +- .../features/inventory/BitsPerCookieVisual.kt | 4 +- .../skyhanni/features/inventory/ChestValue.kt | 4 +- .../skyhanni/features/inventory/FocusMode.kt | 8 ++-- .../features/inventory/HeldTimeInLore.kt | 4 +- .../features/inventory/HighlightBonzoMasks.kt | 8 ++-- .../features/inventory/PageScrolling.kt | 4 +- .../inventory/PowerStoneGuideFeatures.kt | 4 +- .../features/inventory/QuickCraftFeatures.kt | 4 +- .../features/inventory/ReforgeHelper.kt | 4 +- .../SkyblockGuideHighlightFeature.kt | 12 +++--- .../features/inventory/StockOfStonkFeature.kt | 4 +- .../features/inventory/SuperCraftFeatures.kt | 4 +- .../features/inventory/bazaar/BazaarApi.kt | 8 ++-- .../BazaarCancelledBuyOrderClipboard.kt | 4 +- .../ChocolateFactoryBarnManager.kt | 4 +- .../ChocolateFactoryDataLoader.kt | 4 +- .../ChocolateFactoryTooltip.kt | 4 +- .../ChocolateFactoryTooltipCompact.kt | 6 +-- .../ChocolateFactoryTooltipStray.kt | 4 +- .../chocolatefactory/ChocolateShopPrice.kt | 4 +- .../ExperimentsDryStreakDisplay.kt | 4 +- .../ExperimentsProfitTracker.kt | 6 +-- .../inventory/tiarelay/TiaRelayWaypoints.kt | 8 ++-- .../inventory/wardrobe/CustomWardrobe.kt | 4 +- .../wardrobe/EstimatedWardrobePrice.kt | 4 +- .../itemabilities/ChickenHeadTimer.kt | 12 +++--- .../itemabilities/CrownOfAvariceCounter.kt | 4 +- .../itemabilities/FireVeilWandParticles.kt | 2 +- .../features/mining/DeepCavernsGuide.kt | 2 +- .../features/mining/FlowstateHelper.kt | 4 +- .../features/mining/MiningNotifications.kt | 8 ++-- .../features/mining/PowderPerHotmPerk.kt | 6 +-- .../mining/PrecisionMiningHighlight.kt | 8 ++-- .../CrystalHollowsNamesInCore.kt | 8 ++-- .../crystalhollows/CrystalHollowsWalls.kt | 16 +++---- .../fossilexcavator/ExcavatorTooltipHider.kt | 4 +- .../fossilexcavator/FossilExcavatorAPI.kt | 8 ++-- .../solver/FossilSolverDisplay.kt | 4 +- .../mining/glacitemineshaft/CorpseAPI.kt | 4 +- .../mining/glacitemineshaft/CorpseLocator.kt | 4 +- .../glacitemineshaft/MineshaftWaypoints.kt | 12 +++--- .../mining/powdertracker/PowderTracker.kt | 8 ++-- .../misc/AuctionHousePriceComparison.kt | 4 +- .../features/misc/BetterSignEditing.kt | 4 +- .../skyhanni/features/misc/CarryTracker.kt | 4 +- .../features/misc/CollectionTracker.kt | 4 +- .../skyhanni/features/misc/CopyPlaytime.kt | 4 +- .../skyhanni/features/misc/CrashOnDeath.kt | 4 +- .../features/misc/FixGhostEntities.kt | 4 +- .../skyhanni/features/misc/GFSPiggyBank.kt | 4 +- .../skyhanni/features/misc/HideFarEntities.kt | 4 +- .../skyhanni/features/misc/IslandAreas.kt | 12 +++--- .../features/misc/JoinCrystalHollows.kt | 8 ++-- .../skyhanni/features/misc/LockMouseLook.kt | 8 ++-- .../features/misc/PatcherSendCoordinates.kt | 16 +++---- .../features/misc/PocketSackInASackDisplay.kt | 4 +- .../features/misc/QuickModMenuSwitch.kt | 4 +- .../features/misc/ReplaceRomanNumerals.kt | 4 +- .../misc/RestorePieceOfWizardPortalLore.kt | 4 +- .../features/misc/SkyBlockKickDuration.kt | 8 ++-- .../misc/ThunderBottleNotification.kt | 4 +- .../skyhanni/features/misc/TpsCounter.kt | 4 +- .../features/misc/UserLuckBreakdown.kt | 10 ++--- .../misc/discordrpc/DiscordRPCManager.kt | 6 +-- .../features/misc/limbo/LimboPlaytime.kt | 4 +- .../DefaultConfigFeatures.kt | 4 +- .../features/misc/pets/CurrentPetDisplay.kt | 4 +- .../features/misc/pets/PetExpTooltip.kt | 4 +- .../features/misc/trevor/TrevorTracker.kt | 8 ++-- .../features/misc/update/UpdateManager.kt | 4 +- .../nether/CrimsonMinibossRespawnTimer.kt | 8 ++-- .../skyhanni/features/nether/PabloHelper.kt | 4 +- .../features/nether/SulphurSkitterBox.kt | 12 +++--- .../nether/ashfang/AshfangFreezeCooldown.kt | 4 +- .../nether/ashfang/AshfangHighlights.kt | 10 ++--- .../features/nether/ashfang/AshfangManager.kt | 5 +-- .../features/nether/kuudra/KuudraAPI.kt | 14 +++---- .../CrimsonIsleReputationHelper.kt | 4 +- .../dailyquest/DailyQuestHelper.kt | 4 +- .../kuudra/DailyKuudraBossHelper.kt | 4 +- .../miniboss/DailyMiniBossHelper.kt | 8 ++-- .../area/colosseum/BlobbercystsHighlight.kt | 8 ++-- .../rift/area/dreadfarm/RiftAgaricusCap.kt | 8 ++-- .../dreadfarm/RiftWiltedBerberisHelper.kt | 8 ++-- .../rift/area/dreadfarm/VoltHighlighter.kt | 4 +- .../mirrorverse/CraftRoomHolographicMob.kt | 8 ++-- .../rift/area/mirrorverse/DanceRoomHelper.kt | 4 +- .../area/mirrorverse/RiftLavaMazeParkour.kt | 8 ++-- .../area/mirrorverse/RiftUpsideDownParkour.kt | 8 ++-- .../stillgorechateau/RiftBloodEffigies.kt | 8 ++-- .../area/stillgorechateau/SplatterHearts.kt | 4 +- .../rift/area/westvillage/RiftGunthersRace.kt | 12 +++--- .../area/westvillage/VerminHighlighter.kt | 4 +- .../features/rift/area/wyldwoods/RiftLarva.kt | 4 +- .../rift/area/wyldwoods/RiftOdonata.kt | 4 +- .../rift/area/wyldwoods/ShyCruxWarnings.kt | 4 +- .../rift/everywhere/EnigmaSoulWaypoints.kt | 4 +- .../rift/everywhere/PunchcardHighlight.kt | 4 +- .../features/rift/everywhere/RiftTimer.kt | 8 ++-- .../rift/everywhere/motes/RiftMotesOrb.kt | 8 ++-- .../everywhere/motes/ShowMotesNpcSellPrice.kt | 12 +++--- .../features/skillprogress/SkillTooltip.kt | 4 +- .../features/slayer/SlayerItemsOnGround.kt | 8 ++-- .../features/slayer/SlayerMiniBossFeatures.kt | 8 ++-- .../features/slayer/SlayerProfitTracker.kt | 4 +- .../features/slayer/SlayerRngMeterDisplay.kt | 4 +- .../slayer/blaze/BlazeSlayerDaggerHelper.kt | 8 ++-- .../blaze/BlazeSlayerFirePitsWarning.kt | 4 +- .../slayer/blaze/FirePillarDisplay.kt | 4 +- .../slayer/blaze/HellionShieldHelper.kt | 4 +- .../slayer/enderman/EndermanSlayerFeatures.kt | 4 +- .../enderman/EndermanSlayerHideParticles.kt | 2 +- .../summonings/SummoningMobManager.kt | 4 +- .../features/summonings/SummoningSoulsName.kt | 12 +++--- .../mixins/hooks/RenderLivingEntityHelper.kt | 4 +- .../skyhanni/test/ParkourWaypointSaver.kt | 8 ++-- .../hannibal2/skyhanni/test/ShowItemUuid.kt | 4 +- .../skyhanni/test/SkyHanniDebugsAndTests.kt | 24 +++++------ .../at/hannibal2/skyhanni/test/WorldEdit.kt | 8 ++-- .../skyhanni/test/command/TestChatCommand.kt | 4 +- .../skyhanni/test/graph/GraphEditor.kt | 14 +++---- .../test/graph/GraphEditorBugFinder.kt | 4 +- .../at/hannibal2/skyhanni/utils/ChatUtils.kt | 4 +- .../skyhanni/utils/EntityOutlineRenderer.kt | 2 +- .../skyhanni/utils/KeyboardManager.kt | 14 +++---- .../hannibal2/skyhanni/utils/ParkourHelper.kt | 4 +- .../hannibal2/skyhanni/utils/RenderUtils.kt | 42 +++++++++---------- .../hannibal2/skyhanni/utils/TabListData.kt | 4 +- 368 files changed, 1039 insertions(+), 936 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/events/KeyPressEvent.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/events/LorenzKeyPressEvent.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/events/LorenzRenderWorldEvent.kt delete mode 100644 src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt rename src/main/java/at/hannibal2/skyhanni/events/{LorenzChatEvent.kt => SkyhanniChatEvent.kt} (68%) create mode 100644 src/main/java/at/hannibal2/skyhanni/events/SkyhanniRenderWorldEvent.kt rename src/main/java/at/hannibal2/skyhanni/events/{LorenzTickEvent.kt => SkyhanniTickEvent.kt} (66%) rename src/main/java/at/hannibal2/skyhanni/events/{LorenzToolTipEvent.kt => SkyhanniToolTipEvent.kt} (65%) create mode 100644 src/main/java/at/hannibal2/skyhanni/events/WorldChangeEvent.kt diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index 2c14076a93ba..e48d618ffdcb 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.data.jsonobjects.local.JacobContestsJson import at.hannibal2.skyhanni.data.jsonobjects.local.KnownFeaturesJson import at.hannibal2.skyhanni.data.jsonobjects.local.VisualWordsJson import at.hannibal2.skyhanni.data.repo.RepoManager -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.utils.PreInitFinishedEvent import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper import at.hannibal2.skyhanni.skyhannimodule.LoadedModules @@ -91,7 +91,7 @@ class SkyHanniMod { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (screenToOpen != null) { screenTicks++ if (screenTicks == 5) { diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 8228ae025274..ed4ff592e8cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.config -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.misc.limbo.LimboTimeTracker import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.LorenzUtils.asIntOrNull @@ -30,7 +30,7 @@ object ConfigUpdaterMigrator { val oldVersion: Int, var movesPerformed: Int, val dynamicPrefix: Map>, - ) : LorenzEvent() { + ) : SkyHanniEvent() { init { dynamicPrefix.entries @@ -143,7 +143,7 @@ object ConfigUpdaterMigrator { it.add("lastVersion", JsonPrimitive(i + 1)) }, i, 0, dynamicPrefix - ).also { it.postAndCatch() } + ).also { it.post() } logger.log("Transformations scheduled: ${migration.new}") val mergesPerformed = merge(migration.old, migration.new) logger.log("Migration done with $mergesPerformed merges and ${migration.movesPerformed} moves performed") diff --git a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt index 1cef0be01b3f..7cc1bef8a7b9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.ActionBarUpdateEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraftforge.client.event.ClientChatReceivedEvent @@ -14,7 +14,7 @@ object ActionBarData { fun getActionBar() = actionBar @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { actionBar = "" } diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt index 022a18d926e3..7da2c98b77c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.FameRanks.getFameRankByNameOrNull import at.hannibal2.skyhanni.events.BitsUpdateEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter @@ -167,7 +167,7 @@ object BitsAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() diff --git a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt index 77daa26011a2..120bb1f69c0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.BossbarUpdateEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.entity.boss.BossStatus import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -15,14 +15,14 @@ object BossbarData { fun getBossbar() = bossbar ?: "" @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { val oldBossbar = bossbar ?: return previousServerBossbar = oldBossbar bossbar = null } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val bossbarLine = BossStatus.bossName ?: return if (bossbarLine.isBlank() || bossbarLine.isEmpty()) return if (bossbarLine == bossbar) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index 8780561921af..f414901bbbf5 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent import at.hannibal2.skyhanni.features.chat.ChatFilterGui import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -128,7 +128,7 @@ object ChatManager { return } val key = IdentityCharacteristics(original) - val chatEvent = LorenzChatEvent(message, original) + val chatEvent = SkyhanniChatEvent(message, original) chatEvent.postAndCatch() val blockReason = chatEvent.blockedReason.uppercase() diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt index 04147ce7794c..6d99da74e585 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityDisplayNameEvent import at.hannibal2.skyhanni.events.entity.EntityHealthDisplayEvent import at.hannibal2.skyhanni.events.entity.EntityLeaveWorldEvent @@ -45,7 +45,7 @@ object EntityData { ) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { for (entity in EntityUtils.getEntities()) { // this completely ignores the ignored entities list? val maxHealth = entity.baseMaxHealth val id = entity.entityId @@ -63,7 +63,7 @@ object EntityData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { maxHealthMap.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt index db9044ef2e35..a5e3803b9361 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt @@ -2,10 +2,10 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.EntityMoveEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.SkyHanniWarpEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.LorenzUtils diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt index 1abe31736214..b159374e3000 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson import at.hannibal2.skyhanni.data.jsonobjects.local.FriendsJson.PlayerFriends.Friend import at.hannibal2.skyhanni.events.HypixelJoinEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.LorenzUtils @@ -75,7 +75,7 @@ object FriendAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { readFriendsList(event) removedFriendPattern.matchMatcher(event.message) { @@ -114,7 +114,7 @@ object FriendAPI { saveConfig() } - private fun readFriendsList(event: LorenzChatEvent) { + private fun readFriendsList(event: SkyhanniChatEvent) { if (!event.message.contains("Friends")) return for (sibling in event.chatComponent.siblings) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt index 834c913cfd0a..0e8cd53e282c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -30,7 +30,7 @@ object GardenCropUpgrades { private val cropUpgrades: MutableMap? get() = GardenAPI.storage?.cropUpgrades @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return chatUpgradePattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index e6dfa7671529..145037643dba 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.core.config.Position import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor import at.hannibal2.skyhanni.events.GuiPositionMovedEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import at.hannibal2.skyhanni.utils.ChatUtils @@ -42,7 +42,7 @@ object GuiEditManager { private var lastMovedGui: String? = null @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (event.keyCode != SkyHanniMod.feature.gui.keyBindOpen) return if (event.keyCode == Keyboard.KEY_RETURN) { ChatUtils.chat("You can't use Enter as a keybind to open the gui editor!") @@ -70,7 +70,7 @@ object GuiEditManager { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { lastMovedGui?.let { GuiPositionMovedEvent(it).postAndCatch() lastMovedGui = null diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt index 1e98b61e424a..d9b501eebda2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.data -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -12,7 +12,7 @@ object GuildAPI { private val list = mutableListOf() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message if (message.startsWith("§6Guild Name: ")) { inGuildMessage = true diff --git a/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt b/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt index 748e46892865..2b8c6053cb2e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.commands.CommandCategory import at.hannibal2.skyhanni.config.commands.CommandRegistrationEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.GuiRenderUtils import at.hannibal2.skyhanni.utils.InventoryUtils @@ -29,7 +29,7 @@ object NotificationManager { private const val CLOSE_TEXT = "§c[X] Close" @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { currentNotification ?: return if (lastNotificationClosed.passedSince() < 200.milliseconds) return if (event.keyCode != Keyboard.KEY_X) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt index 02f3910196ac..dc0d6b01b4e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.item.ItemStack @@ -32,7 +32,7 @@ object OtherInventoryData { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { lateEvent?.let { it.postAndCatch() lateEvent = null diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt index 2ee30c27e55a..d586b8c8386f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.data.hypixel.chat.event.PartyChatEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -113,7 +113,7 @@ object PartyAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message.trimWhiteSpace().removeResets() // new member joined diff --git a/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt b/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt index 75616520f8ff..7e50b02532f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.data -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.player.PlayerDeathEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -20,7 +20,7 @@ object PlayerDeathManager { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message deathMessagePattern.matchMatcher(message) { val name = group("name") diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index ad119804baed..fa90a126a124 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.HypixelJoinEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -82,7 +82,7 @@ object ProfileStorageData { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (noTabListTime == SimpleTimeMark.farPast()) return @@ -132,7 +132,7 @@ object ProfileStorageData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hypixelDataLoaded = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt index 2f516610ca51..aee77452b671 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.data.jsonobjects.repo.ArrowTypeJson import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent import at.hannibal2.skyhanni.events.QuiverUpdateEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent @@ -104,7 +104,7 @@ object QuiverAPI { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt index 0aae783575b8..fb7ec9a6103a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.chroma.ChromaConfig import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.misc.visualwords.VisualWordGui import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests @@ -59,7 +59,7 @@ object RenderData { @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { if (!SkyHanniDebugsAndTests.globalRender) return - LorenzRenderWorldEvent(event.partialTicks).postAndCatch() + SkyhanniRenderWorldEvent(event.partialTicks).postAndCatch() } // TODO find better spot for this diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 5235284ffefc..41bbe9ee77f0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigFileType import at.hannibal2.skyhanni.data.jsonobjects.repo.neu.NeuSacksJson import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.events.SackChangeEvent import at.hannibal2.skyhanni.events.SackDataUpdateEvent @@ -226,7 +226,7 @@ object SackAPI { private val sackChangeRegex = Regex("""([+-][\d,]+) (.+) \((.+)\)""") @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!event.message.removeColor().startsWith("[Sacks]")) return val sackAddText = event.chatComponent.siblings.firstNotNullOfOrNull { sibling -> diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt index a8cafcf3d981..9ed661e02e9b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.RawScoreboardUpdateEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent @@ -101,7 +101,7 @@ object ScoreboardData { } @SubscribeEvent(priority = EventPriority.HIGHEST) - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!dirty) return dirty = false monitor() diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt index 2b64ed1ab33d..c37fb6cbd3ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.client.Minecraft import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -11,7 +11,7 @@ object ScreenData { private var wasOpen = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val isOpen = Minecraft.getMinecraft().currentScreen != null if (wasOpen == isOpen) return wasOpen = isOpen diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt index 20dbcdfd1a83..5658ce3eeaa4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.SlayerChangeEvent import at.hannibal2.skyhanni.events.SlayerProgressChangeEvent import at.hannibal2.skyhanni.events.SlayerQuestCompleteEvent @@ -75,7 +75,7 @@ object SlayerAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (event.message.contains("§r§5§lSLAYER QUEST STARTED!")) { @@ -102,7 +102,7 @@ object SlayerAPI { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return // wait with sending SlayerChangeEvent until profile is detected diff --git a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt index 482b590fe54b..f11f8ae00c8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.data -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.item.ItemHoverEvent import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -17,7 +17,7 @@ object ToolTipData { val slot = lastSlot ?: return val itemStack = slot.stack ?: return try { - if (LorenzToolTipEvent(slot, itemStack, toolTip).postAndCatch()) { + if (SkyhanniToolTipEvent(slot, itemStack, toolTip).postAndCatch()) { toolTip.clear() } } catch (e: Throwable) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt index 7a97fca1d19d..ed0a7c958bbe 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.data.bazaar import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarData import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -54,7 +54,7 @@ object HypixelBazaarFetcher { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!canFetch()) return SkyHanniMod.coroutineScope.launch { fetchAndProcessBazaarData() diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index 5199e8b7e230..7edfbb1d8509 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.data.hypixel.chat.event.PlayerAllChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.PlayerShowItemChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.PrivateMessageChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.SystemMessageEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ComponentMatcher import at.hannibal2.skyhanni.utils.ComponentMatcherUtils.intoSpan @@ -114,7 +114,7 @@ object PlayerChatManager { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val chatComponent = event.chatComponent.intoSpan().stripHypixelMessage() coopPattern.matchStyledMatcher(chatComponent) { val author = groupOrThrow("author") @@ -166,7 +166,7 @@ object PlayerChatManager { sendSystemMessage(event) } - private fun ComponentMatcher.isGlobalChat(event: LorenzChatEvent): Boolean { + private fun ComponentMatcher.isGlobalChat(event: SkyhanniChatEvent): Boolean { var author = groupOrThrow("author") val message = groupOrThrow("message").removePrefix("§f") if (author.getText().contains("[NPC]")) { @@ -203,19 +203,19 @@ object PlayerChatManager { return true } - private fun sendSystemMessage(event: LorenzChatEvent) { + private fun sendSystemMessage(event: SkyhanniChatEvent) { with(SystemMessageEvent(event.message, event.chatComponent)) { val cancelled = postAndCatch() event.handleChat(cancelled, blockedReason, chatComponent) } } - private fun AbstractChatEvent.postChat(event: LorenzChatEvent) { + private fun AbstractChatEvent.postChat(event: SkyhanniChatEvent) { val cancelled = postAndCatch() event.handleChat(cancelled, blockedReason, chatComponent) } - private fun LorenzChatEvent.handleChat( + private fun SkyhanniChatEvent.handleChat( cancelled: Boolean, blockedReason: String?, chatComponent: IChatComponent, diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt index 6ef6861f2d56..630bd5c8072b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/AbstractChatEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.data.hypixel.chat.event -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.ComponentSpan import net.minecraft.util.IChatComponent @@ -9,7 +9,7 @@ open class AbstractChatEvent( val messageComponent: ComponentSpan, var chatComponent: IChatComponent, var blockedReason: String? = null, -) : LorenzEvent() { +) : SkyHanniEvent() { val message by lazy { messageComponent.getText().removePrefix("§r") } val author by lazy { authorComponent.getText() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/SystemMessageEvent.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/SystemMessageEvent.kt index 82c53d0b16d2..53e1440aed55 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/SystemMessageEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/event/SystemMessageEvent.kt @@ -1,10 +1,10 @@ package at.hannibal2.skyhanni.data.hypixel.chat.event -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.util.IChatComponent class SystemMessageEvent( val message: String, var chatComponent: IChatComponent, var blockedReason: String? = null, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ActionBarUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ActionBarUpdateEvent.kt index 52ec909c0216..911910ec7f38 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ActionBarUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ActionBarUpdateEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.util.ChatComponentText import net.minecraft.util.IChatComponent -class ActionBarUpdateEvent(var actionBar: String, var chatComponent: IChatComponent) : LorenzEvent() { +class ActionBarUpdateEvent(var actionBar: String, var chatComponent: IChatComponent) : SkyHanniEvent() { fun changeActionBar(newText: String) { chatComponent = ChatComponentText(newText) } diff --git a/src/main/java/at/hannibal2/skyhanni/events/ActionBarValueUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ActionBarValueUpdateEvent.kt index fa3d6a730392..9ed1342580fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ActionBarValueUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ActionBarValueUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.ActionBarStatsData -class ActionBarValueUpdateEvent(val updated: ActionBarStatsData) : LorenzEvent() +class ActionBarValueUpdateEvent(val updated: ActionBarStatsData) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BazaarOpenedProductEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BazaarOpenedProductEvent.kt index e4995564de97..f83e4907a908 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BazaarOpenedProductEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BazaarOpenedProductEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.NEUInternalName class BazaarOpenedProductEvent(val openedProduct: NEUInternalName?, val inventoryOpenEvent: InventoryFullyOpenedEvent) : - LorenzEvent() + SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BitsUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BitsUpdateEvent.kt index 78ff15baee49..08147206e499 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BitsUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BitsUpdateEvent.kt @@ -1,6 +1,8 @@ package at.hannibal2.skyhanni.events -open class BitsUpdateEvent(val bits: Int, val bitsAvailable: Int, val difference: Int = 0) : LorenzEvent() { +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +open class BitsUpdateEvent(val bits: Int, val bitsAvailable: Int, val difference: Int = 0) : SkyHanniEvent() { class BitsGain(bits: Int, bitsAvailable: Int, difference: Int) : BitsUpdateEvent(bits, bitsAvailable, difference) class BitsSpent(bits: Int, bitsAvailable: Int) : BitsUpdateEvent(bits, bitsAvailable) class BitsAvailableGained(bits: Int, bitsAvailable: Int) : BitsUpdateEvent(bits, bitsAvailable) diff --git a/src/main/java/at/hannibal2/skyhanni/events/BossHealthChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BossHealthChangeEvent.kt index 42a827123411..e2f7a60db609 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BossHealthChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BossHealthChangeEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.combat.damageindicator.EntityData -class BossHealthChangeEvent(val entityData: EntityData, val lastHealth: Long, val health: Long, val maxHealth: Long) : LorenzEvent() +class BossHealthChangeEvent(val entityData: EntityData, val lastHealth: Long, val health: Long, val maxHealth: Long) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt index 7dd0d10bbf31..84f8985edd46 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BossbarUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class BossbarUpdateEvent(val bossbar: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class BossbarUpdateEvent(val bossbar: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BurrowDetectEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BurrowDetectEvent.kt index 26e13c42daa6..4ac1836da478 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BurrowDetectEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BurrowDetectEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.event.diana.BurrowType import at.hannibal2.skyhanni.utils.LorenzVec -class BurrowDetectEvent(val burrowLocation: LorenzVec, val type: BurrowType) : LorenzEvent() +class BurrowDetectEvent(val burrowLocation: LorenzVec, val type: BurrowType) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BurrowDugEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BurrowDugEvent.kt index 3f601fd2bb31..191b8ea0d2b9 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BurrowDugEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BurrowDugEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LorenzVec -class BurrowDugEvent(val burrowLocation: LorenzVec) : LorenzEvent() +class BurrowDugEvent(val burrowLocation: LorenzVec) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/BurrowGuessEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/BurrowGuessEvent.kt index 844e43eef3e5..3e6b8f8c164f 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/BurrowGuessEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/BurrowGuessEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LorenzVec -class BurrowGuessEvent(val guessLocation: LorenzVec) : LorenzEvent() +class BurrowGuessEvent(val guessLocation: LorenzVec) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt index 38118bac6bce..04061788642b 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ChatHoverEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.event.HoverEvent import net.minecraft.util.ChatComponentText @@ -12,6 +13,6 @@ import net.minecraft.util.ChatComponentText * The edited chat component in [GuiChatHook][at.hannibal2.skyhanni.mixins.hooks.GuiChatHook] does not change the actual * chat component, but rather makes a new one just before rendering. */ -class ChatHoverEvent(val component: ChatComponentText) : LorenzEvent() { +class ChatHoverEvent(val component: ChatComponentText) : SkyHanniEvent() { fun getHoverEvent(): HoverEvent = component.chatStyle.chatHoverEvent } diff --git a/src/main/java/at/hannibal2/skyhanni/events/CheckRenderEntityEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/CheckRenderEntityEvent.kt index 13da59c430d9..b8f0e16c9b36 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/CheckRenderEntityEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/CheckRenderEntityEvent.kt @@ -1,14 +1,13 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.GenericSkyHanniEvent import net.minecraft.client.renderer.culling.ICamera import net.minecraft.entity.Entity -import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable data class CheckRenderEntityEvent( val entity: T, val camera: ICamera, val camX: Double, val camY: Double, val camZ: Double, -) : LorenzEvent() +) : GenericSkyHanniEvent(entity.javaClass) diff --git a/src/main/java/at/hannibal2/skyhanni/events/ColdUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ColdUpdateEvent.kt index 9894943b795d..1e654c021249 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ColdUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ColdUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class ColdUpdateEvent(val cold: Int) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class ColdUpdateEvent(val cold: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ConfigLoadEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ConfigLoadEvent.kt index 4f1efeb9c246..ae93a35ca764 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ConfigLoadEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ConfigLoadEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class ConfigLoadEvent : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class ConfigLoadEvent : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/CropClickEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/CropClickEvent.kt index 960724a1701e..78e87eb5b41c 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/CropClickEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/CropClickEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.utils.LorenzVec @@ -12,4 +13,4 @@ class CropClickEvent( val blockState: IBlockState, val clickType: ClickType, val itemInHand: ItemStack?, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDeathEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDeathEvent.kt index 95b08ec51926..62c663c36342 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDeathEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDeathEvent.kt @@ -1,7 +1,8 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.combat.damageindicator.EntityData import net.minecraft.entity.EntityLivingBase -class DamageIndicatorDeathEvent(val entity: EntityLivingBase, val data: EntityData) : LorenzEvent() +class DamageIndicatorDeathEvent(val entity: EntityLivingBase, val data: EntityData) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDetectedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDetectedEvent.kt index 2ca276e4c884..731199c3df5c 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDetectedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorDetectedEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.combat.damageindicator.EntityData -class DamageIndicatorDetectedEvent(val entityData: EntityData) : LorenzEvent() +class DamageIndicatorDetectedEvent(val entityData: EntityData) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorFinalBossEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorFinalBossEvent.kt index 0d2564005091..6938ab9b527d 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorFinalBossEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DamageIndicatorFinalBossEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class DamageIndicatorFinalBossEvent(val id: Int) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class DamageIndicatorFinalBossEvent(val id: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DataWatcherUpdatedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DataWatcherUpdatedEvent.kt index 05389c2d7f04..44a940b8e9b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DataWatcherUpdatedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DataWatcherUpdatedEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.DataWatcher import net.minecraft.entity.Entity data class DataWatcherUpdatedEvent( val entity: Entity, val updatedEntries: List, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt index 3b8a884a9e8f..011fbfb11bdd 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DebugDataCollectEvent.kt @@ -1,8 +1,9 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.StringUtils.equalsIgnoreColor -class DebugDataCollectEvent(private val list: MutableList, private val search: String) : LorenzEvent() { +class DebugDataCollectEvent(private val list: MutableList, private val search: String) : SkyHanniEvent() { var empty = true private var currentTitle = "" diff --git a/src/main/java/at/hannibal2/skyhanni/events/DrawScreenAfterEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DrawScreenAfterEvent.kt index 822b80419983..8ef9dc54a43b 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DrawScreenAfterEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DrawScreenAfterEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import org.spongepowered.asm.mixin.injection.callback.CallbackInfo -class DrawScreenAfterEvent(val mouseX: Int, val mouseY: Int, val ci: CallbackInfo) : LorenzEvent() +class DrawScreenAfterEvent(val mouseX: Int, val mouseY: Int, val ci: CallbackInfo) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DungeonCompleteEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DungeonCompleteEvent.kt index d278753cb9ba..67e1e6c5fff5 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DungeonCompleteEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DungeonCompleteEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class DungeonCompleteEvent(val floor: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class DungeonCompleteEvent(val floor: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DungeonEnterEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DungeonEnterEvent.kt index 3b0f09c4a096..f272467e9f45 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DungeonEnterEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DungeonEnterEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class DungeonEnterEvent(dungeonFloor: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class DungeonEnterEvent(dungeonFloor: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/DungeonStartEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/DungeonStartEvent.kt index a2b127371089..f084938bd1ec 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/DungeonStartEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/DungeonStartEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class DungeonStartEvent(dungeonFloor: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class DungeonStartEvent(dungeonFloor: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/EntityCustomNameUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/EntityCustomNameUpdateEvent.kt index 4b4b075e3ac3..b8ea2363c712 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/EntityCustomNameUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/EntityCustomNameUpdateEvent.kt @@ -1,8 +1,9 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.Entity data class EntityCustomNameUpdateEvent( val newName: String?, val entity: Entity, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/EntityEquipmentChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/EntityEquipmentChangeEvent.kt index efef208401b4..6e16d249e6dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/EntityEquipmentChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/EntityEquipmentChangeEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.Entity import net.minecraft.item.ItemStack @@ -7,7 +8,7 @@ data class EntityEquipmentChangeEvent( val entity: Entity, val equipmentSlot: Int, val newItemStack: ItemStack?, -) : LorenzEvent() { +) : SkyHanniEvent() { val isHead get() = equipmentSlot == EQUIPMENT_SLOT_HEAD val isChest get() = equipmentSlot == EQUIPMENT_SLOT_CHEST diff --git a/src/main/java/at/hannibal2/skyhanni/events/EntityHealthUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/EntityHealthUpdateEvent.kt index 162efd9caa59..014259ce4fb8 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/EntityHealthUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/EntityHealthUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.EntityLivingBase -class EntityHealthUpdateEvent(val entity: EntityLivingBase, val health: Int) : LorenzEvent() +class EntityHealthUpdateEvent(val entity: EntityLivingBase, val health: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/EntityMaxHealthUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/EntityMaxHealthUpdateEvent.kt index 943a11cc3720..e19458c2b34e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/EntityMaxHealthUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/EntityMaxHealthUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.EntityLivingBase -class EntityMaxHealthUpdateEvent(val entity: EntityLivingBase, val maxHealth: Int) : LorenzEvent() +class EntityMaxHealthUpdateEvent(val entity: EntityLivingBase, val maxHealth: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/EntityMoveEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/EntityMoveEvent.kt index 68c913c1fda1..db3faf641c1a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/EntityMoveEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/EntityMoveEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LorenzVec import net.minecraft.entity.Entity @@ -8,4 +9,4 @@ class EntityMoveEvent( val oldLocation: LorenzVec, val newLocation: LorenzVec, val distance: Double, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/FarmingContestEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/FarmingContestEvent.kt index 5a4a83c1f829..ccb00a84efa4 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/FarmingContestEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/FarmingContestEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.contest.FarmingContestPhase -class FarmingContestEvent(val crop: CropType, val phase: FarmingContestPhase) : LorenzEvent() +class FarmingContestEvent(val crop: CropType, val phase: FarmingContestPhase) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt index 01ea0222e82b..ee9b1daa9522 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberCastEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.projectile.EntityFishHook -class FishingBobberCastEvent(val bobber: EntityFishHook) : LorenzEvent() +class FishingBobberCastEvent(val bobber: EntityFishHook) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/FishingBobberInLiquidEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberInLiquidEvent.kt index a2cf6d2709c7..2e5c317795be 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/FishingBobberInLiquidEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/FishingBobberInLiquidEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.projectile.EntityFishHook -class FishingBobberInLiquidEvent(val bobber: EntityFishHook, val onWater: Boolean) : LorenzEvent() +class FishingBobberInLiquidEvent(val bobber: EntityFishHook, val onWater: Boolean) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/GardenToolChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GardenToolChangeEvent.kt index 2ad07aad8975..64aa2f48a6e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GardenToolChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GardenToolChangeEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.CropType import net.minecraft.item.ItemStack -class GardenToolChangeEvent(val crop: CropType?, val toolItem: ItemStack?) : LorenzEvent() +class GardenToolChangeEvent(val crop: CropType?, val toolItem: ItemStack?) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt index 34bc2a2a5d13..63e1a0827703 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.GuiRenderUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiContainer @@ -8,7 +9,7 @@ import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.Cancelable -abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: Container) : LorenzEvent() { +abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: Container) : SkyHanniEvent() { data class BackgroundDrawnEvent( override val gui: GuiContainer, @@ -18,14 +19,13 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: val partialTicks: Float, ) : GuiContainerEvent(gui, container) - @Cancelable data class PreDraw( override val gui: GuiContainer, override val container: Container, val mouseX: Int, val mouseY: Int, val partialTicks: Float, - ) : GuiContainerEvent(gui, container) { + ) : GuiContainerEvent(gui, container), Cancellable { fun drawDefaultBackground() = GuiRenderUtils.drawGradientRect(0, 0, gui.width, gui.height, -1072689136, -804253680, 0.0) } @@ -38,20 +38,18 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: val partialTicks: Float, ) : GuiContainerEvent(gui, container) - @Cancelable data class CloseWindowEvent(override val gui: GuiContainer, override val container: Container) : - GuiContainerEvent(gui, container) + GuiContainerEvent(gui, container), Cancellable abstract class DrawSlotEvent(gui: GuiContainer, container: Container, open val slot: Slot) : GuiContainerEvent(gui, container) { - @Cancelable data class GuiContainerDrawSlotPre( override val gui: GuiContainer, override val container: Container, override val slot: Slot, ) : - DrawSlotEvent(gui, container, slot) + DrawSlotEvent(gui, container, slot), Cancellable data class GuiContainerDrawSlotPost( override val gui: GuiContainer, @@ -69,7 +67,6 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: val partialTicks: Float, ) : GuiContainerEvent(gui, container) - @Cancelable data class SlotClickEvent( override val gui: GuiContainer, override val container: Container, @@ -80,7 +77,7 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: @Deprecated("old", ReplaceWith("clickTypeEnum")) val clickType: Int, val clickTypeEnum: ClickType? = ClickType.getTypeById(clickType), - ) : GuiContainerEvent(gui, container) { + ) : GuiContainerEvent(gui, container), Cancellable { fun makePickblock() { if (this.clickedButton == 2 && this.clickTypeEnum == ClickType.MIDDLE) return @@ -88,7 +85,7 @@ abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: Minecraft.getMinecraft().playerController.windowClick( container.windowId, slotNumber, 2, 3, Minecraft.getMinecraft().thePlayer, ) - isCanceled = true + cancel() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiPositionMovedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiPositionMovedEvent.kt index 3d8fe02f991a..6c2c7e509449 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiPositionMovedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiPositionMovedEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class GuiPositionMovedEvent(val guiName: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class GuiPositionMovedEvent(val guiName: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderEvent.kt index 954bd0733391..5ea1a60e5568 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderEvent.kt @@ -1,6 +1,8 @@ package at.hannibal2.skyhanni.events -open class GuiRenderEvent : LorenzEvent() { +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +open class GuiRenderEvent : SkyHanniEvent() { class ChestGuiOverlayRenderEvent : GuiRenderEvent() class GuiOverlayRenderEvent : GuiRenderEvent() } diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt index 58dc557e856a..7defa6c75fa9 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiRenderItemEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.client.gui.FontRenderer import net.minecraft.item.ItemStack -abstract class GuiRenderItemEvent : LorenzEvent() { +abstract class GuiRenderItemEvent : SkyHanniEvent() { abstract class RenderOverlayEvent( open val fontRenderer: FontRenderer, open val stack: ItemStack?, diff --git a/src/main/java/at/hannibal2/skyhanni/events/HypixelJoinEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/HypixelJoinEvent.kt index 6f7711118be6..69406065841a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/HypixelJoinEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/HypixelJoinEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class HypixelJoinEvent : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +object HypixelJoinEvent : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt index 70e87a53e71e..948c9bc5ab02 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/InventoryCloseEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class InventoryCloseEvent(val reopenSameName: Boolean) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class InventoryCloseEvent(val reopenSameName: Boolean) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt index 5374b95d3c2e..d9f5a0f70df7 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/InventoryFullyOpenedEvent.kt @@ -1,11 +1,12 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.OtherInventoryData import at.hannibal2.skyhanni.utils.PrimitiveItemStack import at.hannibal2.skyhanni.utils.PrimitiveItemStack.Companion.toPrimitiveStackOrNull import net.minecraft.item.ItemStack -open class InventoryOpenEvent(private val inventory: OtherInventoryData.Inventory) : LorenzEvent() { +open class InventoryOpenEvent(private val inventory: OtherInventoryData.Inventory) : SkyHanniEvent() { val inventoryId: Int by lazy { inventory.windowId } val inventoryName: String by lazy { inventory.title } diff --git a/src/main/java/at/hannibal2/skyhanni/events/IslandChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/IslandChangeEvent.kt index ae22a4c751ad..587b35048021 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/IslandChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/IslandChangeEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.IslandType -class IslandChangeEvent(val newIsland: IslandType, val oldIsland: IslandType) : LorenzEvent() +class IslandChangeEvent(val newIsland: IslandType, val oldIsland: IslandType) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ItemAddEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ItemAddEvent.kt index ad0c6355dfd3..cacc8dd23bea 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ItemAddEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ItemAddEvent.kt @@ -1,7 +1,8 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.ItemAddManager import at.hannibal2.skyhanni.utils.NEUInternalName class ItemAddEvent(val internalName: NEUInternalName, val amount: Int, val source: ItemAddManager.Source) : - LorenzEvent() + SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ItemInHandChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ItemInHandChangeEvent.kt index 4ef39df43345..9312aa4aaa69 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ItemInHandChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ItemInHandChangeEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.NEUInternalName -class ItemInHandChangeEvent(val newItem: NEUInternalName, val oldItem: NEUInternalName) : LorenzEvent() +class ItemInHandChangeEvent(val newItem: NEUInternalName, val oldItem: NEUInternalName) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/KeyPressEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/KeyPressEvent.kt new file mode 100644 index 000000000000..cbac5f62df5a --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/KeyPressEvent.kt @@ -0,0 +1,5 @@ +package at.hannibal2.skyhanni.events + +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class KeyPressEvent(val keyCode: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/KuudraCompleteEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/KuudraCompleteEvent.kt index 98b207f49b49..d57a327ed157 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/KuudraCompleteEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/KuudraCompleteEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class KuudraCompleteEvent(val kuudraTier: Int) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class KuudraCompleteEvent(val kuudraTier: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/KuudraEnterEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/KuudraEnterEvent.kt index 8482058a7320..4b3ca2c9f3a3 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/KuudraEnterEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/KuudraEnterEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class KuudraEnterEvent(val kuudraTier: Int) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class KuudraEnterEvent(val kuudraTier: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzKeyPressEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzKeyPressEvent.kt deleted file mode 100644 index e5af23d22ab6..000000000000 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzKeyPressEvent.kt +++ /dev/null @@ -1,3 +0,0 @@ -package at.hannibal2.skyhanni.events - -class LorenzKeyPressEvent(val keyCode: Int) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzRenderWorldEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzRenderWorldEvent.kt deleted file mode 100644 index f61f0e16d35d..000000000000 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzRenderWorldEvent.kt +++ /dev/null @@ -1,3 +0,0 @@ -package at.hannibal2.skyhanni.events - -class LorenzRenderWorldEvent(val partialTicks: Float) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt deleted file mode 100644 index de67180273b0..000000000000 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzWorldChangeEvent.kt +++ /dev/null @@ -1,3 +0,0 @@ -package at.hannibal2.skyhanni.events - -class LorenzWorldChangeEvent : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/MinionOpenEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/MinionOpenEvent.kt index bfe8649ba97c..571bb70c7f90 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/MinionOpenEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/MinionOpenEvent.kt @@ -1,8 +1,9 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LorenzVec import net.minecraft.item.ItemStack -class MinionOpenEvent(val inventoryName: String, val inventoryItems: Map) : LorenzEvent() -class MinionCloseEvent : LorenzEvent() -class MinionStorageOpenEvent(val position: LorenzVec?, val inventoryItems: Map) : LorenzEvent() +class MinionOpenEvent(val inventoryName: String, val inventoryItems: Map) : SkyHanniEvent() +class MinionCloseEvent : SkyHanniEvent() +class MinionStorageOpenEvent(val position: LorenzVec?, val inventoryItems: Map) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt index 07990ff222c5..2d4bd7cfed15 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/MobEvent.kt @@ -1,8 +1,9 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.mob.Mob -open class MobEvent(val mob: Mob) : LorenzEvent() { +open class MobEvent(val mob: Mob) : SkyHanniEvent() { open class Spawn(mob: Mob) : MobEvent(mob) { class SkyblockMob(mob: Mob) : Spawn(mob) class Summon(mob: Mob) : Spawn(mob) diff --git a/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt index 175271e6902e..a2d4e4062c7e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/NeuProfileDataLoadedEvent.kt @@ -1,10 +1,11 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.jsonobjects.other.HypixelPlayerApiJson import at.hannibal2.skyhanni.utils.LorenzUtils -class NeuProfileDataLoadedEvent(val playerData: HypixelPlayerApiJson) : LorenzEvent() { +class NeuProfileDataLoadedEvent(val playerData: HypixelPlayerApiJson) : SkyHanniEvent() { fun getCurrentProfileData() = playerData.profiles.firstOrNull { it.profileName.lowercase() == HypixelData.profileName } diff --git a/src/main/java/at/hannibal2/skyhanni/events/NeuRepositoryReloadEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/NeuRepositoryReloadEvent.kt index 9feb170c1f08..0fd5d5ea62b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/NeuRepositoryReloadEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/NeuRepositoryReloadEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.data.repo.RepoError import at.hannibal2.skyhanni.data.repo.RepoUtils @@ -14,7 +15,7 @@ import com.google.gson.JsonSyntaxException import java.io.File import java.lang.reflect.Type -class NeuRepositoryReloadEvent : LorenzEvent() { +class NeuRepositoryReloadEvent : SkyHanniEvent() { fun getConstant(file: String): JsonObject? = File(manager.repoLocation, "constants/$file.json").getJson() inline fun readConstant(file: String, gson: Gson = ConfigManager.gson): T { diff --git a/src/main/java/at/hannibal2/skyhanni/events/OwnInventoryItemUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/OwnInventoryItemUpdateEvent.kt index 56264e198767..986e658bd9b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/OwnInventoryItemUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/OwnInventoryItemUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.item.ItemStack -data class OwnInventoryItemUpdateEvent(val itemStack: ItemStack, val slot: Int) : LorenzEvent() +data class OwnInventoryItemUpdateEvent(val itemStack: ItemStack, val slot: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt index 96f228a6ba85..1fe05a0d83ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/PlaySoundEvent.kt @@ -1,13 +1,14 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable class PlaySoundEvent(val soundName: String, val location: LorenzVec, val pitch: Float, val volume: Float) : - LorenzEvent() { + CancellableSkyHanniEvent() { val distanceToPlayer by lazy { location.distanceToPlayer() } override fun toString(): String { diff --git a/src/main/java/at/hannibal2/skyhanni/events/ProfileJoinEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ProfileJoinEvent.kt index 68d8f075d914..e4f53ba3a208 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ProfileJoinEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ProfileJoinEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class ProfileJoinEvent(val name: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class ProfileJoinEvent(val name: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/PurseChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/PurseChangeEvent.kt index d776fe32b672..9233706dcbb8 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/PurseChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/PurseChangeEvent.kt @@ -1,6 +1,8 @@ package at.hannibal2.skyhanni.events -class PurseChangeEvent(val coins: Double, val reason: PurseChangeCause) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class PurseChangeEvent(val coins: Double, val reason: PurseChangeCause) : SkyHanniEvent() enum class PurseChangeCause { GAIN_MOB_KILL, diff --git a/src/main/java/at/hannibal2/skyhanni/events/QuiverUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/QuiverUpdateEvent.kt index d0c0e5b0b1ac..eaaf4a1665ac 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/QuiverUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/QuiverUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.ArrowType -class QuiverUpdateEvent(val currentArrow: ArrowType?, val currentAmount: Int) : LorenzEvent() +class QuiverUpdateEvent(val currentArrow: ArrowType?, val currentAmount: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RawScoreboardUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RawScoreboardUpdateEvent.kt index ac11a5bcb153..45cc13659ac7 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RawScoreboardUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RawScoreboardUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class RawScoreboardUpdateEvent(val rawScoreboard: List) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class RawScoreboardUpdateEvent(val rawScoreboard: List) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ReceiveParticleEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ReceiveParticleEvent.kt index 75fe8af8a3c2..80b8d6696a01 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ReceiveParticleEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ReceiveParticleEvent.kt @@ -1,12 +1,13 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.NumberUtil.roundTo import net.minecraft.util.EnumParticleTypes import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable class ReceiveParticleEvent( val type: EnumParticleTypes, val location: LorenzVec, @@ -16,7 +17,7 @@ class ReceiveParticleEvent( val longDistance: Boolean, val particleArgs: IntArray, ) : - LorenzEvent() { + CancellableSkyHanniEvent() { val distanceToPlayer by lazy { location.distanceToPlayer() } diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt index 395d1be2db0c..abc3fade2b8e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt @@ -5,5 +5,4 @@ import net.minecraft.util.BlockPos import net.minecraft.world.IBlockAccess import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable -data class RenderBlockInWorldEvent(@JvmField var state: IBlockState?, var world: IBlockAccess, var pos: BlockPos?) : LorenzEvent() +data class RenderBlockInWorldEvent(@JvmField var state: IBlockState?, var world: IBlockAccess, var pos: BlockPos?) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderEntityOutlineEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderEntityOutlineEvent.kt index f64dfa27edf6..d7a5b1106d7f 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderEntityOutlineEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderEntityOutlineEvent.kt @@ -1,12 +1,13 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.client.Minecraft import net.minecraft.entity.Entity import net.minecraft.entity.item.EntityArmorStand import net.minecraft.entity.item.EntityItemFrame class RenderEntityOutlineEvent(theType: Type?, potentialEntities: HashSet?) : - LorenzEvent() { + SkyHanniEvent() { /** * The phase of the event (see [Type] diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderGuiItemOverlayEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderGuiItemOverlayEvent.kt index 0db2e4e1466a..2034b09fbbd0 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderGuiItemOverlayEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderGuiItemOverlayEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.item.ItemStack class RenderGuiItemOverlayEvent( val stack: ItemStack?, val x: Int, val y: Int, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt index 0f16dad2a4a1..79c974dbde65 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderInventoryItemTipEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack @@ -11,4 +12,4 @@ class RenderInventoryItemTipEvent( var offsetX: Int = 0, var offsetY: Int = 0, var alignLeft: Boolean = true, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt index 5a144cb7e04d..451302602b3d 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTipEvent.kt @@ -1,11 +1,12 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.item.ItemStack class RenderItemTipEvent( val stack: ItemStack, var renderObjects: MutableList, -) : LorenzEvent() { +) : SkyHanniEvent() { var stackTip = "" set(value) { diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTooltipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTooltipEvent.kt index f8cb98802b1c..ea1283a52d58 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderItemTooltipEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderItemTooltipEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.item.ItemStack -class RenderItemTooltipEvent(val stack: ItemStack) : LorenzEvent() +class RenderItemTooltipEvent(val stack: ItemStack) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt index ec5b0a8ec95e..f7e3af9a548c 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RepositoryReloadEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.repo.RepoError import at.hannibal2.skyhanni.data.repo.RepoManager import at.hannibal2.skyhanni.data.repo.RepoUtils @@ -7,7 +8,7 @@ import com.google.gson.Gson import java.io.File import java.lang.reflect.Type -class RepositoryReloadEvent(val repoLocation: File, val gson: Gson) : LorenzEvent() { +class RepositoryReloadEvent(val repoLocation: File, val gson: Gson) : SkyHanniEvent() { inline fun getConstant(constant: String, type: Type? = null, gson: Gson = this.gson): T = try { RepoManager.setLastConstant(constant) diff --git a/src/main/java/at/hannibal2/skyhanni/events/SackChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SackChangeEvent.kt index aa81287d7568..d51791a60125 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SackChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SackChangeEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.SackAPI class SackChangeEvent( val sackChanges: List, val otherItemsAdded: Boolean, val otherItemsRemoved: Boolean, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/ScoreboardUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ScoreboardUpdateEvent.kt index 9480e8061690..3a8409ecf7c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ScoreboardUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ScoreboardUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class ScoreboardUpdateEvent(val scoreboard: List) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class ScoreboardUpdateEvent(val scoreboard: List) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SeaCreatureFishEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SeaCreatureFishEvent.kt index 0c0c4f62780a..9286dcb187d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SeaCreatureFishEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SeaCreatureFishEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.fishing.SeaCreature class SeaCreatureFishEvent( val seaCreature: SeaCreature, - val chatEvent: LorenzChatEvent, + val chatEvent: SkyhanniChatEvent, val doubleHook: Boolean, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SecondPassedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SecondPassedEvent.kt index d422a026f981..dd87346986d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SecondPassedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SecondPassedEvent.kt @@ -1,5 +1,7 @@ package at.hannibal2.skyhanni.events -class SecondPassedEvent(private val totalSeconds: Int) : LorenzEvent() { +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class SecondPassedEvent(private val totalSeconds: Int) : SkyHanniEvent() { fun repeatSeconds(i: Int) = totalSeconds % i == 0 } diff --git a/src/main/java/at/hannibal2/skyhanni/events/ServerBlockChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/ServerBlockChangeEvent.kt index 106ee2821cb3..ed0ef4ac9311 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/ServerBlockChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/ServerBlockChangeEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -7,7 +8,7 @@ import at.hannibal2.skyhanni.utils.toLorenzVec import net.minecraft.block.state.IBlockState import net.minecraft.util.BlockPos -class ServerBlockChangeEvent(blockPos: BlockPos, blockState: IBlockState) : LorenzEvent() { +class ServerBlockChangeEvent(blockPos: BlockPos, blockState: IBlockState) : SkyHanniEvent() { val location by lazy { blockPos.toLorenzVec() } val old by lazy { location.getBlockAt().toString().getName() } diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkillExpGainEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkillExpGainEvent.kt index 09365a7baa9c..a0a6a771f69d 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkillExpGainEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkillExpGainEvent.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.skillprogress.SkillType // does not know how much exp is there, also gets called multiple times -class SkillExpGainEvent(val skill: SkillType, val gained: Double) : LorenzEvent() +class SkillExpGainEvent(val skill: SkillType, val gained: Double) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt index d3f356da7f7d..cd50caa5ea66 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkillOverflowLevelUpEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.skillprogress.SkillType -class SkillOverflowLevelUpEvent(val skill: SkillType, val oldLevel: Int, val newLevel: Int) : LorenzEvent() +class SkillOverflowLevelUpEvent(val skill: SkillType, val oldLevel: Int, val newLevel: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkipTabListLineEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkipTabListLineEvent.kt index 0250b821f1f5..ef09577a1038 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkipTabListLineEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkipTabListLineEvent.kt @@ -1,11 +1,11 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import at.hannibal2.skyhanni.features.misc.compacttablist.TabLine import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable data class SkipTabListLineEvent( val line: TabLine, val lastSubTitle: TabLine?, val lastTitle: TabLine?, -) : LorenzEvent() +) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkyHanniRenderEntityEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyHanniRenderEntityEvent.kt index 289e661f1b69..e0d3818aa73e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkyHanniRenderEntityEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyHanniRenderEntityEvent.kt @@ -1,17 +1,17 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import net.minecraft.client.renderer.entity.RendererLivingEntity import net.minecraft.entity.EntityLivingBase import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable open class SkyHanniRenderEntityEvent( val entity: T, val renderer: RendererLivingEntity, val x: Double, val y: Double, val z: Double -) : LorenzEvent() { +) : CancellableSkyHanniEvent() { class Pre( entity: T, renderer: RendererLivingEntity, diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzChatEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt similarity index 68% rename from src/main/java/at/hannibal2/skyhanni/events/LorenzChatEvent.kt rename to src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt index 9d03549ac524..7ab31b08d9a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzChatEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt @@ -1,10 +1,11 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.util.IChatComponent -class LorenzChatEvent( +class SkyhanniChatEvent( val message: String, var chatComponent: IChatComponent, var blockedReason: String = "", var chatLineId: Int = 0, -) : LorenzEvent() +) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkyhanniRenderWorldEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniRenderWorldEvent.kt new file mode 100644 index 000000000000..3d9640efef8c --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniRenderWorldEvent.kt @@ -0,0 +1,5 @@ +package at.hannibal2.skyhanni.events + +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class SkyhanniRenderWorldEvent(val partialTicks: Float) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniTickEvent.kt similarity index 66% rename from src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt rename to src/main/java/at/hannibal2/skyhanni/events/SkyhanniTickEvent.kt index f319ca557f74..218ab6e4583c 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzTickEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniTickEvent.kt @@ -1,6 +1,8 @@ package at.hannibal2.skyhanni.events -class LorenzTickEvent(private val tick: Int) : LorenzEvent() { +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class SkyhanniTickEvent(private val tick: Int) : SkyHanniEvent() { fun isMod(i: Int, offset: Int = 0) = (tick + offset) % i == 0 diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzToolTipEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniToolTipEvent.kt similarity index 65% rename from src/main/java/at/hannibal2/skyhanni/events/LorenzToolTipEvent.kt rename to src/main/java/at/hannibal2/skyhanni/events/SkyhanniToolTipEvent.kt index 4f6269c81745..1cc8329423ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzToolTipEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniToolTipEvent.kt @@ -1,12 +1,13 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable -class LorenzToolTipEvent(val slot: Slot, val itemStack: ItemStack, private val toolTip0: MutableList) : - LorenzEvent() { + +class SkyhanniToolTipEvent(val slot: Slot, val itemStack: ItemStack, private val toolTip0: MutableList) : + CancellableSkyHanniEvent() { var toolTip: MutableList set(value) { diff --git a/src/main/java/at/hannibal2/skyhanni/events/SlayerChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SlayerChangeEvent.kt index c7da7f7bd7d3..05d2a357e3dc 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SlayerChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SlayerChangeEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class SlayerChangeEvent(val oldSlayer: String, val newSlayer: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class SlayerChangeEvent(val oldSlayer: String, val newSlayer: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/SlayerProgressChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SlayerProgressChangeEvent.kt index b87a854e1922..78a68c5d492f 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SlayerProgressChangeEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SlayerProgressChangeEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class SlayerProgressChangeEvent(val oldProgress: String, val newProgress: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class SlayerProgressChangeEvent(val oldProgress: String, val newProgress: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/TabCompletionEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/TabCompletionEvent.kt index f3ec47b02a20..368fb146bd4b 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/TabCompletionEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/TabCompletionEvent.kt @@ -1,10 +1,12 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + class TabCompletionEvent( val leftOfCursor: String, val fullText: String, val originalCompletions: List, -) : LorenzEvent() { +) : SkyHanniEvent() { val lastWord = leftOfCursor.substringAfterLast(' ') val additionalSuggestions = mutableSetOf() val suppressedSuggestions = mutableSetOf() diff --git a/src/main/java/at/hannibal2/skyhanni/events/TabListLineRenderEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/TabListLineRenderEvent.kt index 47478959291d..7a863a8e9635 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/TabListLineRenderEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/TabListLineRenderEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class TabListLineRenderEvent(var text: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class TabListLineRenderEvent(var text: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/TabListUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/TabListUpdateEvent.kt index a1b36a667fb3..c4e44624ab11 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/TabListUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/TabListUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class TabListUpdateEvent(val tabList: List) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class TabListUpdateEvent(val tabList: List) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/TablistFooterUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/TablistFooterUpdateEvent.kt index 6f12e99bc47e..ffca3d846259 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/TablistFooterUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/TablistFooterUpdateEvent.kt @@ -1,3 +1,5 @@ package at.hannibal2.skyhanni.events -class TablistFooterUpdateEvent(val footer: String) : LorenzEvent() +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +class TablistFooterUpdateEvent(val footer: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/TitleReceivedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/TitleReceivedEvent.kt index 912a4d8d6564..82f261e7614b 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/TitleReceivedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/TitleReceivedEvent.kt @@ -1,6 +1,5 @@ package at.hannibal2.skyhanni.events -import net.minecraftforge.fml.common.eventhandler.Cancelable +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent -@Cancelable -class TitleReceivedEvent(val title: String) : LorenzEvent() +class TitleReceivedEvent(val title: String) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/WidgetUpdateEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/WidgetUpdateEvent.kt index a91e7dca3a03..1c0bedcad69e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/WidgetUpdateEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/WidgetUpdateEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.utils.LorenzUtils.isAnyOf @@ -7,7 +8,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isAnyOf open class WidgetUpdateEvent( val widget: TabWidget, val lines: List, -) : LorenzEvent() { +) : SkyHanniEvent() { fun isWidget(widgetType: TabWidget) = widget == widgetType fun isWidget(vararg widgetType: TabWidget) = widget.isAnyOf(*widgetType) diff --git a/src/main/java/at/hannibal2/skyhanni/events/WorldChangeEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/WorldChangeEvent.kt new file mode 100644 index 000000000000..936b6cfb090e --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/events/WorldChangeEvent.kt @@ -0,0 +1,5 @@ +package at.hannibal2.skyhanni.events + +import at.hannibal2.skyhanni.api.event.SkyHanniEvent + +object WorldChangeEvent : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/entity/EntityDisplayNameEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/entity/EntityDisplayNameEvent.kt index c4d24eb0a2c9..fd56f4ec0eea 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/entity/EntityDisplayNameEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/entity/EntityDisplayNameEvent.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.events.entity -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.Entity import net.minecraft.util.ChatComponentText -class EntityDisplayNameEvent(val entity: Entity, var chatComponent: ChatComponentText) : LorenzEvent() +class EntityDisplayNameEvent(val entity: Entity, var chatComponent: ChatComponentText) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/entity/EntityHealthDisplayEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/entity/EntityHealthDisplayEvent.kt index 5657dc2c83da..6194a53c38d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/entity/EntityHealthDisplayEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/entity/EntityHealthDisplayEvent.kt @@ -1,5 +1,5 @@ package at.hannibal2.skyhanni.events.entity -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent -class EntityHealthDisplayEvent(var text: String) : LorenzEvent() +class EntityHealthDisplayEvent(var text: String) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/entity/ItemAddInInventoryEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/entity/ItemAddInInventoryEvent.kt index 6b9747adfd40..2cf2501c0ced 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/entity/ItemAddInInventoryEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/entity/ItemAddInInventoryEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.entity -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.utils.NEUInternalName -class ItemAddInInventoryEvent(val internalName: NEUInternalName, val amount: Int) : LorenzEvent() +class ItemAddInInventoryEvent(val internalName: NEUInternalName, val amount: Int) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptedEvent.kt index 5b894768fb39..1636f9fc3ff3 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptedEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI -class VisitorAcceptedEvent(val visitor: VisitorAPI.Visitor) : LorenzEvent() +class VisitorAcceptedEvent(val visitor: VisitorAPI.Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRefusedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRefusedEvent.kt index 94de16081b04..bcfe5b93d0af 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRefusedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRefusedEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI -class VisitorRefusedEvent(val visitor: VisitorAPI.Visitor) : LorenzEvent() +class VisitorRefusedEvent(val visitor: VisitorAPI.Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/mining/CorpseLootedEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/mining/CorpseLootedEvent.kt index 9e38d8e956d5..3e1008644368 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/mining/CorpseLootedEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/mining/CorpseLootedEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.mining -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.mining.glacitemineshaft.CorpseType -class CorpseLootedEvent(val corpseType: CorpseType, val loot: List>) : LorenzEvent() +class CorpseLootedEvent(val corpseType: CorpseType, val loot: List>) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt index 98b18a83f3ea..9c4a1bd34a4a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt @@ -1,5 +1,5 @@ package at.hannibal2.skyhanni.events.mining -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent class FossilExcavationEvent(val loot: List>) : LorenzEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/player/PlayerDeathEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/player/PlayerDeathEvent.kt index fe9cac685512..c34f6d6c60df 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/player/PlayerDeathEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/player/PlayerDeathEvent.kt @@ -1,9 +1,10 @@ package at.hannibal2.skyhanni.events.player -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.LorenzEvent /** * When the player "you" dies in the game. does not fire when other players die. */ -class PlayerDeathEvent(val name: String, val reason: String, val chatEvent: LorenzChatEvent) : LorenzEvent() +class PlayerDeathEvent(val name: String, val reason: String, val chatEvent: SkyhanniChatEvent) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt index ff951736e764..95f4f73c8c48 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.render -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.entity.Entity import net.minecraftforge.fml.common.eventhandler.Cancelable diff --git a/src/main/java/at/hannibal2/skyhanni/events/render/gui/ReplaceItemEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/render/gui/ReplaceItemEvent.kt index ca2f2efbb6f4..ec3eb1fdf824 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/render/gui/ReplaceItemEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/render/gui/ReplaceItemEvent.kt @@ -1,12 +1,13 @@ package at.hannibal2.skyhanni.events.render.gui +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.events.LorenzEvent import net.minecraft.inventory.IInventory import net.minecraft.inventory.InventoryBasic import net.minecraft.item.ItemStack import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable -class ReplaceItemEvent(val inventory: IInventory, val originalItem: ItemStack, val slot: Int) : LorenzEvent() { +class ReplaceItemEvent(val inventory: IInventory, val originalItem: ItemStack, val slot: Int) : SkyHanniEvent() { var replacement: ItemStack? = null private set @@ -24,7 +25,7 @@ class ReplaceItemEvent(val inventory: IInventory, val originalItem: ItemStack, v ) { val originalItem = inventoryContents.getOrNull(slot) ?: return val event = ReplaceItemEvent(inventory, originalItem, slot) - event.postAndCatch() + event.post() event.replacement?.let { cir.returnValue = it } } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index 39f069771345..0a880b98fdce 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.bingo import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -36,7 +36,7 @@ object CompactBingoChat { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.enabled) return if (!LorenzUtils.isBingoProfile && !config.outsideBingo) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index b476a116001e..8a7dbba93171 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -50,12 +50,12 @@ object MinionCraftHelper { private val alreadyNotified = mutableListOf() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { alreadyNotified.clear() } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.minionCraftHelperEnabled) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt index 98b266053e04..ad743115cfd1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.bingo.card import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoData import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.bingo.BingoCardUpdateEvent import at.hannibal2.skyhanni.events.bingo.BingoGoalReachedEvent import at.hannibal2.skyhanni.features.bingo.BingoAPI @@ -152,7 +152,7 @@ object BingoCardReader { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.enabled) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt index 83b41d3fd759..55d013e65f20 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardTips.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.bingo.card import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.bingo.BingoAPI.getData import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType @@ -42,7 +42,7 @@ object BingoCardTips { ) @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (!inventoryPattern.matches(InventoryUtils.openInventoryName())) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/nextstephelper/BingoNextStepHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/nextstephelper/BingoNextStepHelper.kt index d233387cd2e1..34d5ba0c6206 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/nextstephelper/BingoNextStepHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/nextstephelper/BingoNextStepHelper.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.CollectionAPI import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.SkillExperience -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.bingo.BingoAPI import at.hannibal2.skyhanni.features.bingo.card.nextstephelper.steps.ChatMessageStep import at.hannibal2.skyhanni.features.bingo.card.nextstephelper.steps.CollectionStep @@ -133,7 +133,7 @@ object BingoNextStepHelper { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.enabled) return @@ -149,7 +149,7 @@ object BingoNextStepHelper { private var nextMessageIsCrystal = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.enabled) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt index 846458456ad1..e65b02299e2f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ArachneChatMessageHider.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland @@ -31,7 +31,7 @@ object ArachneChatMessageHider { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (LorenzUtils.skyBlockArea == "Arachne's Sanctuary") return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt index e32769cf615f..5f019792a570 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/ChatFilter.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.HypixelData -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.chat.ChatFilter.messagesMap import at.hannibal2.skyhanni.features.chat.PowderMiningChatFilter.genericMiningRewardMessage import at.hannibal2.skyhanni.features.dungeon.DungeonAPI @@ -511,7 +511,7 @@ object ChatFilter { // @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { var blockReason = block(event.message) if (blockReason == null && config.powderMiningFilter.enabled) blockReason = powderMiningBlock(event) @@ -565,7 +565,7 @@ object ChatFilter { * @return Block reason if applicable * @see block */ - private fun powderMiningBlock(event: LorenzChatEvent): String? { + private fun powderMiningBlock(event: SkyhanniChatEvent): String? { val powderMiningMatchResult = PowderMiningChatFilter.block(event.message) if (powderMiningMatchResult == "no_filter") { genericMiningRewardMessage.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt index 4c75cd7aeb37..ccdfc2ed5dab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactBestiaryChatMessage.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ChatManager -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -26,7 +26,7 @@ object CompactBestiaryChatMessage { private val milestonePattern = "^.+(§8\\d{1,3}➡§e\\d{1,3})$".toRegex() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.chat.compactBestiaryMessage) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt index 8ad277b4a419..b363ff54cc29 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -66,7 +66,7 @@ object CompactExperimentRewards { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled() || lastTimeTableOpened.passedSince() >= 3.seconds || event.blockedReason != "") return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt index 745116d16f44..804519d4a5df 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactSplashPotionMessage.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -29,7 +29,7 @@ object CompactSplashPotionMessage { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!event.message.isPotionMessage()) return event.blockedReason = "compact_potion_effect" diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt index 8a0670e98d8f..e084c7197336 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/RareDropMessages.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.colorCodeToRarity @@ -64,7 +64,7 @@ object RareDropMessages { private val config get() = SkyHanniMod.feature.chat.petRarityDropMessage @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/StashCompact.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/StashCompact.kt index 29a2689287bb..9b3c8a57bb49 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/StashCompact.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/StashCompact.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -69,7 +69,7 @@ object StashCompact { private var lastSentType = "" @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return genericAddedToStashPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt index 6e1b005040ee..af44b8b7e26c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/WatchdogHider.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.chat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ChatManager -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraft.util.IChatComponent @@ -21,7 +21,7 @@ object WatchdogHider { private const val END_LINE = "§c" @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.onHypixel || !SkyHanniMod.feature.chat.filterType.watchDog) return when (event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/translation/Translator.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/translation/Translator.kt index b4e434c1a2d1..433a05c69b14 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/chat/translation/Translator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/chat/translation/Translator.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.SkyHanniMod.Companion.coroutineScope import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.APIUtils import at.hannibal2.skyhanni.utils.ChatUtils @@ -35,7 +35,7 @@ object Translator { // Logic for listening for a user click on a chat message is from NotEnoughUpdates @SubscribeEvent(priority = EventPriority.LOWEST) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/BroodmotherFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/BroodmotherFeatures.kt index d122ba342fee..52738a4dfa5e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/BroodmotherFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/BroodmotherFeatures.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -140,7 +140,7 @@ object BroodmotherFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { broodmotherSpawnTime = SimpleTimeMark.farPast() lastStage = null currentStage = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt index 93f9f0452ffe..862ffd60e22f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt @@ -3,10 +3,10 @@ package at.hannibal2.skyhanni.features.combat import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.combat.FlareConfig import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index 7f5b42e3c538..205106510e5a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -11,11 +11,11 @@ import at.hannibal2.skyhanni.events.DamageIndicatorDeathEvent import at.hannibal2.skyhanni.events.DamageIndicatorDetectedEvent import at.hannibal2.skyhanni.events.DamageIndicatorFinalBossEvent import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.slayer.blaze.HellionShield diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt index 4a0bed69c6a4..c3657135fa12 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt @@ -8,9 +8,9 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent import at.hannibal2.skyhanni.events.SackChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneKillTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneKillTimer.kt index d4980ec506f4..7031f918ba0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneKillTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneKillTimer.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.chat.ArachneChatMessageHider import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -55,7 +55,7 @@ object ArachneKillTimer { private var arachneKillTime = Duration.ZERO @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (arachneCallingSpawnedPattern.matches(event.message) || arachneCrystalSpawnedPattern.matches(event.message)) { arachneSpawnedTime = SimpleTimeMark.now() @@ -80,7 +80,7 @@ object ArachneKillTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { arachneSpawnedTime = SimpleTimeMark.farPast() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt index d2e6f7ed67e5..4d5f4f2f0268 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/ArachneSpawnTimer.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -47,7 +47,7 @@ object ArachneSpawnTimer { private var searchTime = SimpleTimeMark.farPast() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { searchTime = SimpleTimeMark.farPast() lastTickTime = SimpleTimeMark.farPast() particleCounter = 0 @@ -56,7 +56,7 @@ object ArachneSpawnTimer { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (arachneSpawnTime.isInPast()) return val countDown = arachneSpawnTime.timeUntil() @@ -66,7 +66,7 @@ object ArachneSpawnTimer { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.removeColor().lowercase() diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt index 3d5dd3fd75da..04592fe8952f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/AreaMiniBossFeatures.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.SlayerAPI -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor @@ -39,7 +39,7 @@ object AreaMiniBossFeatures { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!SlayerAPI.isInAnyArea) return if (!config.areaBossRespawnTimer) return @@ -60,7 +60,7 @@ object AreaMiniBossFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { miniBossType = null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt index a4c4dcf8d09b..dd6ba85921db 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/mobs/MobHighlight.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.combat.mobs import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha @@ -103,7 +103,7 @@ object MobHighlight { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock || !config.lineToArachne) return val arachne = arachne ?: return @@ -123,7 +123,7 @@ object MobHighlight { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { arachne = null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt index 304ee21f8b53..b762f9206f85 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/ArrowTrail.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.cosmetics import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.EntityUtils @@ -32,7 +32,7 @@ object ArrowTrail { private val listYourArrow: MutableList = LinkedList() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val secondsAlive = config.secondsAlive.toDouble().toDuration(DurationUnit.SECONDS) val time = SimpleTimeMark.now() @@ -52,7 +52,7 @@ object ArrowTrail { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val color = if (config.handlePlayerArrowsDifferently) config.playerArrowColor else config.arrowColor val playerArrowColor = color.toChromaColor() diff --git a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt index 54ef80f77a4d..f0104f1b9f72 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/cosmetics/CosmeticFollowingLine.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.cosmetics import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.enums.OutsideSbFeature -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor @@ -32,12 +32,12 @@ object CosmeticFollowingLine { class LocationSpot(val time: SimpleTimeMark, val onGround: Boolean) @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { locations = emptyMap() } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return updateClose(event) @@ -50,7 +50,7 @@ object CosmeticFollowingLine { } private fun renderFar( - event: LorenzRenderWorldEvent, + event: SkyhanniRenderWorldEvent, firstPerson: Boolean, color: Color, ) { @@ -71,7 +71,7 @@ object CosmeticFollowingLine { } } - private fun updateClose(event: LorenzRenderWorldEvent) { + private fun updateClose(event: SkyhanniRenderWorldEvent) { val playerLocation = event.exactLocation(Minecraft.getMinecraft().thePlayer).up(0.3) latestLocations = latestLocations.editCopy { @@ -81,7 +81,7 @@ object CosmeticFollowingLine { } } - private fun renderClose(event: LorenzRenderWorldEvent, firstPerson: Boolean, color: Color) { + private fun renderClose(event: SkyhanniRenderWorldEvent, firstPerson: Boolean, color: Color) { if (firstPerson && latestLocations.any { !it.value.onGround }) return @@ -100,7 +100,7 @@ object CosmeticFollowingLine { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (event.isMod(5)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index 95c7a3f87487..dca9631359fd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -14,10 +14,10 @@ import at.hannibal2.skyhanni.events.DungeonCompleteEvent import at.hannibal2.skyhanni.events.DungeonEnterEvent import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TablistFooterUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt index 284f8424ffe2..4101d44903ca 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonArchitectFeatures.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.GetFromSackAPI import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacks -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -31,7 +31,7 @@ object DungeonArchitectFeatures { private val architectsFirstDraftItem = "ARCHITECT_FIRST_DRAFT".asInternalName() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return puzzleFailPattern.matchMatcher(event.message) { @@ -44,7 +44,7 @@ object DungeonArchitectFeatures { private val architectsFirstDraft = "ARCHITECT_FIRST_DRAFT".asInternalName().makePrimitiveStack() - private fun generateMessage(name: String, event: LorenzChatEvent) { + private fun generateMessage(name: String, event: SkyhanniChatEvent) { val architectItemAmount = architectsFirstDraftItem.getAmountInSacks() if (architectItemAmount <= 0) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossAPI.kt index d30553a28581..bafd7f036d84 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossAPI.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.events.DungeonBossPhaseChangeEvent import at.hannibal2.skyhanni.events.DungeonCompleteEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI.dungeonFloor import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -156,7 +156,7 @@ object DungeonBossAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { bossPhase = null } @@ -166,7 +166,7 @@ object DungeonBossAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return handlePhaseMessage(event.message) diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt index 62fccecaeb50..1de6bf2668e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonBossMessages.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -45,7 +45,7 @@ object DungeonBossMessages { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!DungeonAPI.inDungeon()) return if (!isBoss(event.message)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt index 6b992e798690..fd42ca0ba6ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonChatFilter.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.chat.ChatConfig -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -199,7 +199,7 @@ object DungeonChatFilter { // @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.onHypixel || config.dungeonFilteredMessageTypes.isEmpty()) return // Workaround since the potion message gets always sent at that moment when SkyBlock is set as false diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index 308a5b14438f..5c3ac5927af8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -5,10 +5,10 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.DamageIndicatorFinalBossEvent import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt index e4bc9b0fc838..260dc42ed241 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCopilot.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.events.DungeonBossRoomEnterEvent import at.hannibal2.skyhanni.events.DungeonEnterEvent import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -46,7 +46,7 @@ object DungeonCopilot { private var searchForKey = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return copilot(event.message)?.let { @@ -140,7 +140,7 @@ object DungeonCopilot { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { changeNextStep("") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt index 7245ab8f58af..ff6a64ba3d93 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonDeathCounter.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -53,7 +53,7 @@ object DungeonDeathCounter { deathPatternsList.any { it.matches(message) } @SubscribeEvent(receiveCanceled = true) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (isDeathMessage(event.message)) { @@ -84,7 +84,7 @@ object DungeonDeathCounter { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { deaths = 0 update() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt index 9151c1d9eee2..b389810222f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index 967af0dd3d4b..f539d76e31da 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.EntityMovementData import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.EntityMoveEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt index ca9dd8c1f6bc..70d27ae23592 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHighlightClickedBlocks.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ClickedBlockType import at.hannibal2.skyhanni.events.DungeonBlockClickEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ExtendedChatColor @@ -55,7 +55,7 @@ object DungeonHighlightClickedBlocks { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (leverPattern.matches(event.message)) { @@ -91,7 +91,7 @@ object DungeonHighlightClickedBlocks { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return blocks.forEach { (position, block) -> diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt index 2a8595af9e8e..e934e0027835 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt @@ -16,8 +16,8 @@ import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzColor.Companion.toLorenzColor import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText -import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.RenderUtils.drawLineToEye +import at.hannibal2.skyhanni.utils.RenderUtils.drawWaypointFilled import at.hannibal2.skyhanni.utils.RenderUtils.exactLocation import net.minecraft.block.BlockStainedGlass import net.minecraft.client.Minecraft diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt index ea65b2e00c2f..83fd7641c37b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMilestonesDisplay.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.DungeonStartEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.renderString @@ -30,7 +30,7 @@ object DungeonMilestonesDisplay { var color = "" @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!event.isMod(5)) return if (currentMilestone >= 3 && timeReached.passedSince() > 3.seconds && display.isNotEmpty()) { display = display.substring(1) @@ -38,7 +38,7 @@ object DungeonMilestonesDisplay { } @SubscribeEvent(receiveCanceled = true) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (milestonePattern.matches(event.message)) { @@ -63,7 +63,7 @@ object DungeonMilestonesDisplay { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { display = "" currentMilestone = 0 } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt index 46450a5645d5..e3106752f71f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.mob.Mob import at.hannibal2.skyhanni.data.mob.MobData import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ConditionalUtils.onToggle diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt index 34d0621cdf96..77e3cf17053a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.DungeonHubRacesJson import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ConditionalUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/floor7/TerminalWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/floor7/TerminalWaypoints.kt index f8479507a402..ff557d5407e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/floor7/TerminalWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/floor7/TerminalWaypoints.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.features.dungeon.floor7 import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.dungeon.DungeonBossAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -22,7 +22,7 @@ object TerminalWaypoints { private val config get() = SkyHanniMod.feature.dungeon @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for (term in TerminalInfo.entries) { @@ -33,12 +33,12 @@ object TerminalWaypoints { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { TerminalInfo.resetTerminals() } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!inBoss()) return val playerName = DungeonBossAPI.goldorTerminalPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt index b1939a793bf3..6d22586ff6bd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/UniqueGiftingOpportunitiesFeatures.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.WinterAPI import at.hannibal2.skyhanni.events.EntityCustomNameUpdateEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.features.event.winter.UniqueGiftCounter import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -101,7 +101,7 @@ object UniqueGiftingOpportunitiesFeatures { !LorenzUtils.noTradeMode && entity.displayName.formattedText.endsWith("♲§r") @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { giftedPattern.matchMatcher(event.message) { addGiftedPlayer(group(1)) UniqueGiftCounter.addUniqueGift() @@ -109,7 +109,7 @@ object UniqueGiftingOpportunitiesFeatures { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { holdingGift = false if (!LorenzUtils.inSkyBlock) return @@ -120,7 +120,7 @@ object UniqueGiftingOpportunitiesFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { holdingGift = false } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/anniversary/Year300RaffleEvent.kt b/src/main/java/at/hannibal2/skyhanni/features/event/anniversary/Year300RaffleEvent.kt index 134e09d09b21..5dcc0a78f28b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/anniversary/Year300RaffleEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/anniversary/Year300RaffleEvent.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.event.anniversary import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUItems import at.hannibal2.skyhanni.utils.RenderUtils.renderSingleLineWithItems @@ -32,7 +32,7 @@ object Year300RaffleEvent { private var overlay: List? = null @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (event.message == "§6§lACTIVE PLAYER! §eYou gained §b+1 Raffle Ticket§e!") { lastTimerReceived = SimpleTimeMark.now() } @@ -50,7 +50,7 @@ object Year300RaffleEvent { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) { overlay = null return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalGoal.kt b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalGoal.kt index beedfd6a5676..11187d0a257e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalGoal.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalGoal.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getLore import at.hannibal2.skyhanni.utils.LorenzUtils @@ -186,7 +186,7 @@ enum class CarnivalGoal( } @SubscribeEvent - fun onLorenzChat(event: LorenzChatEvent) { + fun onLorenzChat(event: SkyhanniChatEvent) { if (!isEnabled()) return entries.firstOrNull { it.chatPattern.matches(event.message) }?.isReached = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalQuickStart.kt b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalQuickStart.kt index fe7a73d09053..57a4471a131b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalQuickStart.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalQuickStart.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.events.EntityClickEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LorenzUtils @@ -53,7 +53,7 @@ object CarnivalQuickStart { } @SubscribeEvent - fun onLorenzChat(event: LorenzChatEvent) { + fun onLorenzChat(event: SkyhanniChatEvent) { if (!isEnabled()) return // IDK what is wrong here, but it does not work with event.message if (!chatPattern.matches((event.chatComponent as? ChatComponentText)?.chatComponentText_TextValue)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalReminder.kt index 024d1446451c..5dd86a3e54ce 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalReminder.kt @@ -6,9 +6,9 @@ import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.data.ProfileStorageData -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -71,7 +71,7 @@ object CarnivalReminder { } @SubscribeEvent - fun onLorenzChat(event: LorenzChatEvent) { + fun onLorenzChat(event: SkyhanniChatEvent) { if (!isEnabled() && !claimedToday) return if (!ticketClaimedPattern.matches(event.message) && !alreadyClaimedPattern.matches(event.message)) return claimedToday = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt index 8a0d4296ff19..7f5b8e4a0517 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/carnival/CarnivalZombieShootout.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.event.carnival import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -68,7 +68,7 @@ object CarnivalZombieShootout { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled() || !started || (!config.coloredHitboxes && !config.coloredLines)) return lamp?.let { @@ -157,7 +157,7 @@ object CarnivalZombieShootout { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.removeColor() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt index 40bc4a97fdff..0e319b17bbb1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/AllBurrowsList.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.BurrowDetectEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy @@ -79,7 +79,7 @@ object AllBurrowsList { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!config.showAll) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt index 4074b465de33..364cef3e2b12 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/BurrowWarpHelper.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.TitleManager import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.sorted @@ -30,7 +30,7 @@ object BurrowWarpHelper { private var lastWarp: WarpPoint? = null @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!DianaAPI.isDoingDiana()) return if (!config.burrowNearestWarp) return @@ -51,7 +51,7 @@ object BurrowWarpHelper { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (event.message == "§cYou haven't unlocked this fast travel destination!") { @@ -68,7 +68,7 @@ object BurrowWarpHelper { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastWarp = null currentWarp = null } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index 3316d966d020..32cd32c9e04f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.BurrowGuessEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt index cd9f48b62c25..19fa80f27dc7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.data.MayorAPI.getElectionYear import at.hannibal2.skyhanni.data.jsonobjects.repo.DianaDropsJson import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.ItemAddEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt index a082dfaac6b0..8f63eb2c134a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowParticleFinder.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.BurrowDetectEvent import at.hannibal2.skyhanni.events.BurrowDugEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -129,7 +129,7 @@ object GriffinBurrowParticleFinder { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { reset() } @@ -139,7 +139,7 @@ object GriffinBurrowParticleFinder { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!config.burrowsSoopyGuess) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt index f5ce6675bb98..69dc57acf4d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinPetWarning.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.BurrowDugEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -20,7 +20,7 @@ object GriffinPetWarning { private var lastWarnTime = SimpleTimeMark.farPast() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!event.isMod(10)) return if (!config.petWarning) return if (!DianaAPI.isDoingDiana()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt index 55e422caba5f..54574c391525 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/MythologicalCreatureTracker.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.MayorAPI.getElectionYear import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut @@ -90,7 +90,7 @@ object MythologicalCreatureTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { for (creatureType in MythologicalCreatureType.entries) { if (!creatureType.pattern.matches(event.message)) continue BurrowAPI.lastBurrowRelatedChatMessage = SimpleTimeMark.now() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt index 477371ec2107..ce55e253fff7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/SoopyGuessBurrow.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.BurrowGuessEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -44,7 +44,7 @@ object SoopyGuessBurrow { private var distance2: Double? = null @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hasDinged = false lastDingPitch = 0f firstPitch = 0f diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt index 23f76c74d29f..f7093ea45392 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsCompactChat.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.features.event.hoppity.HoppityEggsConfig -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.hoppity.EggFoundEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType.BOUGHT import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType.CHOCOLATE_FACTORY_MILESTONE @@ -42,7 +42,7 @@ object HoppityEggsCompactChat { private val config get() = ChocolateFactoryAPI.config private val eventConfig get() = SkyHanniMod.feature.event.hoppityEggs - fun compactChat(event: LorenzChatEvent? = null, lastDuplicateAmount: Long? = null) { + fun compactChat(event: SkyhanniChatEvent? = null, lastDuplicateAmount: Long? = null) { if (!HoppityEggsManager.config.compactChat) return lastDuplicateAmount?.let { this.lastDuplicateAmount = it @@ -153,7 +153,7 @@ object HoppityEggsCompactChat { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return eggFoundPattern.matchMatcher(event.message) { resetCompactData() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt index 8c32e897924b..82980f38a692 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsShared.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.event.hoppity -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggsManager.getEggType import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -28,7 +28,7 @@ object HoppityEggsShared { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return sharedEggPattern.matchMatcher(event.message.removeColor()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/NucleusBarriersBox.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/NucleusBarriersBox.kt index 47ab47a38240..87ec9e2bcf73 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/NucleusBarriersBox.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/NucleusBarriersBox.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.misc.IslandAreas import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzColor @@ -59,12 +59,12 @@ object NucleusBarriersBox { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { inNucleus = IslandAreas.currentAreaName == "Crystal Nucleus" } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return Crystal.entries.forEach { crystal -> diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/WarpMenuUniques.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/WarpMenuUniques.kt index dfd22de9a88f..1d46a21753d1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/WarpMenuUniques.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/WarpMenuUniques.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -30,7 +30,7 @@ object WarpMenuUniques { private val config get() = SkyHanniMod.feature.event.hoppityEggs.warpMenu @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.enabled) return if (!HoppityAPI.isHoppityEvent()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt index e41a61013210..12aba1c90028 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt @@ -7,9 +7,9 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt index be54088714ea..8641a188ca03 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/christmas/PresentWaypoints.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.WinterAPI import at.hannibal2.skyhanni.data.jsonobjects.repo.EventWaypointsJson -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.event.lobby.waypoints.EventWaypoint import at.hannibal2.skyhanni.features.event.lobby.waypoints.loadEventWaypoints @@ -49,13 +49,13 @@ object PresentWaypoints { ) @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!isEnabled()) return closest = null } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return processChatMessage(event.message) } @@ -90,7 +90,7 @@ object PresentWaypoints { // @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled() && config.onlyClosest && HypixelData.locrawData != null && closest == null) return val notFoundPresents = presentSet?.filterNot { it.isFound } if (notFoundPresents?.isEmpty() == true) return @@ -98,13 +98,13 @@ object PresentWaypoints { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return presentSet?.let { event.drawWaypoints(it, config.allWaypoints, LorenzColor.GOLD, "§6") } presentEntranceSet?.let { event.drawWaypoints(it, config.allEntranceWaypoints, LorenzColor.YELLOW, "§e") } } - private fun LorenzRenderWorldEvent.drawWaypoints( + private fun SkyhanniRenderWorldEvent.drawWaypoints( waypoints: Set, shouldDraw: Boolean, color: LorenzColor, prefix: String, ) { if (!shouldDraw) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt index 7f0b208e7976..731096c91658 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.event.lobby.waypoints.easter import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ScoreboardData -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer import at.hannibal2.skyhanni.utils.LorenzColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt index a768055774c7..9806367d2a88 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/halloween/BasketWaypoints.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.ScoreboardData -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer import at.hannibal2.skyhanni.utils.LorenzColor @@ -23,7 +23,7 @@ object BasketWaypoints { private var isHalloween: Boolean = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.allWaypoints && !config.allEntranceWaypoints) return if (!isHalloween) return @@ -58,7 +58,7 @@ object BasketWaypoints { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!isHalloween) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/winter/ReindrakeWarpHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/winter/ReindrakeWarpHelper.kt index 30a1b87e8682..35d11e7201fa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/winter/ReindrakeWarpHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/winter/ReindrakeWarpHelper.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.event.winter import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -28,7 +28,7 @@ object ReindrakeWarpHelper { ) @SubscribeEvent - fun onMessage(event: LorenzChatEvent) { + fun onMessage(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!spawnPattern.matches(event.message)) return ChatUtils.clickToActionOrDisable( diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt index 3eac15fc675f..49099a5283b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ChumBucketHider.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -23,7 +23,7 @@ object ChumBucketHider { private val hiddenEntities = TimeLimitedSet(5.seconds) @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { reset() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt index 89ae7dc18317..3c77ccf0981f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.ItemsJson import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.FishingBobberInLiquidEvent import at.hannibal2.skyhanni.events.ItemInHandChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt index 7d11f91fd7eb..d5d870126070 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingBaitWarnings.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.FishingBobberInLiquidEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI.isBait import at.hannibal2.skyhanni.features.nether.kuudra.KuudraAPI @@ -42,7 +42,7 @@ object FishingBaitWarnings { private val baitEntities = TimeLimitedSet(750.seconds) @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastBait = null wasUsingBait = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt index b4a7e5804b4b..8339e264773f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingHookDisplay.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -23,7 +23,7 @@ object FishingHookDisplay { private val pattern = "§e§l(\\d+(\\.\\d+)?)".toPattern() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { reset() } @@ -33,7 +33,7 @@ object FishingHookDisplay { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (armorStand == null) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index c699191a5e26..a65229ed9d93 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -5,12 +5,12 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.mob.Mob import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.SeaCreatureFishEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyClicked import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/IsFishingDetection.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/IsFishingDetection.kt index 4bd6d170cd6c..efa7d835fc02 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/IsFishingDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/IsFishingDetection.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.events.FishingBobberInLiquidEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LocationUtils @@ -32,7 +32,7 @@ object IsFishingDetection { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (inRodCastArea()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt index 834f0c07f135..29e21dc654e7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureFeatures.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.combat.damageindicator.DamageIndicatorConfig import at.hannibal2.skyhanni.data.mob.Mob -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent import at.hannibal2.skyhanni.events.SeaCreatureFishEvent @@ -88,7 +88,7 @@ object SeaCreatureFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { rareSeaCreatures.clear() entityIds.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt index 504b3ae212bb..32945d846cd3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SeaCreatureManager.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.jsonobjects.repo.SeaCreatureJson -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.SeaCreatureFishEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -40,7 +40,7 @@ object SeaCreatureManager { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (doubleHookPattern.matches(event.message)) { if (SkyHanniMod.feature.fishing.compactDoubleHook) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt index 5904e1d7f61d..2844d72d151b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/SharkFishCounter.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.SeaCreatureFishEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -39,7 +39,7 @@ object SharkFishCounter { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.fishing.sharkFishCounter) return @@ -49,7 +49,7 @@ object SharkFishCounter { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (event.message != "§b§lFISHING FESTIVAL §r§eThe festival has concluded! Time to dry off and repair your rods!") return val count = counter.sum() if (count == 0) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt index c25974292321..6e4e95821422 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ShowFishingItemName.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI.isBait import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConditionalUtils.transformIf @@ -35,7 +35,7 @@ object ShowFishingItemName { ) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return for (entityItem in EntityUtils.getEntitiesNextToPlayer(15.0)) { val itemStack = entityItem.entityItem @@ -62,7 +62,7 @@ object ShowFishingItemName { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((item, text) in itemsOnGround) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt index 3ddb00d37050..bc7476069dcd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/ThunderSparksHighlight.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.fishing import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt import at.hannibal2.skyhanni.utils.EntityUtils @@ -33,7 +33,7 @@ object ThunderSparksHighlight { private val sparks = mutableListOf() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return EntityUtils.getEntities().filter { @@ -42,7 +42,7 @@ object ThunderSparksHighlight { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val special = config.color @@ -64,7 +64,7 @@ object ThunderSparksHighlight { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { sparks.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index a3e86908762f..d3bbd22de153 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -6,9 +6,9 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.FishingProfitItemsJson import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.ItemAddEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt index a5438d720db7..aad2a2bec962 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/OdgerWaypoint.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils @@ -26,14 +26,14 @@ object OdgerWaypoint { private var trophyFishInInventory = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled() || !event.isMod(10)) return trophyFishInInventory = InventoryUtils.getItemsInOwnInventory() .any { it.getItemCategoryOrNull() == ItemCategory.TROPHY_FISH } } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (FishingAPI.holdingLavaRod) return if (!trophyFishInInventory) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt index c52721bdef63..010306f26187 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishFillet.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager.getFilletValue import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -19,7 +19,7 @@ import org.lwjgl.input.Keyboard object TrophyFishFillet { @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (event.slot.inventory.name.contains("Sack")) return val internalName = event.itemStack.getInternalName().asString() diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt index 4a23e84e5d52..37eb6b7fc42d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishMessages.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.fishing.trophyfishing.ChatMessagesConfig.DesignFormat -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.fishing.TrophyFishCaughtEvent import at.hannibal2.skyhanni.features.fishing.trophy.TrophyFishManager.getTooltip import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -31,7 +31,7 @@ object TrophyFishMessages { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return val (displayName, displayRarity) = trophyFishPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index a6331db11af9..d241446e78c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -6,9 +6,9 @@ import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.garden.CropType.Companion.getTurboCrop import at.hannibal2.skyhanni.features.garden.pests.PestAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt index 3c2ca657813d..bf26bc64a32a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenCropMilestoneFix.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter import at.hannibal2.skyhanni.data.GardenCropMilestones.setCounter import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.model.TabWidget -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.features.garden.farming.GardenCropMilestoneDisplay import at.hannibal2.skyhanni.features.garden.pests.PestAPI @@ -50,7 +50,7 @@ object GardenCropMilestoneFix { private val tabListCropProgress = mutableMapOf() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { levelUpPattern.matchMatcher(event.message) { val cropName = group("crop") val crop = CropType.getByNameOrNull(cropName) ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt index 337f64675b66..4def24a6ff6b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenOptimalSpeed.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ConditionalUtils @@ -61,7 +61,7 @@ object GardenOptimalSpeed { private var lastToolSwitch = SimpleTimeMark.farPast() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return currentSpeed = (Minecraft.getMinecraft().thePlayer.capabilities.walkSpeed * 1000).toInt() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt index 373eadfe9463..2a83460df287 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotAPI.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.pests.SprayType import at.hannibal2.skyhanni.features.misc.LockMouseLook import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -251,7 +251,7 @@ object GardenPlotAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return plotSprayedPattern.matchMatcher(event.message) { @@ -315,7 +315,7 @@ object GardenPlotAPI { fun getPlotByID(plotId: Int) = plots.firstOrNull { it.id == plotId } - fun LorenzRenderWorldEvent.renderPlot( + fun SkyhanniRenderWorldEvent.renderPlot( plot: Plot, lineColor: Color, cornerColor: Color, @@ -386,7 +386,7 @@ object GardenPlotAPI { } } - private fun LorenzRenderWorldEvent.tryDraw3DLine( + private fun SkyhanniRenderWorldEvent.tryDraw3DLine( p1: LorenzVec, p2: LorenzVec, color: Color, diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotBorders.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotBorders.kt index 9be28436815d..99c740f7ce39 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotBorders.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenPlotBorders.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.renderPlot import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.distanceSqToPlayer @@ -19,7 +19,7 @@ object GardenPlotBorders { private var showBorders = false @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!isEnabled()) return if (timeLastSaved.passedSince() < 250.milliseconds) return @@ -34,7 +34,7 @@ object GardenPlotBorders { } @SubscribeEvent - fun render(event: LorenzRenderWorldEvent) { + fun render(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!showBorders) return val plot = GardenPlotAPI.getCurrentPlot() ?: getClosestPlot() ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt index 889ed23e6057..7651108e45db 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenWarpCommands.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent import at.hannibal2.skyhanni.features.misc.LockMouseLook import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -54,7 +54,7 @@ object GardenWarpCommands { } @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!GardenAPI.inGarden()) return if (Minecraft.getMinecraft().currentScreen != null) return if (NEUItems.neuHasFocus()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt index d8593047ec26..94c0abdfce02 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/SensitivityReducer.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.HypixelJoinEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.misc.LockMouseLook import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -32,7 +32,7 @@ object SensitivityReducer { private val gameSettings = mc.gameSettings @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) { if (isToggled && lastCheckCooldown.passedSince() > 1.seconds) { lastCheckCooldown = SimpleTimeMark.now() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt index 54e37332a6a1..661827129982 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/ToolTooltipTweaks.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.garden import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.garden.TooltipTweaksConfig.CropTooltipFortuneEntry -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay.getAbilityFortune import at.hannibal2.skyhanni.features.garden.GardenAPI.getCropType import at.hannibal2.skyhanni.features.garden.fortuneguide.FFGuideGUI @@ -35,7 +35,7 @@ object ToolTooltipTweaks { private val statFormatter = DecimalFormat("0.##") @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return val itemStack = event.itemStack diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt index 6059eded9a14..9b55df8dd3df 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/ComposterOverlay.kt @@ -10,10 +10,10 @@ import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.composter.ComposterAPI.getLevel @@ -120,7 +120,7 @@ object ComposterOverlay { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return if (inComposterUpgrades && extraComposterUpgrade != null && System.currentTimeMillis() > lastHovered + 200) { extraComposterUpgrade = null @@ -141,7 +141,7 @@ object ComposterOverlay { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!inComposterUpgrades) return update() for (upgrade in ComposterUpgrade.entries) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt index a4510af8b4e6..c66a65759c91 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/composter/GardenComposterInventoryFeatures.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.garden.composter import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -26,7 +26,7 @@ object GardenComposterInventoryFeatures { private val config get() = GardenAPI.config.composters @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!GardenAPI.inGarden()) return if (!config.upgradePrice) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt index a2e8a859f703..97d8acb78d6e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/FarmingPersonalBestGain.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden.contest -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -48,7 +48,7 @@ object FarmingPersonalBestGain { var crop: String? = null @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return newPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt index 3cbf7d4f89e8..1d509768f0a9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/contest/JacobFarmingContestsInventory.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -181,7 +181,7 @@ object JacobFarmingContestsInventory { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!InventoryUtils.openInventoryName().contains("Your Contests")) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt index 8a21525c1646..4d3c3b897a67 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/ArmorDropTracker.kt @@ -6,10 +6,10 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.ArmorDropInfo import at.hannibal2.skyhanni.data.jsonobjects.repo.ArmorDropsJson import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -68,7 +68,7 @@ object ArmorDropTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { for (dropType in ArmorDropType.entries) { if (dropType.chatMessage == event.message) { addDrop(dropType) diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt index 924ea00f7f8d..bb0563d18757 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/CropSpeedMeter.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -41,7 +41,7 @@ object CropSpeedMeter { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(15)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt index af74da0d7fb5..01badbe9aa7a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/DicerRngDropTracker.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -101,7 +101,7 @@ object DicerRngDropTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return if (!config.hideChat && !config.display) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 640661bd9797..1b441c349744 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -11,9 +11,9 @@ import at.hannibal2.skyhanni.data.jsonobjects.other.EliteWeightsJson import at.hannibal2.skyhanni.data.jsonobjects.other.UpcomingLeaderboardPlayer import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed.getSpeed diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt index 854e409633e3..3a9431aaa7e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenBurrowingSporesNotifier.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden.farming -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -11,7 +11,7 @@ import kotlin.time.Duration.Companion.seconds object GardenBurrowingSporesNotifier { @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return if (!GardenAPI.config.burrowingSporesNotification) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt index ba422d0f2eab..1404327e0fcf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/GardenStartLocation.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.farming import at.hannibal2.skyhanni.config.features.garden.CropStartLocationConfig.CropLocationMode import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.CropClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -68,7 +68,7 @@ object GardenStartLocation { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val crop = GardenAPI.cropInHand ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt index 9bc0fc051f36..a3edb52e89b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/WrongFungiCutterWarning.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.farming import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -21,7 +21,7 @@ object WrongFungiCutterWarning { private var lastPlaySoundTime = 0L @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message if (message == "§eFungi Cutter Mode: §r§cRed Mushrooms") { mode = FungiMode.RED diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneCreator.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneCreator.kt index d9d7a53c9f65..9d84c0ba57a6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneCreator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneCreator.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden.farming.lane import at.hannibal2.skyhanni.events.CropClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneAPI.getValue @@ -106,7 +106,7 @@ object FarmingLaneCreator { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return start?.let { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt index ce4ce6a9f8c9..4dcc0979976d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/lane/FarmingLaneFeatures.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.garden.farming.lane import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.garden.farming.FarmingLaneSwitchEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.farming.lane.FarmingLaneAPI.getValue @@ -62,7 +62,7 @@ object FarmingLaneFeatures { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return if (!config.distanceDisplay && !config.laneSwitchNotification.enabled) return @@ -192,7 +192,7 @@ object FarmingLaneFeatures { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!GardenAPI.inGarden()) return if (!config.cornerWaypoints) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt index f3701c61a5e9..1a220e12022f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/fortuneguide/CaptureFarmingGear.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.data.PetAPI import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.FarmingFortuneDisplay import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -331,7 +331,7 @@ object CaptureFarmingGear { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return val storage = GardenAPI.storage?.fortune ?: return val outdatedItems = outdatedItems ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt index af4e4b31f45a..ed98d68b2c49 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/AnitaExtraFarmingFortune.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.garden.inventory import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.jsonobjects.repo.AnitaUpgradeCostsJson import at.hannibal2.skyhanni.data.jsonobjects.repo.AnitaUpgradePrice -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.indexOfFirst @@ -31,7 +31,7 @@ object AnitaExtraFarmingFortune { private var levelPrice = mapOf() @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!config.extraFarmingFortune) return if (InventoryUtils.openInventoryName() != "Anita") return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenInventoryTooltipOverflow.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenInventoryTooltipOverflow.kt index 0f89f9cf267e..75153509f9b8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenInventoryTooltipOverflow.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenInventoryTooltipOverflow.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.GardenCropMilestones import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils @@ -24,7 +24,7 @@ object GardenInventoryTooltipOverflow { private val config get() = SkyHanniMod.feature.garden.cropMilestones.overflow @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val inventoryName = InventoryUtils.openInventoryName() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenNextPlotPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenNextPlotPrice.kt index 8ee3acedd631..e65d9c23dda1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenNextPlotPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenNextPlotPrice.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden.inventory.plots -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -16,7 +16,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object GardenNextPlotPrice { @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!GardenAPI.inGarden()) return if (!GardenAPI.config.plotPrice) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt index 01e9f87fb4df..0f9decb7e11a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/plots/GardenPlotIcon.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.inventory.plots import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -130,7 +130,7 @@ object GardenPlotIcon { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val plotList = plotList ?: return val list = event.toolTip diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt index 0b16439f3cc8..ba21c6b9f690 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestSpawn.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.garden.pests.PestSpawnConfig import at.hannibal2.skyhanni.config.features.garden.pests.PestSpawnConfig.ChatMessageFormatEntry -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.garden.pests.PestSpawnEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -67,7 +67,7 @@ object PestSpawn { private var plotNames = mutableListOf() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return val message = event.message var blocked = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt index 62301f5d73b9..d7e63dfd82d4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayDisplay.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.currentSpray @@ -28,7 +28,7 @@ object SprayDisplay { private var display: String? = null @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden() || !event.isMod(5, 3)) return if (config.displayEnabled) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt index a87100202ee7..706ef0cd86fc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/SprayFeatures.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI.renderPlot @@ -41,7 +41,7 @@ object SprayFeatures { @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return display = changeMaterialPattern.matchMatcher(event.message) { @@ -69,7 +69,7 @@ object SprayFeatures { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!GardenAPI.inGarden()) return if (!config.drawPlotsBorderWhenInHands) return if (!InventoryUtils.itemInHandId.equals("SPRAYONATOR")) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt index 2075c3a28972..c48b22e5bb0d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/StereoHarmonyDisplay.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.garden.pests import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConditionalUtils @@ -80,7 +80,7 @@ object StereoHarmonyDisplay { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return selectVinylPattern.matchMatcher(event.message) { activeVinyl = VinylType.getByName(group("type")) @@ -106,7 +106,7 @@ object StereoHarmonyDisplay { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { display = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt index 1524084546dd..47d5bd9fa7d9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorCompactChat.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.garden.visitor -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -61,7 +61,7 @@ object GardenVisitorCompactChat { private var rewardsList = mutableListOf() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (GardenAPI.inGarden() && config.compactRewardChat && ( fullyAcceptedPattern.matcher(event.message.removeResets()).matches() || visitorRewardPattern.matcher(event.message.removeResets()).matches() || @@ -72,7 +72,7 @@ object GardenVisitorCompactChat { } } - private fun handleChat(event: LorenzChatEvent) { + private fun handleChat(event: SkyhanniChatEvent) { val transformedMessage = event.message.removeResets() fullyAcceptedPattern.matchMatcher(transformedMessage) { @@ -117,7 +117,7 @@ object GardenVisitorCompactChat { compactChat(event) } - private fun compactChat(event: LorenzChatEvent) { + private fun compactChat(event: SkyhanniChatEvent) { event.blockedReason = "compact_visitor" visitorAcceptedChat.add(event.message) if (visitorAcceptedChat.size == 3) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt index 06b7b3f7ffcd..9af89d13f0b4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/NPCVisitorFix.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorOpenEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -66,7 +66,7 @@ object NPCVisitorFix { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { barnSkinChangePattern.matchMatcher(event.message) { GardenAPI.storage?.npcVisitorLocations?.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt index 56e85b582463..17295e230c39 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorRewardWarning.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI.ACCEPT_SLOT import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI.REFUSE_SLOT @@ -87,7 +87,7 @@ object VisitorRewardWarning { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!GardenAPI.onBarnPlot) return if (!VisitorAPI.inInventory) return val visitor = VisitorAPI.getVisitor(lastClickedNpc) ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt index 4a86519c374e..dbf7318858b2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt @@ -18,9 +18,9 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiPositionMovedEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ConditionalUtils @@ -104,7 +104,7 @@ object CustomScoreboard { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (dirty || nextScoreboardUpdate.isInPast()) { @@ -216,7 +216,7 @@ object CustomScoreboard { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { runDelayed(2.seconds) { if (!LorenzUtils.inSkyBlock || !(LorenzUtils.onHypixel && OutsideSbFeature.CUSTOM_SCOREBOARD.isSelected())) dirty = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/quiver/QuiverWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/quiver/QuiverWarning.kt index 17ab6545d3d2..5eb22c90a61f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/quiver/QuiverWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/quiver/QuiverWarning.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.data.QuiverAPI.amount import at.hannibal2.skyhanni.data.TitleManager import at.hannibal2.skyhanni.events.DungeonCompleteEvent import at.hannibal2.skyhanni.events.KuudraCompleteEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.QuiverUpdateEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.nether.kuudra.KuudraAPI @@ -86,7 +86,7 @@ object QuiverWarning { } @SubscribeEvent - fun onWorldSwitch(event: LorenzWorldChangeEvent) { + fun onWorldSwitch(event: WorldChangeEvent) { arrowsInInstance.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/AuctionOutbidWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/AuctionOutbidWarning.kt index ccc95e36b60c..011dad065b0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/AuctionOutbidWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/AuctionOutbidWarning.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.TitleManager -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SoundUtils @@ -19,7 +19,7 @@ object AuctionOutbidWarning { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.inventory.auctions.auctionOutbid) return if (!outbidPattern.matches(event.message)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt index 8b38238adfdb..e8ef6eacd68c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/BitsPerCookieVisual.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.BitsAPI -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull import at.hannibal2.skyhanni.utils.ItemUtils.name @@ -37,7 +37,7 @@ object BitsPerCookieVisual { private val timePattern by patternGroup.pattern("time", "§5§o§7§b4 §7days:") @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (event.itemStack.getInternalNameOrNull() != boosterCookie) return if (wrongCookiePattern.matches(event.itemStack.name)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt index ba97ce88c089..05b46d3b3426 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ChestValue.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi import at.hannibal2.skyhanni.features.minion.MinionFeatures @@ -69,7 +69,7 @@ object ChestValue { fun featureName() = if (inOwnInventory) "Estimated Inventory Value" else "Estimated Chest Value" @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return val inInv = Minecraft.getMinecraft().currentScreen is GuiInventory diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/FocusMode.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/FocusMode.kt index c02f2993399a..abe9273950ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/FocusMode.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/FocusMode.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyClicked @@ -18,14 +18,14 @@ object FocusMode { private var toggle = true @SubscribeEvent(priority = EventPriority.LOWEST) - fun onLorenzToolTip(event: LorenzToolTipEvent) { + fun onLorenzToolTip(event: SkyhanniToolTipEvent) { if (!isEnabled() || !toggle) return if(event.toolTip.isEmpty()) return event.toolTip = mutableListOf(event.toolTip.first()) } @SubscribeEvent - fun onLorenzTick(event: LorenzTickEvent) { + fun onLorenzTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!config.toggleKey.isKeyClicked()) return toggle = !toggle diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt index 327e38aabea5..823694acd3f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HeldTimeInLore.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrInsert import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -22,7 +22,7 @@ object HeldTimeInLore { private val cacaoTruffle by lazy { "DARK_CACAO_TRUFFLE".asInternalName() } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.timeHeldInLore) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt index 2b298a8031db..bbcc18fe8b8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HighlightBonzoMasks.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.NEUInternalName @@ -60,7 +60,7 @@ object HighlightBonzoMasks { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message.removeColor() // TODO move pattern into enum if (bonzoMaskPattern.matches(message)) { @@ -71,7 +71,7 @@ object HighlightBonzoMasks { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { maskTimers.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/PageScrolling.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/PageScrolling.kt index 023fe057717f..d6ba6e1459e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/PageScrolling.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/PageScrolling.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ToolTipData -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld @@ -52,7 +52,7 @@ object PageScrolling { private var cooldown = SimpleTimeMark.farPast() @SubscribeEvent - fun onLorenzTick(event: LorenzTickEvent) { + fun onLorenzTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (cooldown.isInFuture()) return if (!scroll.isMouseEventValid()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/PowerStoneGuideFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/PowerStoneGuideFeatures.kt index e64e92b67f5f..c22723a3998c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/PowerStoneGuideFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/PowerStoneGuideFeatures.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.nextAfter @@ -65,7 +65,7 @@ object PowerStoneGuideFeatures { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (!inInventory) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt index f1235a968af8..da651a6c0526 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/QuickCraftFeatures.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils @@ -42,7 +42,7 @@ object QuickCraftFeatures { } @SubscribeEvent - fun onToolTip(event: LorenzToolTipEvent) { + fun onToolTip(event: SkyhanniToolTipEvent) { val inventoryType = getInventoryType() ?: return if (inventoryType.ignoreSlot(event.slot.slotNumber)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ReforgeHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ReforgeHelper.kt index 1c098000cce5..ab14cda8d00e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ReforgeHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ReforgeHelper.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.ItemUtils.cleanName @@ -145,7 +145,7 @@ object ReforgeHelper { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return when { reforgeChatMessage.matches(event.message) -> { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt index 35e14f898660..19b95ea30aab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SkyblockGuideHighlightFeature.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -29,7 +29,7 @@ class SkyblockGuideHighlightFeature private constructor( inventory: RepoPattern, loreCondition: RepoPattern, private val onSlotClicked: (GuiContainerEvent.SlotClickEvent) -> Unit = {}, - private val onTooltip: (LorenzToolTipEvent) -> Unit = {}, + private val onTooltip: (SkyhanniToolTipEvent) -> Unit = {}, ) { private val inventoryPattern by inventory @@ -41,7 +41,7 @@ class SkyblockGuideHighlightFeature private constructor( @Language("RegExp") inventory: String, @Language("RegExp") loreCondition: String, onSlotClicked: (GuiContainerEvent.SlotClickEvent) -> Unit = {}, - onTooltip: (LorenzToolTipEvent) -> Unit = {}, + onTooltip: (SkyhanniToolTipEvent) -> Unit = {}, ) : this( config, patternGroup.pattern("$key.$KEY_PREFIX_INVENTORY", inventory), @@ -56,7 +56,7 @@ class SkyblockGuideHighlightFeature private constructor( @Language("RegExp") inventory: String, loreCondition: RepoPattern, onSlotClicked: (GuiContainerEvent.SlotClickEvent) -> Unit = {}, - onTooltip: (LorenzToolTipEvent) -> Unit = {}, + onTooltip: (SkyhanniToolTipEvent) -> Unit = {}, ) : this( config, patternGroup.pattern("$key.$KEY_PREFIX_INVENTORY", inventory), @@ -106,7 +106,7 @@ class SkyblockGuideHighlightFeature private constructor( } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val current = activeObject ?: return if (!missing.contains(event.slot.slotNumber)) return @@ -149,7 +149,7 @@ class SkyblockGuideHighlightFeature private constructor( } } - private val openWikiTooltip: (LorenzToolTipEvent) -> Unit = { event -> + private val openWikiTooltip: (SkyhanniToolTipEvent) -> Unit = { event -> event.toolTip.add("") event.toolTip.add("§7§eClick to view on the SkyBlock Wiki!") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/StockOfStonkFeature.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/StockOfStonkFeature.kt index f905eb5a532c..631f9b9cf22d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/StockOfStonkFeature.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/StockOfStonkFeature.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.transformAt import at.hannibal2.skyhanni.utils.ConditionalUtils.transformIf @@ -68,7 +68,7 @@ object StockOfStonkFeature { } @SubscribeEvent - fun onLorenzToolTip(event: LorenzToolTipEvent) { + fun onLorenzToolTip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (!inInventory) return if (!itemPattern.matches(event.itemStack.displayName)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt index 56b1921f2ed3..64f2c7e7b60f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/SuperCraftFeatures.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.GetFromSackAPI import at.hannibal2.skyhanni.data.SackAPI -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.NEUInternalName @@ -22,7 +22,7 @@ object SuperCraftFeatures { private val config get() = SkyHanniMod.feature.inventory.gfs @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.superCraftGFS) return val (internalName, amount) = craftedPattern.matchMatcher(event.message) { NEUInternalName.fromItemName(group("item")) to (group("amount")?.formatInt() ?: 1) diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt index 8e8bbb595bb7..44d5d17b2b96 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarApi.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.events.BazaarOpenedProductEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -115,7 +115,7 @@ object BazaarApi { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!loadedNpcPriceData) { loadedNpcPriceData = true @@ -147,7 +147,7 @@ object BazaarApi { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!inBazaarInventory) return // TODO USE SH-REPO diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt index dfd7e38f9b85..5e99d076748f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/bazaar/BazaarCancelledBuyOrderClipboard.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.inventory.bazaar import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils @@ -93,7 +93,7 @@ object BazaarCancelledBuyOrderClipboard { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val coins = cancelledMessagePattern.matchMatcher(event.message) { group("coins").formatInt().addSeparators() diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt index 8ce0047d0aec..65d7821c98aa 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryBarnManager.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityAPI import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionData import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats @@ -38,7 +38,7 @@ object ChocolateFactoryBarnManager { private var sentBarnFullWarning = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return HoppityEggsManager.newRabbitFound.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt index 64a99a8c911f..90615d669478 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryDataLoader.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI.specialRabbitTextures import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -134,7 +134,7 @@ object ChocolateFactoryDataLoader { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { clearData() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt index 01b42a130582..0f926dc6eba0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltip.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI.profileStorage import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators @@ -14,7 +14,7 @@ object ChocolateFactoryTooltip { private val config get() = ChocolateFactoryAPI.config @SubscribeEvent(priority = EventPriority.HIGH) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!ChocolateFactoryAPI.inChocolateFactory) return if (!config.extraTooltipStats) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt index 837a0e085bfb..fcc0683bcce5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipCompact.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.getOrNull import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -22,7 +22,7 @@ object ChocolateFactoryTooltipCompact { private var tooltipToHover = listOf() @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!ChocolateFactoryAPI.inChocolateFactory) return if (config.tooltipMove) { @@ -49,7 +49,7 @@ object ChocolateFactoryTooltipCompact { } } - private fun onCompactClick(event: LorenzToolTipEvent) { + private fun onCompactClick(event: SkyhanniToolTipEvent) { if (!config.compactOnClick) return val itemStack = event.itemStack diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipStray.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipStray.kt index d5cfb989d8aa..2870c0fc787d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipStray.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateFactoryTooltipStray.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.NumberUtil.formatLong import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst @@ -24,7 +24,7 @@ object ChocolateFactoryTooltipStray { ) @SubscribeEvent(priority = EventPriority.HIGH) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!ChocolateFactoryAPI.inChocolateFactory) return if (!config.showStrayTime) return if (event.slot.slotNumber > 26 || event.slot.slotNumber == ChocolateFactoryAPI.infoIndex) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt index 13757d1b39ff..c010eebe1624 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/chocolatefactory/ChocolateShopPrice.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.inventory.chocolatefactory import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DisplayTableEntry import at.hannibal2.skyhanni.utils.ItemPriceUtils.getPriceOrNull @@ -178,7 +178,7 @@ object ChocolateShopPrice { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!inInventory) return itemBoughtPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsDryStreakDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsDryStreakDisplay.kt index 50d033842792..b12c5555f761 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsDryStreakDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsDryStreakDisplay.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.inventory.experimentationtable.ExperimentationTableAPI.bookPattern import at.hannibal2.skyhanni.features.inventory.experimentationtable.ExperimentationTableAPI.ultraRarePattern import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -79,7 +79,7 @@ object ExperimentsDryStreakDisplay { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled() || didJustFind) return ExperimentationTableAPI.enchantingExpChatPattern.matchMatcher(event.message.removeColor()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsProfitTracker.kt index 79f0304f433f..0e200eb9a90f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/experimentationtable/ExperimentsProfitTracker.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.ItemAddEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.inventory.experimentationtable.ExperimentationTableAPI.claimMessagePattern import at.hannibal2.skyhanni.features.inventory.experimentationtable.ExperimentationTableAPI.enchantingExpPattern import at.hannibal2.skyhanni.features.inventory.experimentationtable.ExperimentationTableAPI.experienceBottleChatPattern @@ -107,7 +107,7 @@ object ExperimentsProfitTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.removeColor() @@ -128,7 +128,7 @@ object ExperimentsProfitTracker { } } - private fun LorenzChatEvent.handleDrop(reward: String) { + private fun SkyhanniChatEvent.handleDrop(reward: String) { blockedReason = when { enchantingExpPattern.matches(reward) && ExperimentMessages.EXPERIENCE.isSelected() -> "EXPERIENCE_DROP" experienceBottleChatPattern.matches(reward) && ExperimentMessages.BOTTLES.isSelected() -> "BOTTLE_DROP" diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt index 1fead4ea144f..43caf7409d53 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/tiarelay/TiaRelayWaypoints.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.inventory.tiarelay import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils @@ -25,7 +25,7 @@ object TiaRelayWaypoints { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.nextWaypoint) return @@ -44,7 +44,7 @@ object TiaRelayWaypoints { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (config.allWaypoints) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt index 32f0c6d0efcb..375b8ca7e17f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/CustomWardrobe.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI.MAX_PAGES import at.hannibal2.skyhanni.features.inventory.wardrobe.WardrobeAPI.MAX_SLOT_PER_PAGE import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValue @@ -246,7 +246,7 @@ object CustomWardrobe { val mcSlotId = slot.inventorySlots[armorIndex] // if the slot is null, we don't fire LorenzToolTipEvent at all. val mcSlot = InventoryUtils.getSlotAtIndex(mcSlotId) ?: return toolTips - LorenzToolTipEvent(mcSlot, stack, toolTips).postWithoutCatch() + SkyhanniToolTipEvent(mcSlot, stack, toolTips).postWithoutCatch() return toolTips } catch (e: Exception) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/EstimatedWardrobePrice.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/EstimatedWardrobePrice.kt index 82acccf49874..e46343cda3c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/EstimatedWardrobePrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/wardrobe/EstimatedWardrobePrice.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.inventory.wardrobe import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -13,7 +13,7 @@ object EstimatedWardrobePrice { private val config get() = SkyHanniMod.feature.inventory.estimatedItemValues @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val slot = WardrobeAPI.slots.firstOrNull { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt index f315bb17dcc3..2e430eddf8ae 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/ChickenHeadTimer.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.itemabilities import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -28,7 +28,7 @@ object ChickenHeadTimer { private val chickenHead = "CHICKEN_HEAD".asInternalName() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return @@ -36,12 +36,12 @@ object ChickenHeadTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastTime = SimpleTimeMark.now() } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!hasChickenHead) return if (event.message == "§aYou laid an egg!") { diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt index df408133a136..66e52c3bb06d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/CrownOfAvariceCounter.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.itemabilities import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.extraAttributes @@ -31,7 +31,7 @@ object CrownOfAvariceCounter { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { render = check() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt index 5923433d1b36..34bca61463e3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.itemability.FireVeilWandConfig.DisplayEntry import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.nether.ashfang.AshfangFreezeCooldown import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt index 68fc72669070..80477fd88186 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt @@ -9,8 +9,8 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/FlowstateHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/FlowstateHelper.kt index 3ef46c5b6437..8f85efba7e80 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/FlowstateHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/FlowstateHelper.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.data.MiningAPI import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.ItemInHandChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.mining.OreMinedEvent import at.hannibal2.skyhanni.features.mining.FlowstateHelper.blockBreakStreak import at.hannibal2.skyhanni.features.mining.FlowstateHelper.getSpeedBonus @@ -57,7 +57,7 @@ object FlowstateHelper { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!MiningAPI.inCustomMiningIsland()) return attemptClearDisplay() diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt index ae50308e919f..58aa61f3d7ab 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningNotifications.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.data.MiningAPI.inGlaciteArea import at.hannibal2.skyhanni.data.MiningAPI.lastColdReset import at.hannibal2.skyhanni.events.ColdUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -61,7 +61,7 @@ object MiningNotifications { private var hasSentAscensionRope = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inMiningIsland()) return if (!config.enabled) return val message = event.message @@ -92,7 +92,7 @@ object MiningNotifications { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hasSentCold = false hasSentAscensionRope = false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt index e268beb16f94..c5bf1019e2e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/PowderPerHotmPerk.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.mining import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.HotmData -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.KeyboardManager.isKeyHeld import at.hannibal2.skyhanni.utils.LorenzUtils @@ -20,7 +20,7 @@ object PowderPerHotmPerk { private val config get() = SkyHanniMod.feature.mining.hotm @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val itemName = event.itemStack.displayName @@ -32,7 +32,7 @@ object PowderPerHotmPerk { if (config.powderFor10Levels) handlePowderFor10Levels(event, perk) } - private fun handlePowderFor10Levels(event: LorenzToolTipEvent, perk: HotmData) { + private fun handlePowderFor10Levels(event: SkyhanniToolTipEvent, perk: HotmData) { if (!Keyboard.KEY_LSHIFT.isKeyHeld()) return val indexOfCost = event.toolTip.indexOfFirst { HotmData.perkCostPattern.matches(it) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/PrecisionMiningHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/PrecisionMiningHighlight.kt index 462a963489ab..d2f03d6b6907 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/PrecisionMiningHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/PrecisionMiningHighlight.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.mining import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.MiningAPI -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RenderUtils.drawFilledBoundingBox_nea @@ -49,14 +49,14 @@ object PrecisionMiningHighlight { } @SubscribeEvent - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { val particleBoundingBox = lastParticle ?: return event.drawFilledBoundingBox_nea(particleBoundingBox, if (lookingAtParticle) Color.GREEN else Color.CYAN) } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { lastParticle ?: return val deletionTime = deleteTime ?: return if (deletionTime.isInPast()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt index 6e17c300662b..80f073d600f3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsNamesInCore.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.mining.crystalhollows import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayerSqIgnoreY @@ -26,7 +26,7 @@ object CrystalHollowsNamesInCore { private var showWaypoints = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (event.isMod(10)) { @@ -36,7 +36,7 @@ object CrystalHollowsNamesInCore { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (showWaypoints) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsWalls.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsWalls.kt index d89af9024e25..1b80722e6c60 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsWalls.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/crystalhollows/CrystalHollowsWalls.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.mining.crystalhollows import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils.getCorners @@ -68,7 +68,7 @@ object CrystalHollowsWalls { private fun Double.shiftNZ() = this - LorenzVec.expandVector.z * EXPAND_TIMES @SubscribeEvent - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val position = RenderUtils.getViewerPos(event.partialTicks) when { @@ -94,23 +94,23 @@ object CrystalHollowsWalls { } } - private fun drawGoblin(event: LorenzRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { + private fun drawGoblin(event: SkyhanniRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { drawArea(true, false, Area.JUNGLE.color, Area.PRECURSOR.color) } - private fun drawJungle(event: LorenzRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { + private fun drawJungle(event: SkyhanniRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { drawArea(true, true, Area.GOBLIN.color, Area.MITHRIL.color) } - private fun drawPrecursor(event: LorenzRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { + private fun drawPrecursor(event: SkyhanniRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { drawArea(false, false, Area.MITHRIL.color, Area.GOBLIN.color) } - private fun drawMithril(event: LorenzRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { + private fun drawMithril(event: SkyhanniRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { drawArea(false, true, Area.PRECURSOR.color, Area.JUNGLE.color) } - private fun drawHeat(event: LorenzRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { + private fun drawHeat(event: SkyhanniRenderWorldEvent) = RenderUtils.QuadDrawer.draw3D(event.partialTicks) { val heatHeight = HEAT_HEIGHT.shiftNY() draw( LorenzVec(nucleusBB.minX, heatHeight, nucleusBB.minZ), @@ -125,7 +125,7 @@ object CrystalHollowsWalls { drawHeatAreaForHeat(true, true, Area.JUNGLE.color, heatHeight) } - private fun drawNucleus(event: LorenzRenderWorldEvent) { + private fun drawNucleus(event: SkyhanniRenderWorldEvent) { val (southEastCorner, southWestCorner, northWestCorner, northEastCorner) = nucleusBBInflate.getCorners(nucleusBBInflate.minY) val (southEastTopCorner, southWestTopCorner, northWestTopCorner, northEastTopCorner) = nucleusBBInflate.getCorners(nucleusBBInflate.maxY) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt index 0b0469b91675..f6bcdb4bb6f8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/ExcavatorTooltipHider.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.mining.fossilexcavator import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -23,7 +23,7 @@ object ExcavatorTooltipHider { ) @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (event.slot.inventory !is ContainerLocalMenu) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt index 9b7e39b6133e..8ec8682418a7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/FossilExcavatorAPI.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.mining.FossilExcavationEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils @@ -68,7 +68,7 @@ object FossilExcavatorAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { inInventory = false inExcavatorMenu = false } @@ -80,7 +80,7 @@ object FossilExcavatorAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!IslandType.DWARVEN_MINES.isInIsland()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt index f9dd9b8db316..a236c36e919a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt @@ -7,9 +7,9 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.mining.fossilexcavator.FossilExcavatorAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.addAlpha diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseAPI.kt index c8ee81288a79..0dad57205f4c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseAPI.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.mining.glacitemineshaft import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.mining.CorpseLootedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils @@ -44,7 +44,7 @@ object CorpseAPI { private var corpseType: CorpseType? = null @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!IslandType.MINESHAFT.isInIsland()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt index 6ec32fd2e129..f0cdff215fac 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/CorpseLocator.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.data.hypixel.chat.event.PartyChatEvent import at.hannibal2.skyhanni.data.hypixel.chat.event.PlayerAllChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.EntityUtils @@ -84,7 +84,7 @@ object CorpseLocator { @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { sharedWaypoints.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt index 2c05e35251ae..53a955674f52 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/glacitemineshaft/MineshaftWaypoints.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.HypixelCommands import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer @@ -30,7 +30,7 @@ object MineshaftWaypoints { private var timeLastShared = SimpleTimeMark.farPast() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { waypoints.clear() } @@ -58,7 +58,7 @@ object MineshaftWaypoints { } @SubscribeEvent - fun onKeyPress(event: LorenzKeyPressEvent) { + fun onKeyPress(event: KeyPressEvent) { if (Minecraft.getMinecraft().currentScreen != null) return if (event.keyCode != config.shareWaypointLocation) return if (timeLastShared.passedSince() < 500.milliseconds) return @@ -81,7 +81,7 @@ object MineshaftWaypoints { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (waypoints.isEmpty()) return waypoints diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt index 4c27f195a895..2d7c5ae6447f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/powdertracker/PowderTracker.kt @@ -11,8 +11,8 @@ import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.mining.PowderGainEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -170,7 +170,7 @@ object PowderTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val msg = event.message @@ -230,7 +230,7 @@ object PowderTracker { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!isEnabled()) return gemstoneInfo.perHour = 0.0 gemstoneInfo.stoppedChecks = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/AuctionHousePriceComparison.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/AuctionHousePriceComparison.kt index 081af4ea911c..8d88025ad0c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/AuctionHousePriceComparison.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/AuctionHousePriceComparison.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.AuctionsHighlighter import at.hannibal2.skyhanni.features.misc.items.EstimatedItemValueCalculator import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -106,7 +106,7 @@ object AuctionHousePriceComparison { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val diff = slotPriceMap[event.slot.slotIndex] ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt index 096f7eeccd66..a9dcfba745af 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/BetterSignEditing.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.mixins.transformers.AccessorGuiEditSign import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ClipboardUtils @@ -22,7 +22,7 @@ object BetterSignEditing { private var deleteLastClicked = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.onHypixel) return if (!SkyHanniMod.feature.misc.betterSignEditing) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt index b43625ed2769..88a0155b0eb6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CarryTracker.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.CarryTrackerJson import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.entity.slayer.SlayerDeathEvent import at.hannibal2.skyhanni.features.slayer.SlayerType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -94,7 +94,7 @@ object CarryTracker { var lastTradedPlayer = "" @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { tradeCompletedPattern.matchMatcher(event.message) { lastTradedPlayer = group("name").cleanPlayerName() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt index 948ae70e07ae..47f443e54f02 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CollectionTracker.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.CollectionAPI import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.InventoryUtils @@ -186,7 +186,7 @@ object CollectionTracker { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val thePlayer = Minecraft.getMinecraft().thePlayer ?: return thePlayer.worldObj ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CopyPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CopyPlaytime.kt index 347d47667383..595e129d74fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CopyPlaytime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CopyPlaytime.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.misc.limbo.LimboPlaytime import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -17,7 +17,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object CopyPlaytime { @SubscribeEvent(priority = EventPriority.LOWEST) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (InventoryUtils.openInventoryName() != "Detailed /playtime") return if (event.slot.slotNumber != 4) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/CrashOnDeath.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/CrashOnDeath.kt index 33d293e5be1a..8982780a2a93 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/CrashOnDeath.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/CrashOnDeath.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -20,7 +20,7 @@ object CrashOnDeath { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (pattern.matches(event.message)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt index a5b3a97b8b3a..80739f7a0ae4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FixGhostEntities.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils @@ -27,7 +27,7 @@ object FixGhostEntities { private var recentlySpawnedEntities = ArrayDeque() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { recentlyRemovedEntities = ArrayDeque() recentlySpawnedEntities = ArrayDeque() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt index 159383d8a6ac..30304cfa67cd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/GFSPiggyBank.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.GetFromSackAPI -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -37,7 +37,7 @@ object GFSPiggyBank { private val patternList = listOf(crackedPattern, brokePattern) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return patternList.matchMatchers(event.message) { GetFromSackAPI.getFromChatMessageSackItems(ENCHANTED_PORK) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt index 8a47da6f72e5..28d12af95781 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/HideFarEntities.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -19,7 +19,7 @@ object HideFarEntities { private var ignored = emptySet() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val maxAmount = config.maxAmount.coerceAtLeast(1) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt index dfa60478a6c2..c7d4d389facd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/IslandAreas.kt @@ -10,9 +10,9 @@ import at.hannibal2.skyhanni.data.model.TextInput import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.EntityMoveEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString import at.hannibal2.skyhanni.utils.CollectionUtils.sorted @@ -46,7 +46,7 @@ object IslandAreas { private val textInput = TextInput() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { nodes = emptyMap() display = null targetNode = null @@ -83,7 +83,7 @@ object IslandAreas { private var hasMoved = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (!IslandGraphs.existsForThisIsland) return @@ -224,7 +224,7 @@ object IslandAreas { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.inWorld) return for ((node, distance) in nodes) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt index ff5a5f7ac57d..bd92be5f34a4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/JoinCrystalHollows.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -21,7 +21,7 @@ object JoinCrystalHollows { private var lastWrongPassTime = 0L @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message @@ -58,7 +58,7 @@ object JoinCrystalHollows { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!IslandType.DWARVEN_MINES.isInIsland()) return if (!isEnabled()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt index f7d8e20be216..cd7f3a9ac5d3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/LockMouseLook.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.garden.SensitivityReducer import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -21,7 +21,7 @@ object LockMouseLook { private const val lockedPosition = -1F / 3F @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (lockedMouse) toggleLock() val gameSettings = Minecraft.getMinecraft().gameSettings if (gameSettings.mouseSensitivity == lockedPosition) { @@ -31,7 +31,7 @@ object LockMouseLook { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!event.message.startsWith("§aTeleported you to §r§aPlot")) return if (lockedMouse) toggleLock() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt index 0d300bab1e87..13b7c7a3b450 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PatcherSendCoordinates.kt @@ -2,10 +2,10 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.LocationUtils @@ -41,7 +41,7 @@ object PatcherSendCoordinates { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.enabled) return val message = event.message.removeColor() @@ -64,7 +64,7 @@ object PatcherSendCoordinates { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!config.enabled) return for (beacon in patcherBeacon) { @@ -79,7 +79,7 @@ object PatcherSendCoordinates { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!event.isMod(10)) return val location = LocationUtils.playerLocation() @@ -91,7 +91,7 @@ object PatcherSendCoordinates { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { patcherBeacon.clear() logger.log("Reset everything (world change)") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt index 2da2ce052234..6d3ea85e0958 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/PocketSackInASackDisplay.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderItemEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -32,7 +32,7 @@ object PocketSackInASackDisplay { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.replaceLore) return val itemStack = event.itemStack diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt index 95f18c3c3092..6cdaf4e56d09 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/QuickModMenuSwitch.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.data.jsonobjects.repo.ModGuiSwitcherJson -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -42,7 +42,7 @@ object QuickModMenuSwitch { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (event.isMod(5)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ReplaceRomanNumerals.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ReplaceRomanNumerals.kt index 369c6984f5b7..ec131c6a6b7b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ReplaceRomanNumerals.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ReplaceRomanNumerals.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.hypixel.chat.event.SystemMessageEvent import at.hannibal2.skyhanni.events.ChatHoverEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.patternGroup import at.hannibal2.skyhanni.mixins.hooks.GuiChatHook import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -34,7 +34,7 @@ object ReplaceRomanNumerals { // TODO: Remove after pr 1717 is ready and switch to ItemHoverEvent @SubscribeEvent(priority = EventPriority.LOWEST) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return event.toolTip.replaceAll { it.transformLine() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt index 3771771f73f3..bbfd27183c17 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/RestorePieceOfWizardPortalLore.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -24,7 +24,7 @@ object RestorePieceOfWizardPortalLore { ) @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!config.restorePieceOfWizardPortalLore) return val stack = event.itemStack if (stack.getInternalName() != item) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt index 8a309ad0b33b..a73d534b20f1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/SkyBlockKickDuration.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.renderString @@ -25,7 +25,7 @@ object SkyBlockKickDuration { private var hasWarned = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (event.message == "§cYou were kicked while joining that server!") { @@ -46,7 +46,7 @@ object SkyBlockKickDuration { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!isEnabled()) return if (kickMessage) { kickMessage = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderBottleNotification.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderBottleNotification.kt index 681f1a0dde9d..ea84f5fffa5c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderBottleNotification.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/ThunderBottleNotification.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.misc import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches @@ -20,7 +20,7 @@ object ThunderBottleNotification { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (thunderBottleChargedPattern.matches(event.message)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt index 1515ee3dcbd1..3ddc607223b6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/TpsCounter.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -81,7 +81,7 @@ object TpsCounter { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { tpsList.clear() packetsFromLastSecond = 0 ignoreFirstTicks = WAIT_AFTER_WORLD_SWITCH diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt index 63d64bbb01b7..d035c6661dea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/UserLuckBreakdown.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.features.skillprogress.SkillType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -153,7 +153,7 @@ object UserLuckBreakdown { } @SubscribeEvent - fun onHoverItem(event: LorenzToolTipEvent) { + fun onHoverItem(event: SkyhanniToolTipEvent) { if (!config.userluckEnabled) return if (!LorenzUtils.inSkyBlock) return if (skillCalcCoolDown.passedSince() > 3.seconds) { @@ -168,7 +168,7 @@ object UserLuckBreakdown { } } - private fun equipmentMenuTooltip(event: LorenzToolTipEvent, limboLuck: Float) { + private fun equipmentMenuTooltip(event: SkyhanniToolTipEvent, limboLuck: Float) { if (event.slot.slotIndex != 25) return if (limboLuck == 0.0f && !showAllStats) return @@ -181,7 +181,7 @@ object UserLuckBreakdown { event.toolTip.add(lastIndex, "$LUCK_TOOLTIP$luckString") } - private fun statsBreakdownLoreTooltip(event: LorenzToolTipEvent, limboLuck: Float) { + private fun statsBreakdownLoreTooltip(event: SkyhanniToolTipEvent, limboLuck: Float) { if (!inMiscStats) return if (inCustomBreakdown && event.slot.slotIndex == 48) { event.toolTip[1] = "§7To Your Stats Breakdown" @@ -195,7 +195,7 @@ object UserLuckBreakdown { event.toolTip.add("§5§o §a✴ SkyHanni User Luck §f$luckString") } - private fun skyblockMenuTooltip(event: LorenzToolTipEvent, limboLuck: Float) { + private fun skyblockMenuTooltip(event: SkyhanniToolTipEvent, limboLuck: Float) { if (event.slot.slotIndex != 13) return val lastIndex = event.toolTip.indexOfLast { it == "§5§o" } if (lastIndex == -1) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt index 29f20fc050ed..74b55434a227 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt @@ -13,11 +13,11 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.jsonobjects.repo.StackingEnchantData import at.hannibal2.skyhanni.data.jsonobjects.repo.StackingEnchantsJson import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt index 443f5c80b2ff..bdaa3b2c7e9a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboPlaytime.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc.limbo import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils @@ -79,7 +79,7 @@ object LimboPlaytime { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!enabled) return if (!event.slot.inventory.name.startsWith("Detailed /playtime")) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt index 745928cee13c..61cb26525a27 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/massconfiguration/DefaultConfigFeatures.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc.massconfiguration import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigFileType -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import io.github.notenoughupdates.moulconfig.processor.ConfigProcessorDriver @@ -16,7 +16,7 @@ object DefaultConfigFeatures { private var didNotifyOnce = false @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (didNotifyOnce) return Minecraft.getMinecraft().thePlayer ?: return didNotifyOnce = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/pets/CurrentPetDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/pets/CurrentPetDisplay.kt index 6f74f353d46a..362f1d180ddb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/pets/CurrentPetDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/pets/CurrentPetDisplay.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.PetAPI import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getLore @@ -46,7 +46,7 @@ object CurrentPetDisplay { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { findPetInChat(event.message)?.let { PetAPI.currentPet = it if (config.hideAutopet) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/pets/PetExpTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/pets/PetExpTooltip.kt index e5c3179cc4a9..8edfa6cee43d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/pets/PetExpTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/pets/PetExpTooltip.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.misc.pets import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ItemUtils.getItemRarityOrNull @@ -30,7 +30,7 @@ object PetExpTooltip { private const val LEVEL_200_LEGENDARY = 210_255_385 @SubscribeEvent(priority = EventPriority.LOWEST) - fun onItemTooltipLow(event: LorenzToolTipEvent) { + fun onItemTooltipLow(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.petDisplay) return if (!KeyboardManager.isShiftKeyDown() && !config.showAlways) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt index 36c85981420f..9d7b4bb64294 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorTracker.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addAsSingletonList import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy @@ -65,7 +65,7 @@ object TrevorTracker { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { peltsPerSecond.clear() peltsPerHour = 0 stoppedChecks = 0 @@ -81,7 +81,7 @@ object TrevorTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!TrevorFeatures.onFarmingIsland()) return val storage = ProfileStorageData.profileSpecific?.trapperData ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt index 1f9b2e66ffa7..eb7da8eba091 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/update/UpdateManager.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.misc.update import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.About.UpdateStream import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.APIUtils import at.hannibal2.skyhanni.utils.ChatUtils @@ -52,7 +52,7 @@ object UpdateManager { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { Minecraft.getMinecraft().thePlayer ?: return MinecraftForge.EVENT_BUS.unregister(this) if (config.autoUpdates || config.fullAutoUpdates) diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/CrimsonMinibossRespawnTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/CrimsonMinibossRespawnTimer.kt index 3c5325697dbb..3822504999ca 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/CrimsonMinibossRespawnTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/CrimsonMinibossRespawnTimer.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.mob.MobData import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.nether.CrimsonMinibossRespawnTimer.MiniBoss.Companion.isSpawned import at.hannibal2.skyhanni.features.nether.CrimsonMinibossRespawnTimer.MiniBoss.Companion.isSpawningSoon import at.hannibal2.skyhanni.features.nether.CrimsonMinibossRespawnTimer.MiniBoss.Companion.isTimerKnown @@ -59,7 +59,7 @@ object CrimsonMinibossRespawnTimer { private var display: Renderable? = null @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message downPattern.matchMatcher(message) { @@ -175,7 +175,7 @@ object CrimsonMinibossRespawnTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { MiniBoss.entries.forEach { it.nextSpawnTime = null it.possibleSpawnTime = null diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt index eb4962549f70..c91d66ae962c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/PabloHelper.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.nether import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.GetFromSackAPI -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun import at.hannibal2.skyhanni.utils.InventoryUtils @@ -43,7 +43,7 @@ object PabloHelper { private var lastSentMessage = SimpleTimeMark.farPast() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (lastSentMessage.passedSince() < 5.minutes) return val itemName = patterns.matchMatchers(event.message.removeColor()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt index 1cc54772ec6e..807f3cd132e2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/SulphurSkitterBox.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.crimsonisle.SulphurSkitterBoxConfig import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt @@ -32,7 +32,7 @@ object SulphurSkitterBox { private const val RADIUS = 4 @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (event.isMod(5)) { closestBlock = getClosestBlockToPlayer() @@ -56,12 +56,12 @@ object SulphurSkitterBox { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { spongeBlocks = emptyList() } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return closestBlock?.let { if (it.toLorenzVec().distanceToPlayer() >= 50) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt index 07cf723fa6f4..cb1c07addab2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangFreezeCooldown.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.RenderUtils.renderString @@ -26,7 +26,7 @@ object AshfangFreezeCooldown { private val duration = 3.seconds @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (cryogenicBlastPattern.matches(event.message)) unfrozenTime = SimpleTimeMark.now() + duration } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHighlights.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHighlights.kt index 312cfc469cfb..d6682310f002 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHighlights.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangHighlights.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.nether.ashfang import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.events.entity.EntityLeaveWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -55,7 +55,7 @@ object AshfangHighlights { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!AshfangManager.active) return if (config.blazingSouls.enabled) { @@ -78,12 +78,12 @@ object AshfangHighlights { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { blazingSouls.clear() gravityOrbs.clear() } - private fun LorenzRenderWorldEvent.drawBlendedColorString(location: LorenzVec, text: String) { + private fun SkyhanniRenderWorldEvent.drawBlendedColorString(location: LorenzVec, text: String) { val distance = location.distanceToPlayer() if (distance < MAX_DISTANCE) { val colorCode = getColorCode(distance) diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangManager.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangManager.kt index edf7dbd6489d..fa2c68e28b99 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangManager.kt @@ -5,11 +5,10 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.features.crimsonisle.ashfang.AshfangConfig import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.mob.Mob -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule -import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ColorUtils.addAlpha import at.hannibal2.skyhanni.utils.EntityUtils.isAtFullHealth import at.hannibal2.skyhanni.utils.LorenzColor @@ -80,7 +79,7 @@ object AshfangManager { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastSpawnTime = SimpleTimeMark.farPast() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/kuudra/KuudraAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/kuudra/KuudraAPI.kt index f2b1557da326..e8405ba1469e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/kuudra/KuudraAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/kuudra/KuudraAPI.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.nether.kuudra import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.KuudraCompleteEvent import at.hannibal2.skyhanni.events.KuudraEnterEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName @@ -62,25 +62,25 @@ object KuudraAPI { fun inKuudra() = kuudraTier != null @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (kuudraTier != null) return for (line in ScoreboardData.sidebarLinesFormatted) { tierPattern.matchMatcher(line) { val tier = group("tier").toInt() kuudraTier = tier - KuudraEnterEvent(tier).postAndCatch() + KuudraEnterEvent(tier).post() } } } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { kuudraTier = null } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message completePattern.matchMatcher(message) { val tier = kuudraTier ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt index cbb9edd867ed..95584e7cc139 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/CrimsonIsleReputationHelper.kt @@ -8,9 +8,9 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.jsonobjects.repo.CrimsonIsleReputationJson import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.SackChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.DailyQuestHelper import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.QuestLoader import at.hannibal2.skyhanni.features.nether.reputationhelper.kuudra.DailyKuudraBossHelper @@ -95,7 +95,7 @@ class CrimsonIsleReputationHelper(skyHanniMod: SkyHanniMod) { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!IslandType.CRIMSON_ISLE.isInIsland()) return if (!config.enabled.get()) return if (!dirty && display.isEmpty()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt index ef7423990581..735089c36536 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt @@ -8,9 +8,9 @@ import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.features.nether.kuudra.KuudraTier import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/kuudra/DailyKuudraBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/kuudra/DailyKuudraBossHelper.kt index 5d19968cc288..6050fab8a937 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/kuudra/DailyKuudraBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/kuudra/DailyKuudraBossHelper.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.ReputationQuest import at.hannibal2.skyhanni.events.KuudraCompleteEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.nether.kuudra.KuudraTier import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper import at.hannibal2.skyhanni.utils.ChatUtils @@ -28,7 +28,7 @@ class DailyKuudraBossHelper(private val reputationHelper: CrimsonIsleReputationH private val config get() = SkyHanniMod.feature.crimsonIsle.reputationHelper @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!IslandType.CRIMSON_ISLE.isInIsland()) return if (!config.enabled.get()) return if (!reputationHelper.showLocations()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt index e2376ca196dd..c2d277439106 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/miniboss/DailyMiniBossHelper.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.ReputationQuest -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.features.nether.reputationhelper.CrimsonIsleReputationHelper import at.hannibal2.skyhanni.features.nether.reputationhelper.dailyquest.quest.MiniBossQuest @@ -26,7 +26,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel private val config get() = SkyHanniMod.feature.crimsonIsle.reputationHelper @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message @@ -38,7 +38,7 @@ class DailyMiniBossHelper(private val reputationHelper: CrimsonIsleReputationHel } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!reputationHelper.showLocations()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt index 02cd3a24eadb..c660b3ac7a4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/colosseum/BlobbercystsHighlight.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.rift.area.colosseum import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -23,7 +23,7 @@ object BlobbercystsHighlight { private const val BLOBBER_NAME = "Blobbercyst " @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return val color = Color.RED.withAlpha(80) @@ -36,7 +36,7 @@ object BlobbercystsHighlight { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!isEnabled()) return entityList.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt index d601601a10e5..18a06e1bc369 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftAgaricusCap.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.rift.area.dreadfarm import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils @@ -24,7 +24,7 @@ object RiftAgaricusCap { private var location: LorenzVec? = null @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val area = LorenzUtils.skyBlockArea if (area != "West Village" && area != "Dreadfarm") return @@ -60,7 +60,7 @@ object RiftAgaricusCap { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val location = location?.up(0.6) ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt index 4ac014d3abe1..a261d9a8fb9b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/RiftWiltedBerberisHelper.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.rift.area.dreadfarm import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.rift.RiftAPI @@ -43,7 +43,7 @@ object RiftWiltedBerberisHelper { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return @@ -118,7 +118,7 @@ object RiftWiltedBerberisHelper { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!hasFarmingToolInHand) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt index 99c94d63a1df..2c85be148d96 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/VoltHighlighter.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.rift.area.dreadfarm import at.hannibal2.skyhanni.events.EntityEquipmentChangeEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -48,7 +48,7 @@ object VoltHighlighter { } @SubscribeEvent - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { if (!RiftAPI.inRift() || !(config.voltRange || config.voltMoodMeter)) return for (entity in getEntities()) { val state = getVoltState(entity) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/CraftRoomHolographicMob.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/CraftRoomHolographicMob.kt index ab5060be3a2b..a9c06bd3f9a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/CraftRoomHolographicMob.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/CraftRoomHolographicMob.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy @@ -39,7 +39,7 @@ object CraftRoomHolographicMob { ) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return for (entity in entitiesList) { entity.moveTo(entity.position.up(.1), (entity.yaw + 5) % 360) @@ -47,7 +47,7 @@ object CraftRoomHolographicMob { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for (theMob in EntityUtils.getEntitiesNearby(LocationUtils.playerLocation(), 25.0)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt index ec382a5d42ac..ce91fe989cd5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt @@ -5,11 +5,11 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.jsonobjects.repo.DanceRoomInstructionsJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TitleReceivedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt index d61331c23df1..8d59dc0f5876 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftLavaMazeParkour.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -45,7 +45,7 @@ object RiftLavaMazeParkour { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (event.message == "§c§lEEK! THE LAVA OOFED YOU!") { @@ -69,7 +69,7 @@ object RiftLavaMazeParkour { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return parkourHelper?.render(event) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt index 2ff0eac9931d..00cd91e0936d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/RiftUpsideDownParkour.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -45,7 +45,7 @@ object RiftUpsideDownParkour { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (event.message == "§c§lOH NO! THE LAVA OOFED YOU BACK TO THE START!") { @@ -70,7 +70,7 @@ object RiftUpsideDownParkour { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return parkourHelper?.render(event) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index 11de17b148c2..681ac327ff3a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.rift.area.stillgorechateau import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.jsonobjects.repo.RiftEffigiesJson import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.RawScoreboardUpdateEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.events.SecondPassedEvent @@ -48,7 +48,7 @@ object RiftBloodEffigies { ) @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { effigiesTimes = cleanMap() } @@ -126,7 +126,7 @@ object RiftBloodEffigies { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((index, location) in locations.withIndex()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/SplatterHearts.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/SplatterHearts.kt index 940fa4f9db54..3a4c7867c812 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/SplatterHearts.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/SplatterHearts.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.stillgorechateau -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -35,7 +35,7 @@ object SplatterHearts { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (lastHearts.passedSince() > 300.milliseconds) return shownHearts.forEach { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/RiftGunthersRace.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/RiftGunthersRace.kt index 5a3638101a71..1bcba991302b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/RiftGunthersRace.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/RiftGunthersRace.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -60,7 +60,7 @@ object RiftGunthersRace { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { RiftAPI.inRiftRace = false } @@ -92,7 +92,7 @@ object RiftGunthersRace { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return raceStartedPattern.matchMatcher(event.message) { @@ -121,7 +121,7 @@ object RiftGunthersRace { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled() || !RiftAPI.inRiftRace) return parkourHelper?.render(event) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt index aab8c0caff0f..053fd724e076 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminHighlighter.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.rift.area.westvillage import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -35,7 +35,7 @@ object VerminHighlighter { "ewogICJ0aW1lc3RhbXAiIDogMTY1MDU1NjEzMTkxNywKICAicHJvZmlsZUlkIiA6ICI0ODI5MmJkMjI1OTc0YzUwOTZiMTZhNjEyOGFmMzY3NSIsCiAgInByb2ZpbGVOYW1lIiA6ICJLVVJPVE9ZVEIyOCIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS84ZmRmNjJkNGUwM2NhNTk0YzhjZDIxZGQxNzUzMjdmMWNmNzdjNGJjMDU3YTA5NTk2MDNkODNhNjhiYTI3MDA4IgogICAgfQogIH0KfQ==" @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return for (entity in EntityUtils.getEntities()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt index 7a58c5d51113..4033266e9485 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftLarva.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -25,7 +25,7 @@ object RiftLarva { "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTgzYjMwZTlkMTM1YjA1MTkwZWVhMmMzYWM2MWUyYWI1NWEyZDgxZTFhNThkYmIyNjk4M2ExNDA4MjY2NCJ9fX0=" @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return checkHand() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt index 452d3edb0bb7..dae3cd8a7675 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/RiftOdonata.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -27,7 +27,7 @@ object RiftOdonata { private val emptyBottle by lazy { "EMPTY_ODONATA_BOTTLE".asInternalName() } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return checkHand() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt index 540fb3b816ef..529a963ea940 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/wyldwoods/ShyCruxWarnings.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.features.rift.area.wyldwoods import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils @@ -17,7 +17,7 @@ object ShyCruxWarnings { private val shyNames = arrayOf("I'm ugly! :(", "Eek!", "Don't look at me!", "Look away!") @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!RiftAPI.inRift() || !config.shyWarning) return checkForShy() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt index 24b254736e73..218ee9e31e7d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.EnigmaSoulsJson import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.render.gui.ReplaceItemEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.features.rift.area.dreadfarm.WoodenButtonsHelper diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt index a4068438f056..918c6bfd714c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/PunchcardHighlight.kt @@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.EntityClickEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -186,7 +186,7 @@ object PunchcardHighlight { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!IslandType.THE_RIFT.isInIsland()) return if (!listening) return if (playerQueue.isEmpty()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt index 94fbe5c3e3e8..f75ed2693971 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/RiftTimer.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.data.ActionBarStatsData import at.hannibal2.skyhanni.events.ActionBarValueUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.EntityHealthDisplayEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -43,7 +43,7 @@ object RiftTimer { private val changes = mutableMapOf() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { display = emptyList() maxTime = 0.seconds latestTime = 0.seconds @@ -66,7 +66,7 @@ object RiftTimer { // prevents rift time from pausing during Rift Race // (hypixel hides the action bar during the race) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled() || !RiftAPI.inRiftRace) return if (!event.isMod(5)) return val newTime = TimeUtils.getDuration(Minecraft.getMinecraft().thePlayer.experienceLevel.toString() + " s") diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt index 064dbf506ef0..db4c51dffc18 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/RiftMotesOrb.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.rift.everywhere.motes import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -61,7 +61,7 @@ object RiftMotesOrb { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { motesPattern.matchMatcher(event.message) { motesOrbs.minByOrNull { it.location.distanceToPlayer() }?.let { it.pickedUp = true @@ -70,7 +70,7 @@ object RiftMotesOrb { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return motesOrbs = motesOrbs.editCopy { removeIf { System.currentTimeMillis() > it.lastTime + 2000 } } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt index 9cc9e19734b9..2ae910d46fe8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/motes/ShowMotesNpcSellPrice.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.config.features.rift.motes.RiftInventoryValueConfig import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.features.rift.RiftAPI.motesNpcPrice import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -55,14 +55,14 @@ object ShowMotesNpcSellPrice { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isInventoryValueEnabled()) return if (!event.isMod(10, 1)) return processItems() } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isShowPriceEnabled()) return val itemStack = event.itemStack @@ -117,7 +117,7 @@ object ShowMotesNpcSellPrice { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!RiftAPI.inRift()) return burgerPattern.matchMatcher(event.message) { config.burgerStacks = group("amount").toInt() diff --git a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt index e616deda48f3..6fb2be89bc25 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/skillprogress/SkillTooltip.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.skillprogress import at.hannibal2.skyhanni.api.SkillAPI import at.hannibal2.skyhanni.api.SkillAPI.excludedSkills -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemUtils.cleanName @@ -23,7 +23,7 @@ object SkillTooltip { private val customGoalConfig get() = SkillProgress.config.customGoalConfig @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return val inventoryName = InventoryUtils.openInventoryName() val stack = event.itemStack diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt index 20edbf285ba2..567560a6500d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerItemsOnGround.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.SlayerAPI -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -25,7 +25,7 @@ object SlayerItemsOnGround { private var itemsOnGround = TimeLimitedCache(2.seconds) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return for (entityItem in EntityUtils.getEntitiesNextToPlayer(15.0)) { val itemStack = entityItem.entityItem @@ -38,7 +38,7 @@ object SlayerItemsOnGround { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((item, text) in itemsOnGround) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt index 11a335a63afd..772dac9cac58 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerMiniBossFeatures.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -50,12 +50,12 @@ object SlayerMiniBossFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { miniBosses = emptyList() } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!config.slayerMinibossLine) return for (mob in miniBosses) { if (mob.health <= 0) continue diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt index 63c0adbc88a1..fa15806ee4ad 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerProfitTracker.kt @@ -9,7 +9,7 @@ import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.data.jsonobjects.repo.SlayerProfitTrackerItemsJson import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.ItemAddEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.PurseChangeCause import at.hannibal2.skyhanni.events.PurseChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent @@ -116,7 +116,7 @@ object SlayerProfitTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return autoSlayerBankPattern.matchMatcher(event.message) { addSlayerCosts(-group("coins").formatDouble()) diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt index cd6e7b2dbf5b..52f41c6eda9b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/SlayerRngMeterDisplay.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.data.SlayerAPI import at.hannibal2.skyhanni.data.jsonobjects.repo.neu.NeuRNGScore import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.NeuRepositoryReloadEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.SlayerChangeEvent @@ -86,7 +86,7 @@ object SlayerRngMeterDisplay { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (config.hideChat && SlayerAPI.isInCorrectArea) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt index 2f01af9033cc..b6f1b2d26e09 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerDaggerHelper.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.config.features.slayer.blaze.BlazeHellionConfig.Fir import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TitleReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConfigUtils @@ -47,7 +47,7 @@ object BlazeSlayerDaggerHelper { private var lastNearest: HellionShield? = null @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.hideDaggerWarning) return @@ -58,7 +58,7 @@ object BlazeSlayerDaggerHelper { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val player = Minecraft.getMinecraft().thePlayer diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt index 1b54e4fd2e55..226bdcb38e76 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/BlazeSlayerFirePitsWarning.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.slayer.blaze import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.BossHealthChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.features.combat.damageindicator.BossType import at.hannibal2.skyhanni.features.combat.damageindicator.DamageIndicatorManager import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -27,7 +27,7 @@ object BlazeSlayerFirePitsWarning { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(10)) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/FirePillarDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/FirePillarDisplay.kt index 8f0eb3d34519..1fa9e704d319 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/FirePillarDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/FirePillarDisplay.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.features.slayer.blaze import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland @@ -29,7 +29,7 @@ object FirePillarDisplay { private var display = "" @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val seconds = EntityUtils.getEntities() diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShieldHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShieldHelper.kt index 421ffb7253d9..c8653c7f5b9b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShieldHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/blaze/HellionShieldHelper.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.features.slayer.blaze import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha @@ -21,7 +21,7 @@ object HellionShieldHelper { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hellionShieldMobs.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index 9b03ebbeb2f5..789f0f041a8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.editCopy diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt index 9a3c0aa1face..1d66d7af3cb2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.slayer.enderman import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.EntityUtils import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt index a8c42c09c9b3..1c3e7653a6c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningMobManager.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.mob.Mob import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -69,7 +69,7 @@ object SummoningMobManager { ) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock || !config.summonMessages) return if (spawnPattern.matches(event.message)) event.blockedReason = "summoning_soul" diff --git a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt index da3b62cc2d5c..3c2eea5d4b92 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/summonings/SummoningSoulsName.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.features.summonings import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.sorted import at.hannibal2.skyhanni.utils.EntityUtils @@ -35,7 +35,7 @@ object SummoningSoulsName { private val mobsName = TimeLimitedCache(6.minutes) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return // TODO use packets instead of this @@ -78,7 +78,7 @@ object SummoningSoulsName { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((entity, name) in souls) { @@ -88,7 +88,7 @@ object SummoningSoulsName { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { souls.clear() mobsLastLocation.clear() mobsName.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt index ba8efc2b5b07..48afcfb1141f 100644 --- a/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/mixins/hooks/RenderLivingEntityHelper.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.mixins.hooks -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.SkyHanniDebugsAndTests import net.minecraft.entity.EntityLivingBase @@ -15,7 +15,7 @@ object RenderLivingEntityHelper { private val entityNoHurtTimeCondition = mutableMapOf Boolean>() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { entityColorMap.clear() entityColorCondition.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt b/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt index d56bf7a66038..780a05000bc6 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/ParkourWaypointSaver.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.test import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils @@ -26,7 +26,7 @@ object ParkourWaypointSaver { private var parkourHelper: ParkourHelper? = null @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!LorenzUtils.inSkyBlock && !config.parkourOutsideSB) return if (Minecraft.getMinecraft().currentScreen != null) return if (NEUItems.neuHasFocus()) return @@ -69,7 +69,7 @@ object ParkourWaypointSaver { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock && !config.parkourOutsideSB) return if (locations.size > 1) { diff --git a/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt index f8c2029cf90d..9c44c933a4b9 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/ShowItemUuid.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.test import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.SkyBlockItemModifierUtils.getItemUuid import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -11,7 +11,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent object ShowItemUuid { @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!SkyHanniMod.feature.dev.debug.showItemUuid) return event.itemStack.getItemUuid()?.let { event.toolTip.add("§7Item UUID: '$it'") diff --git a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt index ae9b5e45b285..4dde0f259a65 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/SkyHanniDebugsAndTests.kt @@ -11,9 +11,9 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.mining.OreMinedEvent import at.hannibal2.skyhanni.features.garden.GardenNextJacobContest @@ -103,7 +103,7 @@ object SkyHanniDebugsAndTests { private var testLocation: LorenzVec? = null @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { testLocation?.let { event.drawWaypointFilled(it, LorenzColor.WHITE.toColor()) event.drawDynamicText(it, "Test", 1.5) @@ -416,7 +416,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun onShowInternalName(event: LorenzToolTipEvent) { + fun onShowInternalName(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showInternalName) return val itemStack = event.itemStack @@ -426,7 +426,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun showItemRarity(event: LorenzToolTipEvent) { + fun showItemRarity(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showItemRarity) return val itemStack = event.itemStack @@ -436,7 +436,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun showItemCategory(event: LorenzToolTipEvent) { + fun showItemCategory(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showItemCategory) return val itemStack = event.itemStack @@ -446,7 +446,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun onShowNpcPrice(event: LorenzToolTipEvent) { + fun onShowNpcPrice(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showNpcPrice) return val internalName = event.itemStack.getInternalNameOrNull() ?: return @@ -456,7 +456,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun onShowCraftPrice(event: LorenzToolTipEvent) { + fun onShowCraftPrice(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showCraftPrice) return val price = event.itemStack.getInternalNameOrNull()?.getRawCraftCostOrNull() ?: return @@ -465,7 +465,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun onShowBzPrice(event: LorenzToolTipEvent) { + fun onShowBzPrice(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showBZPrice) return val internalName = event.itemStack.getInternalNameOrNull() ?: return @@ -479,7 +479,7 @@ object SkyHanniDebugsAndTests { } @SubscribeEvent - fun onShowItemName(event: LorenzToolTipEvent) { + fun onShowItemName(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!debugConfig.showItemName) return val itemStack = event.itemStack @@ -494,7 +494,7 @@ object SkyHanniDebugsAndTests { @SubscribeEvent @Suppress("EmptyFunctionBlock") - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { } @SubscribeEvent diff --git a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt index b599fcc90f7c..7e34cc6f5905 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BlockClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ClipboardUtils @@ -66,13 +66,13 @@ object WorldEdit { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { leftPos = null rightPos = null } @SubscribeEvent - fun onRenderWorldLast(event: LorenzRenderWorldEvent) { + fun onRenderWorldLast(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return leftPos?.let { l -> diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt index fbb28b2724b1..9eedc0f02abe 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TestChatCommand.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.test.command import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzChatEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.OSUtils import at.hannibal2.skyhanni.utils.StringUtils.stripHypixelMessage @@ -61,7 +61,7 @@ object TestChatCommand { private fun test(componentText: IChatComponent, isHidden: Boolean) { val message = componentText.formattedText.stripHypixelMessage() - val event = LorenzChatEvent(message, componentText) + val event = SkyhanniChatEvent(message, componentText) event.postAndCatch() if (isHidden) return diff --git a/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditor.kt b/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditor.kt index af5a1ea3c7d9..1f44996730e6 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditor.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditor.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.data.model.GraphNode import at.hannibal2.skyhanni.data.model.GraphNodeTag import at.hannibal2.skyhanni.data.model.TextInput import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.ChatUtils @@ -96,14 +96,14 @@ object GraphEditor { private val edgeSelectedColor = LorenzColor.DARK_RED.addOpacity(150) @SubscribeEvent(priority = EventPriority.HIGHEST) - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return nodes.forEach { event.drawNode(it) } edges.forEach { event.drawEdge(it) } drawGhostPosition(event) } - private fun drawGhostPosition(event: LorenzRenderWorldEvent) { + private fun drawGhostPosition(event: SkyhanniRenderWorldEvent) { val ghostPosition = ghostPosition ?: return if (ghostPosition.distanceToPlayer() >= config.maxNodeDistance) return @@ -185,14 +185,14 @@ object GraphEditor { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return input() if (nodes.isEmpty()) return closestNode = nodes.minBy { it.position.distanceSqToPlayer() } } - private fun LorenzRenderWorldEvent.drawNode(node: GraphingNode) { + private fun SkyhanniRenderWorldEvent.drawNode(node: GraphingNode) { if (node.position.distanceToPlayer() > config.maxNodeDistance) return this.drawWaypointFilled( node.position, @@ -229,7 +229,7 @@ object GraphEditor { ) } - private fun LorenzRenderWorldEvent.drawEdge(edge: GraphingEdge) { + private fun SkyhanniRenderWorldEvent.drawEdge(edge: GraphingEdge) { if (edge.node1.position.distanceToPlayer() > config.maxNodeDistance) return this.draw3DLine_nea( edge.node1.position.add(0.5, 0.5, 0.5), diff --git a/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditorBugFinder.kt b/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditorBugFinder.kt index ca65ae87f113..e05f1caf8e9d 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditorBugFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/graph/GraphEditorBugFinder.kt @@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.data.IslandGraphs.pathFind import at.hannibal2.skyhanni.data.model.GraphNode -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.misc.IslandAreas.getAreaTag import at.hannibal2.skyhanni.features.misc.pathfind.NavigationHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -99,7 +99,7 @@ object GraphEditorBugFinder { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((node, text) in errorsInWorld) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt index 2187ab9a9c59..4b3db019d3a0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ChatUtils.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ConfigUtils.jumpToEditor import at.hannibal2.skyhanni.utils.StringUtils.removeColor @@ -247,7 +247,7 @@ object ChatUtils { (lastMessageSent + sendQueue.size * messageDelay).takeIf { !it.isInPast() } ?: SimpleTimeMark.now() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val player = Minecraft.getMinecraft().thePlayer if (player == null) { sendQueue.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt index 3467366c96e0..6902f9aac534 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.enums.OutsideSbFeature -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.RenderEntityOutlineEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.mixins.transformers.CustomRenderGlobal import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager diff --git a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt index f56ba4f0b331..143cc57bf5ef 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/KeyboardManager.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.events.GuiKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import io.github.notenoughupdates.moulconfig.gui.GuiScreenElementWrapper @@ -59,7 +59,7 @@ object KeyboardManager { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val currentScreen = Minecraft.getMinecraft().currentScreen val isConfigScreen = currentScreen is GuiScreenElementWrapper if (isConfigScreen) return @@ -68,21 +68,21 @@ object KeyboardManager { if (Mouse.getEventButtonState() && Mouse.getEventButton() != -1) { val key = Mouse.getEventButton() - 100 - LorenzKeyPressEvent(key).postAndCatch() + KeyPressEvent(key).postAndCatch() lastClickedMouseButton = key return } if (Keyboard.getEventKeyState() && Keyboard.getEventKey() != 0) { val key = Keyboard.getEventKey() - LorenzKeyPressEvent(key).postAndCatch() + KeyPressEvent(key).postAndCatch() lastClickedMouseButton = -1 return } if (Mouse.getEventButton() == -1 && lastClickedMouseButton != -1) { if (lastClickedMouseButton.isKeyHeld()) { - LorenzKeyPressEvent(lastClickedMouseButton).postAndCatch() + KeyPressEvent(lastClickedMouseButton).postAndCatch() return } lastClickedMouseButton = -1 @@ -90,7 +90,7 @@ object KeyboardManager { // This is needed because of other keyboards that don't have a key code for the key, but is read as a character if (Keyboard.getEventKey() == 0) { - LorenzKeyPressEvent(Keyboard.getEventCharacter().code + 256).postAndCatch() + KeyPressEvent(Keyboard.getEventCharacter().code + 256).postAndCatch() } } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index f6d52b7fc593..6f3a3f76c279 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -2,7 +2,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourShortCut -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.toSingletonListOrEmpty import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer @@ -42,7 +42,7 @@ class ParkourHelper( visible = false } - fun render(event: LorenzRenderWorldEvent) { + fun render(event: SkyhanniRenderWorldEvent) { if (locations.isEmpty()) { ErrorManager.logErrorWithData( IllegalArgumentException("locations is empty"), diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt index 224d9269e1bb..a8edfa61d3cc 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.data.GuiEditManager.getAbsY import at.hannibal2.skyhanni.data.model.Graph import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiRenderItemEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.RenderGuiItemOverlayEvent import at.hannibal2.skyhanni.features.misc.PatcherFixes import at.hannibal2.skyhanni.features.misc.RoundedRectangleOutlineShader @@ -147,7 +147,7 @@ object RenderUtils { GlStateManager.enableLighting() } - fun LorenzRenderWorldEvent.drawColor( + fun SkyhanniRenderWorldEvent.drawColor( location: LorenzVec, color: LorenzColor, beacon: Boolean = false, @@ -156,7 +156,7 @@ object RenderUtils { drawColor(location, color.toColor(), beacon, alpha) } - fun LorenzRenderWorldEvent.drawColor( + fun SkyhanniRenderWorldEvent.drawColor( location: LorenzVec, color: Color, beacon: Boolean = false, @@ -313,7 +313,7 @@ object RenderUtils { tessellator.draw() } - fun LorenzRenderWorldEvent.drawWaypointFilled( + fun SkyhanniRenderWorldEvent.drawWaypointFilled( location: LorenzVec, color: Color, seeThroughBlocks: Boolean = false, @@ -356,7 +356,7 @@ object RenderUtils { } } - fun LorenzRenderWorldEvent.drawString( + fun SkyhanniRenderWorldEvent.drawString( location: LorenzVec, text: String, seeThroughBlocks: Boolean = false, @@ -768,7 +768,7 @@ object RenderUtils { GlStateManager.popMatrix() } - fun LorenzRenderWorldEvent.drawCylinderInWorld( + fun SkyhanniRenderWorldEvent.drawCylinderInWorld( color: Color, location: LorenzVec, radius: Float, @@ -823,7 +823,7 @@ object RenderUtils { GlStateManager.popMatrix() } - fun LorenzRenderWorldEvent.drawSphereInWorld( + fun SkyhanniRenderWorldEvent.drawSphereInWorld( color: Color, location: LorenzVec, radius: Float, @@ -831,7 +831,7 @@ object RenderUtils { drawSphereInWorld(color, location.x, location.y, location.z, radius) } - fun LorenzRenderWorldEvent.drawSphereInWorld( + fun SkyhanniRenderWorldEvent.drawSphereInWorld( color: Color, x: Double, y: Double, @@ -895,7 +895,7 @@ object RenderUtils { GlStateManager.popMatrix() } - fun LorenzRenderWorldEvent.drawSphereWireframeInWorld( + fun SkyhanniRenderWorldEvent.drawSphereWireframeInWorld( color: Color, location: LorenzVec, radius: Float, @@ -903,7 +903,7 @@ object RenderUtils { drawSphereWireframeInWorld(color, location.x, location.y, location.z, radius) } - fun LorenzRenderWorldEvent.drawSphereWireframeInWorld( + fun SkyhanniRenderWorldEvent.drawSphereWireframeInWorld( color: Color, x: Double, y: Double, @@ -991,7 +991,7 @@ object RenderUtils { TextRenderUtils.drawStringScaled(str, fr, x, y, shadow, color, factor) } - fun LorenzRenderWorldEvent.drawDynamicText( + fun SkyhanniRenderWorldEvent.drawDynamicText( location: LorenzVec, text: String, scaleMultiplier: Double, @@ -1095,26 +1095,26 @@ object RenderUtils { } } - fun LorenzRenderWorldEvent.draw3DLine(p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) = + fun SkyhanniRenderWorldEvent.draw3DLine(p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) = LineDrawer.draw3D(partialTicks) { draw3DLine(p1, p2, color, lineWidth, depth) } - fun LorenzRenderWorldEvent.exactLocation(entity: Entity) = exactLocation(entity, partialTicks) + fun SkyhanniRenderWorldEvent.exactLocation(entity: Entity) = exactLocation(entity, partialTicks) - fun LorenzRenderWorldEvent.exactPlayerEyeLocation(): LorenzVec { + fun SkyhanniRenderWorldEvent.exactPlayerEyeLocation(): LorenzVec { val player = Minecraft.getMinecraft().thePlayer val add = if (player.isSneaking) LorenzVec(0.0, 1.54, 0.0) else LorenzVec(0.0, 1.62, 0.0) PatcherFixes.onPlayerEyeLine() return exactLocation(player) + add } - fun LorenzRenderWorldEvent.exactPlayerEyeLocation(player: Entity): LorenzVec { + fun SkyhanniRenderWorldEvent.exactPlayerEyeLocation(player: Entity): LorenzVec { val add = if (player.isSneaking) LorenzVec(0.0, 1.54, 0.0) else LorenzVec(0.0, 1.62, 0.0) return exactLocation(player) + add } - fun LorenzRenderWorldEvent.drawLineToEye(location: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) { + fun SkyhanniRenderWorldEvent.drawLineToEye(location: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) { draw3DLine(exactPlayerEyeLocation(), location, color, lineWidth, depth) } @@ -1192,7 +1192,7 @@ object RenderUtils { } // TODO nea please merge with 'drawFilledBoundingBox' - fun LorenzRenderWorldEvent.drawFilledBoundingBox_nea( + fun SkyhanniRenderWorldEvent.drawFilledBoundingBox_nea( aabb: AxisAlignedBB, c: Color, alphaMultiplier: Float = 1f, @@ -1291,7 +1291,7 @@ object RenderUtils { ) } - fun LorenzRenderWorldEvent.draw3DPathWithWaypoint( + fun SkyhanniRenderWorldEvent.draw3DPathWithWaypoint( path: Graph, colorLine: Color, lineWidth: Int, @@ -1600,7 +1600,7 @@ object RenderUtils { GlStateManager.disableBlend() } - fun LorenzRenderWorldEvent.outlineTopFace( + fun SkyhanniRenderWorldEvent.outlineTopFace( boundingBox: AxisAlignedBB, lineWidth: Int, color: Color, @@ -1614,7 +1614,7 @@ object RenderUtils { } // TODO nea please merge with 'draw3DLine' - fun LorenzRenderWorldEvent.draw3DLine_nea( + fun SkyhanniRenderWorldEvent.draw3DLine_nea( p1: LorenzVec, p2: LorenzVec, color: Color, @@ -1658,7 +1658,7 @@ object RenderUtils { GlStateManager.enableCull() } - fun LorenzRenderWorldEvent.drawHitbox( + fun SkyhanniRenderWorldEvent.drawHitbox( boundingBox: AxisAlignedBB, lineWidth: Int, color: Color, diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt index 9a081749425d..3479aa57bd09 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/TabListData.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.model.TabWidget -import at.hannibal2.skyhanni.events.LorenzTickEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.events.TablistFooterUpdateEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent @@ -126,7 +126,7 @@ object TabListData { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!dirty) return dirty = false From 31653e3f6a0a3a578f919811af109e857e624434 Mon Sep 17 00:00:00 2001 From: nopo Date: Thu, 17 Oct 2024 22:11:01 +1100 Subject: [PATCH 02/37] Changes by Cal --- .../hannibal2/skyhanni/api/GetFromSackAPI.kt | 12 +++++----- .../skyhanni/data/EntityMovementData.kt | 6 ++--- .../at/hannibal2/skyhanni/data/GuiData.kt | 4 ++-- .../at/hannibal2/skyhanni/data/HotmData.kt | 4 ++-- .../at/hannibal2/skyhanni/data/HypixelData.kt | 12 +++++----- .../hannibal2/skyhanni/data/IslandGraphs.kt | 12 +++++----- .../hannibal2/skyhanni/data/ItemAddManager.kt | 4 ++-- .../at/hannibal2/skyhanni/data/MaxwellAPI.kt | 4 ++-- .../at/hannibal2/skyhanni/data/MayorAPI.kt | 4 ++-- .../hannibal2/skyhanni/data/MinecraftData.kt | 12 +++++----- .../at/hannibal2/skyhanni/data/MiningAPI.kt | 12 +++++----- .../skyhanni/data/OwnInventoryData.kt | 12 +++++----- .../skyhanni/data/mob/LineToMobHandler.kt | 4 ++-- .../hannibal2/skyhanni/data/mob/MobDebug.kt | 8 +++---- .../skyhanni/data/mob/MobDetection.kt | 4 ++-- .../skyhanni/events/GuiContainerEvent.kt | 1 - .../skyhanni/events/GuiKeyPressEvent.kt | 5 ++--- .../events/MessageSendToServerEvent.kt | 5 ++--- .../events/RenderBlockInWorldEvent.kt | 2 +- .../garden/visitor/VisitorAcceptEvent.kt | 4 ++-- .../garden/visitor/VisitorArrivalEvent.kt | 4 ++-- .../events/garden/visitor/VisitorLeftEvent.kt | 4 ++-- .../events/garden/visitor/VisitorOpenEvent.kt | 4 ++-- .../garden/visitor/VisitorRenderEvent.kt | 6 ++--- .../events/mining/FossilExcavationEvent.kt | 2 +- .../events/render/EntityRenderLayersEvent.kt | 2 +- .../skyhanni/features/combat/FlareDisplay.kt | 6 ++--- .../damageindicator/DamageIndicatorManager.kt | 8 +++---- .../endernodetracker/EnderNodeTracker.kt | 2 +- .../combat/ghostcounter/GhostCounter.kt | 8 +++---- .../features/commands/PartyCommands.kt | 4 ++-- .../features/commands/TransferCooldown.kt | 4 ++-- .../skyhanni/features/dungeon/DungeonAPI.kt | 6 ++--- .../features/dungeon/DungeonCleanEnd.kt | 4 ++-- .../features/dungeon/DungeonFinderFeatures.kt | 2 +- .../features/dungeon/DungeonHideItems.kt | 2 +- .../features/dungeon/DungeonLividFinder.kt | 12 +++++----- .../features/dungeon/DungeonMobManager.kt | 4 ++-- .../features/dungeon/DungeonsRaceGuide.kt | 2 +- .../features/event/diana/DianaFixChat.kt | 2 +- .../event/diana/DianaProfitTracker.kt | 4 ++-- .../event/diana/GriffinBurrowHelper.kt | 14 ++++++------ .../event/diana/InquisitorWaypointShare.kt | 12 +++++----- .../features/event/hoppity/HoppityAPI.kt | 4 ++-- .../event/hoppity/HoppityCallWarning.kt | 10 ++++----- .../event/hoppity/HoppityEggLocations.kt | 4 ++-- .../event/hoppity/HoppityEggLocator.kt | 20 ++++++++--------- .../event/hoppity/HoppityEggsManager.kt | 10 ++++----- .../features/event/hoppity/HoppityNpc.kt | 4 ++-- .../frozentreasure/FrozenTreasureTracker.kt | 4 ++-- .../waypoints/easter/EasterEggWaypoints.kt | 4 ++-- .../features/event/winter/JyrreTimer.kt | 4 ++-- .../event/winter/NewYearCakeReminder.kt | 4 ++-- .../skyhanni/features/fame/UpgradeReminder.kt | 4 ++-- .../skyhanni/features/fishing/FishingAPI.kt | 4 ++-- .../skyhanni/features/fishing/FishingTimer.kt | 6 ++--- .../features/fishing/TotemOfCorruption.kt | 8 +++---- .../fishing/tracker/FishingProfitTracker.kt | 4 ++-- .../features/fishing/trophy/GeyserFishing.kt | 8 +++---- .../fishing/trophy/GoldenFishTimer.kt | 16 +++++++------- .../features/garden/FarmingFortuneDisplay.kt | 4 ++-- .../skyhanni/features/garden/GardenAPI.kt | 8 +++---- .../features/garden/GardenLevelDisplay.kt | 8 +++---- .../garden/farming/FarmingWeightDisplay.kt | 4 ++-- .../inventory/GardenCropMilestoneInventory.kt | 4 ++-- .../skyhanni/features/garden/pests/PestAPI.kt | 12 +++++----- .../features/garden/pests/PestFinder.kt | 14 ++++++------ .../features/garden/pests/PestParticleLine.kt | 8 +++---- .../garden/pests/PestParticleWaypoint.kt | 12 +++++----- .../garden/pests/PestProfitTracker.kt | 4 ++-- .../visitor/GardenVisitorDropStatistics.kt | 4 ++-- .../garden/visitor/GardenVisitorFeatures.kt | 8 +++---- .../garden/visitor/GardenVisitorTimer.kt | 4 ++-- .../garden/visitor/VisitorListener.kt | 4 ++-- .../features/inventory/HarpFeatures.kt | 4 ++-- .../inventory/HideNotClickableItems.kt | 4 ++-- .../features/inventory/ItemPickupLog.kt | 8 +++---- .../skyhanni/features/inventory/ItemStars.kt | 4 ++-- .../inventory/PersonalCompactorOverlay.kt | 4 ++-- .../itemabilities/FireVeilWandParticles.kt | 2 +- .../abilitycooldown/ItemAbilityCooldown.kt | 12 +++++----- .../features/mining/DeepCavernsGuide.kt | 2 +- .../features/mining/GoldenGoblinHighlight.kt | 4 ++-- .../features/mining/KingTalismanHelper.kt | 4 ++-- .../features/mining/MineshaftPityDisplay.kt | 4 ++-- .../mining/MiningCommissionsBlocksColor.kt | 12 +++++----- .../skyhanni/features/mining/TunnelsMaps.kt | 22 +++++++++---------- .../mining/eventtracker/MiningEventTracker.kt | 8 +++---- .../solver/FossilSolverDisplay.kt | 4 ++-- .../features/minion/InfernoMinionFeatures.kt | 4 ++-- .../features/minion/MinionFeatures.kt | 18 +++++++-------- .../skyhanni/features/minion/MinionXp.kt | 6 ++--- .../features/misc/MarkedPlayerManager.kt | 4 ++-- .../features/misc/NonGodPotEffectDisplay.kt | 8 +++---- .../misc/discordrpc/DiscordRPCManager.kt | 6 ++--- .../features/misc/limbo/LimboTimeTracker.kt | 12 +++++----- .../features/misc/trevor/TrevorFeatures.kt | 20 ++++++++--------- .../features/nether/MatriarchHelper.kt | 4 ++-- .../dailyquest/DailyQuestHelper.kt | 6 ++--- .../area/dreadfarm/WoodenButtonsHelper.kt | 16 +++++++------- .../livingcave/LivingCaveDefenseBlocks.kt | 4 ++-- .../livingcave/LivingCaveLivingMetalHelper.kt | 4 ++-- .../rift/area/mirrorverse/DanceRoomHelper.kt | 4 ++-- .../rift/area/mirrorverse/TubulatorParkour.kt | 4 ++-- .../rift/area/westvillage/VerminTracker.kt | 4 ++-- .../area/westvillage/kloon/KloonHacking.kt | 12 +++++----- .../rift/everywhere/EnigmaSoulWaypoints.kt | 4 ++-- .../skyhanni/features/slayer/HideMobNames.kt | 4 ++-- .../features/slayer/VampireSlayerFeatures.kt | 12 +++++----- .../slayer/enderman/EndermanSlayerFeatures.kt | 10 ++++----- .../enderman/EndermanSlayerHideParticles.kt | 2 +- .../test/command/TrackParticlesCommand.kt | 8 +++---- .../test/command/TrackSoundsCommand.kt | 8 +++---- .../skyhanni/utils/EntityOutlineRenderer.kt | 2 +- 114 files changed, 373 insertions(+), 376 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index 4d7662b4f452..ee0641ddc3f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.SackAPI import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.commands.tabcomplete.GetFromSacksTabComplete import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -87,7 +87,7 @@ object GetFromSackAPI { private fun addToInventory(items: List, slotId: Int) = inventoryMap.put(slotId, items) @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (queue.isNotEmpty() && lastTimeOfCommand.passedSince() >= minimumDelay) { val item = queue.poll() @@ -112,7 +112,7 @@ object GetFromSackAPI { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return val list = inventoryMap[event.slot.slotIndex] ?: return event.toolTip.let { tip -> @@ -202,7 +202,7 @@ object GetFromSackAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.bazaarGFS || LorenzUtils.noTradeMode) return val stack = lastItemStack ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt index a5e3803b9361..5885a6524507 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt @@ -82,7 +82,7 @@ object EntityMovementData { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return addToTrack(Minecraft.getMinecraft().thePlayer) @@ -100,7 +100,7 @@ object EntityMovementData { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!warpingPattern.matches(event.message)) return DelayedRun.runNextTick { @@ -109,7 +109,7 @@ object EntityMovementData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { entityLocation.clear() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt index 688f8cc18c08..1f9d332fe38b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.NEURenderEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.features.inventory.wardrobe.CustomWardrobeKeybinds import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -69,7 +69,7 @@ object GuiData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { preDrawEventCancelled = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index 3137458c3bec..5d9b94e6737c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -10,9 +10,9 @@ import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardPattern import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -728,7 +728,7 @@ enum class HotmData( } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (resetChatPattern.matches(event.message)) { resetTree() diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 3707d10af0a7..28824cbaae26 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -7,12 +7,12 @@ import at.hannibal2.skyhanni.data.model.TabWidget import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.HypixelJoinEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.events.skyblock.ScoreboardAreaChangeEvent import at.hannibal2.skyhanni.features.bingo.BingoAPI @@ -289,7 +289,7 @@ object HypixelData { private var loggerIslandChange = LorenzLogger("debug/island_change") @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { locrawData = null skyBlock = false inLimbo = false @@ -320,7 +320,7 @@ object HypixelData { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.onHypixel) return val message = event.message.removeColor().lowercase() @@ -352,7 +352,7 @@ object HypixelData { // TODO rewrite everything in here @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) { checkNEULocraw() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt index 386fb8bbf489..32a795626c74 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt @@ -7,10 +7,10 @@ import at.hannibal2.skyhanni.data.model.GraphNode import at.hannibal2.skyhanni.data.repo.RepoUtils import at.hannibal2.skyhanni.events.EntityMoveEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.skyblock.ScoreboardAreaChangeEvent import at.hannibal2.skyhanni.features.misc.IslandAreas import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -152,7 +152,7 @@ object IslandGraphs { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { currentIslandGraph = null if (currentTarget != null) { "§e[SkyHanni] Navigation stopped because of world switch!".asComponent().send(PATHFIND_ID) @@ -225,7 +225,7 @@ object IslandGraphs { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (event.isMod(2)) { handleTick() @@ -474,7 +474,7 @@ object IslandGraphs { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return val path = fastestPath ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt index 4906f5f80623..409094fb5577 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.ItemAddEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SackChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent import at.hannibal2.skyhanni.features.inventory.SuperCraftFeatures.craftedPattern import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -92,7 +92,7 @@ object ItemAddManager { private var superCraftedItems = TimeLimitedSet(30.seconds) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (diceRollChatPattern.matches(event.message)) { lastDiceRoll = SimpleTimeMark.now() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt index 776a7c808103..6ae287ee27f0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.data.jsonobjects.repo.MaxwellPowersJson import at.hannibal2.skyhanni.events.InventoryOpenEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.gui.customscoreboard.CustomScoreboard import at.hannibal2.skyhanni.features.gui.customscoreboard.ScoreboardElement @@ -129,7 +129,7 @@ object MaxwellAPI { fun isThaumaturgyInventory(inventoryName: String) = thaumaturgyGuiPattern.matches(inventoryName) @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt index 949e33146ce6..a6cc5805b47f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt @@ -12,8 +12,8 @@ import at.hannibal2.skyhanni.data.jsonobjects.other.MayorJson import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.APIUtils @@ -149,7 +149,7 @@ object MayorAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (electionOverPattern.matches(event.message)) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt index 02768fc3d4bf..0b923cd55858 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt @@ -2,10 +2,10 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.ItemInHandChangeEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun @@ -42,7 +42,7 @@ object MinecraftData { @SubscribeEvent fun onWorldChange(event: WorldEvent.Load) { - LorenzWorldChangeEvent().postAndCatch() + WorldChangeEvent().postAndCatch() } @HandleEvent(receiveCancelled = true, onlyOnSkyblock = true) @@ -73,11 +73,11 @@ object MinecraftData { DelayedRun.checkRuns() totalTicks++ - LorenzTickEvent(totalTicks).postAndCatch() + SkyhanniTickEvent(totalTicks).postAndCatch() } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return val hand = InventoryUtils.getItemInHand() val newItem = hand?.getInternalName() ?: NEUInternalName.NONE @@ -95,7 +95,7 @@ object MinecraftData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { InventoryUtils.itemInHandId = NEUInternalName.NONE InventoryUtils.recentItemsInHand.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt index 54d186ae52c3..b021a4b0af3a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt @@ -5,12 +5,12 @@ import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.ColdUpdateEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.mining.OreMinedEvent import at.hannibal2.skyhanni.events.player.PlayerDeathEvent import at.hannibal2.skyhanni.events.skyblock.ScoreboardAreaChangeEvent @@ -172,7 +172,7 @@ object MiningAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!inColdIsland()) return if (coldResetPattern.matches(event.message)) { updateCold(0) @@ -286,7 +286,7 @@ object MiningAPI { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!inCustomMiningIsland()) return if (currentAreaOreBlocks.isEmpty()) return @@ -334,7 +334,7 @@ object MiningAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (cold != 0) updateCold(0) lastColdReset = SimpleTimeMark.now() recentClickedBlocks.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt index 0b4abf42586f..b025f6be0816 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt @@ -3,10 +3,10 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.entity.ItemAddInInventoryEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent @@ -70,7 +70,7 @@ object OwnInventoryData { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (itemAmounts.isEmpty()) { itemAmounts = getCurrentItems() @@ -96,7 +96,7 @@ object OwnInventoryData { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { itemAmounts = emptyMap() } @@ -162,7 +162,7 @@ object OwnInventoryData { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { sackToInventoryChatPattern.matchMatcher(event.message) { val name = group("name") ignoreItem(500.milliseconds) { it.itemName.contains(name) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt index 26313efba7a3..cbd61ffc55f4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt @@ -1,7 +1,7 @@ package at.hannibal2.skyhanni.data.mob -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils @@ -31,7 +31,7 @@ object LineToMobHandler { } @SubscribeEvent - fun onLorenzRenderWorld(event: LorenzRenderWorldEvent) { + fun onLorenzRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (lines.isEmpty()) return RenderUtils.LineDrawer.draw3D(event.partialTicks) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt index d9cb34ed25d7..c5aac7206940 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.data.mob import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.dev.DebugMobConfig.HowToShow -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand.getMobInfo import at.hannibal2.skyhanni.utils.LocationUtils.getTopCenter @@ -32,13 +32,13 @@ object MobDebug { private fun Mob.isNotInvisible() = !this.isInvisible() || (config.showInvisible && this == lastRayHit) - private fun MobData.MobSet.highlight(event: LorenzRenderWorldEvent, color: (Mob) -> (LorenzColor)) { + private fun MobData.MobSet.highlight(event: SkyhanniRenderWorldEvent, color: (Mob) -> (LorenzColor)) { for (mob in filter { it.isNotInvisible() }) { event.drawFilledBoundingBox_nea(mob.boundingBox.expandBlock(), color.invoke(mob).toColor(), 0.3f) } } - private fun MobData.MobSet.showName(event: LorenzRenderWorldEvent) { + private fun MobData.MobSet.showName(event: SkyhanniRenderWorldEvent) { val map = filter { it.canBeSeen() && it.isNotInvisible() } .map { it.boundingBox.getTopCenter() to it.name } for ((location, text) in map) { @@ -47,7 +47,7 @@ object MobDebug { } @SubscribeEvent - fun onWorldRenderDebug(event: LorenzRenderWorldEvent) { + fun onWorldRenderDebug(event: SkyhanniRenderWorldEvent) { if (config.showRayHit || config.showInvisible) { lastRayHit = MobUtils.rayTraceForMobs(Minecraft.getMinecraft().thePlayer, event.partialTicks) ?.firstOrNull { it.canBeSeen() && (!config.showInvisible || !it.isInvisible()) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt index dbfbfe533d4b..40b9b0dea46b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.data.mob.MobFilter.isRealPlayer import at.hannibal2.skyhanni.data.mob.MobFilter.isSkyBlockMob import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -102,7 +102,7 @@ object MobDetection { ) || this.extraEntities.any { it.worldObj != world } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (shouldClear.get()) { // Needs to work outside skyblock since it needs clearing when leaving skyblock and joining limbo mobDetectionReset() shouldClear.set(false) diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt index 63e1a0827703..ebe606e6b2e1 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiContainerEvent.kt @@ -7,7 +7,6 @@ import net.minecraft.client.gui.inventory.GuiContainer import net.minecraft.inventory.Container import net.minecraft.inventory.Slot import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.Cancelable abstract class GuiContainerEvent(open val gui: GuiContainer, open val container: Container) : SkyHanniEvent() { diff --git a/src/main/java/at/hannibal2/skyhanni/events/GuiKeyPressEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/GuiKeyPressEvent.kt index 4cfd1dfd913c..8601e9189d1a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/GuiKeyPressEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/GuiKeyPressEvent.kt @@ -1,7 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import net.minecraft.client.gui.inventory.GuiContainer -import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable -class GuiKeyPressEvent(val guiContainer: GuiContainer) : LorenzEvent() +class GuiKeyPressEvent(val guiContainer: GuiContainer) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/MessageSendToServerEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/MessageSendToServerEvent.kt index 6aa07cb54ca0..82cbcfed1a6a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/MessageSendToServerEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/MessageSendToServerEvent.kt @@ -1,11 +1,10 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import at.hannibal2.skyhanni.utils.system.ModInstance -import net.minecraftforge.fml.common.eventhandler.Cancelable -@Cancelable class MessageSendToServerEvent( val message: String, val splitMessage: List, val originatingModContainer: ModInstance? -) : LorenzEvent() +) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt index abc3fade2b8e..098466791d47 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/RenderBlockInWorldEvent.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import net.minecraft.block.state.IBlockState import net.minecraft.util.BlockPos import net.minecraft.world.IBlockAccess -import net.minecraftforge.fml.common.eventhandler.Cancelable data class RenderBlockInWorldEvent(@JvmField var state: IBlockState?, var world: IBlockAccess, var pos: BlockPos?) : CancellableSkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptEvent.kt index 41a429cfd372..250d103423cb 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorAcceptEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI -class VisitorAcceptEvent(val visitor: VisitorAPI.Visitor) : LorenzEvent() +class VisitorAcceptEvent(val visitor: VisitorAPI.Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorArrivalEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorArrivalEvent.kt index f26dbb971275..1d5135d1c53e 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorArrivalEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorArrivalEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI.Visitor -class VisitorArrivalEvent(val visitor: Visitor) : LorenzEvent() +class VisitorArrivalEvent(val visitor: Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorLeftEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorLeftEvent.kt index f5673decd0e4..127d518277fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorLeftEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorLeftEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI -class VisitorLeftEvent(val visitor: VisitorAPI.Visitor) : LorenzEvent() +class VisitorLeftEvent(val visitor: VisitorAPI.Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorOpenEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorOpenEvent.kt index c2e7a40b0c3d..f86b388f1e99 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorOpenEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorOpenEvent.kt @@ -1,6 +1,6 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI -class VisitorOpenEvent(val visitor: VisitorAPI.Visitor) : LorenzEvent() +class VisitorOpenEvent(val visitor: VisitorAPI.Visitor) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRenderEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRenderEvent.kt index 9282d3e04fe6..777acb7e689d 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRenderEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/garden/visitor/VisitorRenderEvent.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.events.garden.visitor -import at.hannibal2.skyhanni.events.LorenzEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.api.event.SkyHanniEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI import at.hannibal2.skyhanni.utils.LorenzVec -class VisitorRenderEvent(val visitor: VisitorAPI.Visitor, val location: LorenzVec, val parent: LorenzRenderWorldEvent) : LorenzEvent() +class VisitorRenderEvent(val visitor: VisitorAPI.Visitor, val location: LorenzVec, val parent: SkyhanniRenderWorldEvent) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt index 9c4a1bd34a4a..df827e7df169 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/mining/FossilExcavationEvent.kt @@ -2,4 +2,4 @@ package at.hannibal2.skyhanni.events.mining import at.hannibal2.skyhanni.api.event.SkyHanniEvent -class FossilExcavationEvent(val loot: List>) : LorenzEvent() +class FossilExcavationEvent(val loot: List>) : SkyHanniEvent() diff --git a/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt index 95f4f73c8c48..e9b402d3ee9a 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/render/EntityRenderLayersEvent.kt @@ -6,7 +6,7 @@ import net.minecraftforge.fml.common.eventhandler.Cancelable open class EntityRenderLayersEvent( val entity: T, -) : LorenzEvent() { +) : SkyHanniEvent() { @Cancelable class Pre( diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt index 862ffd60e22f..9f181a110f0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/FlareDisplay.kt @@ -61,7 +61,7 @@ object FlareDisplay { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (config.displayType == FlareConfig.DisplayType.GUI) return @@ -141,13 +141,13 @@ object FlareDisplay { flares.any { it.entity.entityId == entity.entityId } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { flares.clear() display = emptyList() } @SubscribeEvent - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (config.outlineType == FlareConfig.OutlineType.NONE) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt index 205106510e5a..930361f6f11d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt @@ -117,18 +117,18 @@ object DamageIndicatorManager { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { mobFinder = MobFinder() data = emptyMap() } @SubscribeEvent(receiveCanceled = true) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { mobFinder?.handleChat(event.message) } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return GlStateManager.disableDepth() @@ -327,7 +327,7 @@ object DamageIndicatorManager { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return data = data.editCopy { EntityUtils.getEntities() diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt index c3657135fa12..b94d375a5ff7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/endernodetracker/EnderNodeTracker.kt @@ -88,7 +88,7 @@ object EnderNodeTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!ProfileStorageData.loaded) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt index fe14093ef9d7..af814c552859 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/ghostcounter/GhostCounter.kt @@ -10,11 +10,11 @@ import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PurseChangeCause import at.hannibal2.skyhanni.events.PurseChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostData.Option import at.hannibal2.skyhanni.features.combat.ghostcounter.GhostData.Option.KILLS @@ -346,7 +346,7 @@ object GhostCounter { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { inMist = IslandAreas.currentAreaName == "The Mist" } @@ -418,7 +418,7 @@ object GhostCounter { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return for (opt in Option.entries) { val pattern = opt.pattern ?: continue diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt index 3cbd43a785a2..8f3c3e151aa2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/PartyCommands.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.PartyAPI import at.hannibal2.skyhanni.data.PartyAPI.partyLeader import at.hannibal2.skyhanni.data.PartyAPI.transferVoluntaryPattern -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.misc.limbo.LimboTimeTracker import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -124,7 +124,7 @@ object PartyCommands { } @SubscribeEvent(priority = EventPriority.LOW) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.reversePT.clickable) return if (!transferVoluntaryPattern.matches(event.message.trimWhiteSpace().removeColor())) return if (partyLeader != LorenzUtils.getPlayerName()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/commands/TransferCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/commands/TransferCooldown.kt index 2a9c70cd9233..9d56f5d830df 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/commands/TransferCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/commands/TransferCooldown.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.commands import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.DelayedRun @@ -20,7 +20,7 @@ object TransferCooldown { private var action: (() -> Unit)? = null @SubscribeEvent - fun onWorldLoad(event: LorenzWorldChangeEvent) { + fun onWorldLoad(event: WorldChangeEvent) { if (!config.transferCooldown || lastRunCompleted.isInFuture()) return lastRunCompleted = DelayedRun.runDelayed(3.seconds) { if (config.transferCooldownMessage && LorenzUtils.inSkyBlock) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt index dca9631359fd..00da74438d1f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonAPI.kt @@ -173,7 +173,7 @@ object DungeonAPI { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (dungeonFloor == null) { ScoreboardData.sidebarLinesFormatted.matchFirst(floorPattern) { val floor = group("floor") @@ -216,7 +216,7 @@ object DungeonAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { dungeonFloor = null started = false inBossRoom = false @@ -228,7 +228,7 @@ object DungeonAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val floor = dungeonFloor ?: return if (event.message == "§e[NPC] §bMort§f: §rHere, I found this map when I first entered the dungeon.") { started = true diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt index 5c3ac5927af8..ec368df9738a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonCleanEnd.kt @@ -39,7 +39,7 @@ object DungeonCleanEnd { private var lastBossId: Int = -1 @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!DungeonAPI.inDungeon()) return if (!config.enabled) return @@ -60,7 +60,7 @@ object DungeonCleanEnd { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { bossDone = false chestsSpawned = false lastBossId = -1 diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt index b389810222f1..6cd8ae91d023 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonFinderFeatures.kt @@ -304,7 +304,7 @@ object DungeonFinderFeatures { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (!inInventory) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt index f539d76e31da..51a269fbdf42 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonHideItems.kt @@ -214,7 +214,7 @@ object DungeonHideItems { } ?: false @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hideParticles.clear() movingSkeletonSkulls.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt index e934e0027835..1e7a48c74830 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonLividFinder.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.dungeon import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.CheckRenderEntityEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -40,7 +40,7 @@ object DungeonLividFinder { private var color: LorenzColor? = null @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!inDungeon()) return val isCurrentlyBlind = isCurrentlyBlind() @@ -128,7 +128,7 @@ object DungeonLividFinder { } else false @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!inDungeon()) return if (!config.enabled) return @@ -146,7 +146,7 @@ object DungeonLividFinder { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lividEntity = null gotBlinded = false } diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt index e3106752f71f..2fec5de650e6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonMobManager.kt @@ -74,13 +74,13 @@ object DungeonMobManager { } @SubscribeEvent - fun onLorenzTick(event: LorenzTickEvent) { + fun onLorenzTick(event: SkyhanniTickEvent) { if (!IslandType.CATACOMBS.isInIsland()) return handleInvisibleStar() } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!fel.highlight.get()) return if (fel.line) { felOnTheGround.filter { it.canBeSeen() }.forEach { diff --git a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt index 77e3cf17053a..22dad65d81e0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/dungeon/DungeonsRaceGuide.kt @@ -80,7 +80,7 @@ object DungeonsRaceGuide { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (currentRace == null) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt index 32cd32c9e04f..d954ed367ab2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaFixChat.kt @@ -141,7 +141,7 @@ object DianaFixChat { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { successfulCounter = 0 } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt index 19fa80f27dc7..36a07539f68b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/DianaProfitTracker.kt @@ -124,7 +124,7 @@ object DianaProfitTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { val message = event.message if (chatDugOutPattern.matches(message)) { BurrowAPI.lastBurrowRelatedChatMessage = SimpleTimeMark.now() @@ -147,7 +147,7 @@ object DianaProfitTracker { } } - private fun tryHide(event: LorenzChatEvent) { + private fun tryHide(event: SkyhanniChatEvent) { if (SkyHanniMod.feature.chat.filterType.diana) { event.blockedReason = "diana_chain_or_drops" } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index 64b33c93418f..5035596e7c4d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -13,10 +13,10 @@ import at.hannibal2.skyhanni.events.BurrowDugEvent import at.hannibal2.skyhanni.events.BurrowGuessEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.EntityMoveEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.event.diana.DianaAPI.isDianaSpade import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils.getBlockAt @@ -189,7 +189,7 @@ object GriffinBurrowHelper { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (event.message.startsWith("§c ☠ §r§7You were killed by §r")) { particleBurrows = particleBurrows.editCopy { keys.removeIf { this[it] == BurrowType.MOB } } @@ -214,7 +214,7 @@ object GriffinBurrowHelper { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { resetAllData() } @@ -265,7 +265,7 @@ object GriffinBurrowHelper { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return showTestLocations(event) @@ -347,7 +347,7 @@ object GriffinBurrowHelper { } } - private fun showTestLocations(event: LorenzRenderWorldEvent) { + private fun showTestLocations(event: SkyhanniRenderWorldEvent) { if (!testGriffinSpots) return for (location in testList) { event.drawColor(location, LorenzColor.WHITE) diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt index 96f18ecd8ab4..3ebd09c63610 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/InquisitorWaypointShare.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.diana.InquisitorFoundEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -113,7 +113,7 @@ object InquisitorWaypointShare { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { waypoints = emptyMap() inquisitorsNearby = emptyList() } @@ -145,7 +145,7 @@ object InquisitorWaypointShare { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message @@ -189,7 +189,7 @@ object InquisitorWaypointShare { } @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!isEnabled()) return if (Minecraft.getMinecraft().currentScreen != null) return if (event.keyCode == config.keyBindShare) sendInquisitor() diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt index 8d3ac22c3e76..8098b25d6074 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityAPI.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.hoppity.EggFoundEvent import at.hannibal2.skyhanni.events.hoppity.RabbitFoundEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityEggType.CHOCOLATE_FACTORY_MILESTONE @@ -166,7 +166,7 @@ object HoppityAPI { } @SubscribeEvent(priority = EventPriority.HIGH) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return eggFoundPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCallWarning.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCallWarning.kt index 7881af19d3cb..a9336ebe5b67 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCallWarning.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityCallWarning.kt @@ -3,10 +3,10 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.data.PurseAPI import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -81,7 +81,7 @@ object HoppityCallWarning { private var commandSentTimer = SimpleTimeMark.farPast() @SubscribeEvent - fun onKeyPress(event: LorenzKeyPressEvent) { + fun onKeyPress(event: KeyPressEvent) { if (config.acceptHotkey == Keyboard.KEY_NONE || config.acceptHotkey != event.keyCode) return acceptUUID?.let { HypixelCommands.callback(acceptUUID!!) @@ -100,7 +100,7 @@ object HoppityCallWarning { } @SubscribeEvent(priority = EventPriority.HIGHEST) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (callRingPattern.matches(event.message) && acceptUUID == null) readPickupUuid(event) if (!isEnabled()) return if (initHoppityCallPattern.matches(event.message)) startWarningUser() @@ -159,7 +159,7 @@ object HoppityCallWarning { ) } - private fun readPickupUuid(event: LorenzChatEvent) { + private fun readPickupUuid(event: SkyhanniChatEvent) { val siblings = event.chatComponent.siblings.takeIf { it.size >= 3 } ?: return val clickEvent = siblings[2]?.chatStyle?.chatClickEvent ?: return if (clickEvent.action.name.lowercase() != "run_command" || !clickEvent.value.lowercase().startsWith("/cb")) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocations.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocations.kt index 13c5301126aa..77690205ff11 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocations.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocations.kt @@ -2,10 +2,10 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.jsonobjects.repo.HoppityEggLocationsJson -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.NeuProfileDataLoadedEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager @@ -130,7 +130,7 @@ object HoppityEggLocations { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock || !showEggLocationsDebug) return val legacyLocations = legacyEggLocations[LorenzUtils.skyBlockIsland] ?: return val apiLocations = apiEggLocations[LorenzUtils.skyBlockIsland] ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt index 92dbd9dcba8f..437f8d0f37da 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggLocator.kt @@ -5,10 +5,10 @@ import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandGraphs import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.hoppity.EggFoundEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -67,7 +67,7 @@ object HoppityEggLocator { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { resetData() } @@ -85,7 +85,7 @@ object HoppityEggLocator { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return event.drawGuessImmediately() @@ -119,7 +119,7 @@ object HoppityEggLocator { event.drawDuplicateEggs(islandEggsLocations) } - private fun LorenzRenderWorldEvent.drawGuessLocations() { + private fun SkyhanniRenderWorldEvent.drawGuessLocations() { for ((index, eggLocation) in possibleEggLocations.withIndex()) { drawEggWaypoint(eggLocation, "§aGuess #${index + 1}") if (config.showLine) { @@ -128,7 +128,7 @@ object HoppityEggLocator { } } - private fun LorenzRenderWorldEvent.drawDuplicateEggs(islandEggsLocations: Set) { + private fun SkyhanniRenderWorldEvent.drawDuplicateEggs(islandEggsLocations: Set) { if (!config.highlightDuplicateEggLocations || !config.showNearbyDuplicateEggLocations) return for (eggLocation in islandEggsLocations) { val dist = eggLocation.distanceToPlayer() @@ -140,7 +140,7 @@ object HoppityEggLocator { } } - private fun LorenzRenderWorldEvent.drawGuessImmediately() { + private fun SkyhanniRenderWorldEvent.drawGuessImmediately() { if (config.waypointsImmediately && lastClick.passedSince() < 5.seconds) { lastParticlePositionForever?.let { if (lastChange.passedSince() < 300.milliseconds) { @@ -161,7 +161,7 @@ object HoppityEggLocator { } } - private fun LorenzRenderWorldEvent.drawEggWaypoint(location: LorenzVec, label: String) { + private fun SkyhanniRenderWorldEvent.drawEggWaypoint(location: LorenzVec, label: String) { val shouldMarkDuplicate = config.highlightDuplicateEggLocations && HoppityEggLocations.hasCollectedEgg(location) val possibleDuplicateLabel = if (shouldMarkDuplicate) "$label §c(Duplicate Location)" else label if (!shouldMarkDuplicate) { @@ -194,7 +194,7 @@ object HoppityEggLocator { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (validParticleLocations.isEmpty()) return ticksSinceLastParticleFound++ diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt index 4b3451514839..38b517c6d8cf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEggsManager.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.event.hoppity import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.hoppity.EggFoundEvent import at.hannibal2.skyhanni.events.hoppity.RabbitFoundEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils @@ -106,7 +106,7 @@ object HoppityEggsManager { private var latestWaypointOnclick: () -> Unit = {} @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastMeal = null lastNote = null } @@ -128,7 +128,7 @@ object HoppityEggsManager { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return hoppityEventNotOn.matchMatcher(event.message) { @@ -171,7 +171,7 @@ object HoppityEggsManager { } } - internal fun Matcher.getEggType(event: LorenzChatEvent): HoppityEggType = + internal fun Matcher.getEggType(event: SkyhanniChatEvent): HoppityEggType = HoppityEggType.getMealByName(group("meal")) ?: run { ErrorManager.skyHanniError( "Unknown meal: ${group("meal")}", diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt index bf324a8f66b3..f21fcf8acea8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityNpc.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.features.inventory.chocolatefactory.ChocolateFactoryAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -83,7 +83,7 @@ object HoppityNpc { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt index 12aba1c90028..2866c19177c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/jerry/frozentreasure/FrozenTreasureTracker.kt @@ -69,7 +69,7 @@ object FrozenTreasureTracker { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { icePerHour = 0 stoppedChecks = 0 icePerSecond = mutableListOf() @@ -116,7 +116,7 @@ object FrozenTreasureTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!ProfileStorageData.loaded) return if (!onJerryWorkshop()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt index 731096c91658..d0cb00eeef98 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/lobby/waypoints/easter/EasterEggWaypoints.kt @@ -22,7 +22,7 @@ object EasterEggWaypoints { private var isEgg: Boolean = false @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!config.allWaypoints && !config.allEntranceWaypoints) return if (!isEgg) return @@ -60,7 +60,7 @@ object EasterEggWaypoints { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!isEgg) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt index 1dd620a98dc1..033dc302225d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/winter/JyrreTimer.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.event.winter import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NEUInternalName.Companion.asInternalName @@ -41,7 +41,7 @@ object JyrreTimer { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled() || !drankBottlePattern.matches(event.message)) return duration = 60.minutes } diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt index 785c2c358dcc..c19f199d0541 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/winter/NewYearCakeReminder.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.fame.ReminderUtils import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -29,7 +29,7 @@ object NewYearCakeReminder { private var lastReminderSend = SimpleTimeMark.farPast() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (event.message == "§aYou claimed a §r§cNew Year Cake§r§a!") { markCakeClaimed() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fame/UpgradeReminder.kt b/src/main/java/at/hannibal2/skyhanni/features/fame/UpgradeReminder.kt index b55aa8f11e7f..8cc75cfa3f99 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fame/UpgradeReminder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fame/UpgradeReminder.kt @@ -9,8 +9,8 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.HypixelCommands @@ -142,7 +142,7 @@ object UpgradeReminder { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (upgradeStartedPattern.matches(event.message)) { clickedUpgrade?.start() diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt index 3c77ccf0981f..3769977819d9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingAPI.kt @@ -73,12 +73,12 @@ object FishingAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { resetBobber() } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (event.isMod(5)) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt index a65229ed9d93..55647149fcd6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/FishingTimer.kt @@ -154,7 +154,7 @@ object FishingTimer { } @SubscribeEvent - fun onKeyPress(event: LorenzKeyPressEvent) { + fun onKeyPress(event: KeyPressEvent) { if (!isEnabled()) return if (Minecraft.getMinecraft().currentScreen != null) return if (config.manualResetTimer.isKeyClicked()) { @@ -184,7 +184,7 @@ object FishingTimer { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!rightLocation) return if (currentCount == 0) return @@ -214,7 +214,7 @@ object FishingTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { mobDespawnTime.clear() recentMobs.clear() babyMagmaSlugsToFind = 0 diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt index 079f1cc630a6..2abb89902565 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/TotemOfCorruption.kt @@ -4,10 +4,10 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.fishing.TotemOfCorruptionConfig.OutlineType import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor import at.hannibal2.skyhanni.utils.ConditionalUtils.onToggle @@ -87,7 +87,7 @@ object TotemOfCorruption { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEffectiveAreaEnabled()) return if (totems.isEmpty()) return @@ -117,7 +117,7 @@ object TotemOfCorruption { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { display = emptyList() totems = emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt index d3bbd22de153..b79a81f775ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/tracker/FishingProfitTracker.kt @@ -202,7 +202,7 @@ object FishingProfitTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { coinsChatPattern.matchMatcher(event.message) { tryAddItem(NEUInternalName.SKYBLOCK_COIN, group("coins").formatInt(), command = false) addCatch() @@ -227,7 +227,7 @@ object FishingProfitTracker { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastCatchTime = SimpleTimeMark.farPast() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt index ee3838335c45..2fa38bb05030 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GeyserFishing.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.features.fishing.trophy import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.distanceTo @@ -49,13 +49,13 @@ object GeyserFishing { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { geyser = null geyserBox = null } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!config.drawBox) return val geyserBox = geyserBox ?: return val geyser = geyser ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GoldenFishTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GoldenFishTimer.kt index dd023a7fadf3..bfdd8210d940 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GoldenFishTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/GoldenFishTimer.kt @@ -7,11 +7,11 @@ import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent import at.hannibal2.skyhanni.events.FishingBobberCastEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.fishing.FishingAPI import at.hannibal2.skyhanni.features.fishing.FishingAPI.isLavaRod import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper @@ -115,7 +115,7 @@ object GoldenFishTimer { private var display = listOf() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isActive()) return if (spawnPattern.matches(event.message)) { lastChatMessage = SimpleTimeMark.now() @@ -151,7 +151,7 @@ object GoldenFishTimer { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isActive()) return if (!config.nametag) return val entity = confirmedGoldenFishEntity ?: return @@ -245,7 +245,7 @@ object GoldenFishTimer { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isActive()) return // This makes it only count as the rod being throw into lava if the rod goes down, up, and down again. // Not confirmed that this is correct, but it's the best solution found. @@ -278,7 +278,7 @@ object GoldenFishTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastChatMessage = SimpleTimeMark.farPast() lastFishEntity = SimpleTimeMark.farPast() lastGoldenFishTime = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt index d241446e78c4..68be72fc0e83 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/FarmingFortuneDisplay.kt @@ -219,7 +219,7 @@ object FarmingFortuneDisplay { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return if (event.isMod(2)) update() if (gardenJoinTime.passedSince() > 5.seconds && !foundTabUniversalFortune && !gardenJoinTime.isFarPast()) { @@ -250,7 +250,7 @@ object FarmingFortuneDisplay { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { display = emptyList() gardenJoinTime = SimpleTimeMark.now() firstBrokenCropTime = SimpleTimeMark.farPast() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt index 460b112540c6..368ad977701e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenAPI.kt @@ -11,9 +11,9 @@ import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GardenToolChangeEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketSentEvent import at.hannibal2.skyhanni.features.event.hoppity.HoppityCollectionStats import at.hannibal2.skyhanni.features.garden.CropType.Companion.getCropType @@ -108,7 +108,7 @@ object GardenAPI { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!inGarden()) return if (event.isMod(10, 1)) { inBarn = barnArea.isPlayerInside() @@ -121,7 +121,7 @@ object GardenAPI { // TODO use IslandChangeEvent @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { DelayedRun.runDelayed(2.seconds) { if (inGarden()) { checkItemInHand() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt index 5177c0a1644b..704020283530 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/GardenLevelDisplay.kt @@ -5,9 +5,9 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.ConditionalUtils @@ -76,7 +76,7 @@ object GardenLevelDisplay { } @SubscribeEvent(receiveCanceled = true) - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return visitorRewardPattern.matchMatcher(event.message) { @@ -141,7 +141,7 @@ object GardenLevelDisplay { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!GardenAPI.inGarden()) return if (!config.overflow.get()) return val slotIndex = event.slot.slotIndex diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt index 1b441c349744..6fb1dd84c990 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt @@ -59,7 +59,7 @@ object FarmingWeightDisplay { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { // We want to try to connect to the api again after a world switch. resetData() } @@ -75,7 +75,7 @@ object FarmingWeightDisplay { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return update() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt index 826913669b01..1dd81641a2d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/inventory/GardenCropMilestoneInventory.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.data.GardenCropMilestones import at.hannibal2.skyhanni.data.GardenCropMilestones.getCounter import at.hannibal2.skyhanni.events.CropMilestoneUpdateEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.CropType import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -57,7 +57,7 @@ object GardenCropMilestoneInventory { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.tooltipTweak.cropMilestoneTotalProgress) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt index e239caeab5b3..3058a27522af 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestAPI.kt @@ -6,11 +6,11 @@ import at.hannibal2.skyhanni.data.ScoreboardData import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.ItemInHandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.garden.pests.PestSpawnEvent import at.hannibal2.skyhanni.events.garden.pests.PestUpdateEvent import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -227,7 +227,7 @@ object PestAPI { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return if (pestDeathChatPattern.matches(event.message)) { lastPestKillTime = SimpleTimeMark.now() @@ -239,7 +239,7 @@ object PestAPI { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return if (!firstScoreboardCheck && gardenJoinTime.passedSince() > 5.seconds) { checkScoreboardLines(ScoreboardData.sidebarLinesFormatted) @@ -249,7 +249,7 @@ object PestAPI { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastPestKillTime = SimpleTimeMark.farPast() lastTimeVacuumHold = SimpleTimeMark.farPast() gardenJoinTime = SimpleTimeMark.now() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt index 68c9e632376e..233a0f63c977 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestFinder.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.features.garden.pests.PestFinderConfig.VisibilityType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent +import at.hannibal2.skyhanni.events.KeyPressEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.garden.pests.PestUpdateEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI @@ -120,7 +120,7 @@ object PestFinder { // priority to low so that this happens after other renderPlot calls. @SubscribeEvent(priority = EventPriority.LOW) - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!config.showPlotInWorld) return if (config.onlyWithVacuum && !PestAPI.hasVacuumInHand() && @@ -149,7 +149,7 @@ object PestFinder { private fun drawName( plot: GardenPlotAPI.Plot, playerLocation: LorenzVec, - event: LorenzRenderWorldEvent, + event: SkyhanniRenderWorldEvent, ) { val pests = plot.pests val pestsName = StringUtils.pluralize(pests, "pest") @@ -169,7 +169,7 @@ object PestFinder { private var lastKeyPress = SimpleTimeMark.farPast() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return if (!config.noPestTitle) return @@ -177,7 +177,7 @@ object PestFinder { } @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!GardenAPI.inGarden()) return if (Minecraft.getMinecraft().currentScreen != null) return if (NEUItems.neuHasFocus()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt index bd8636b9ff86..6ff65d44ddc1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleLine.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.GardenPlotAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -81,7 +81,7 @@ object PestParticleLine { } @SubscribeEvent(priority = EventPriority.LOW) - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return // TODO time in config if (lastPestTrackerUse.passedSince() > 10.seconds) { @@ -95,7 +95,7 @@ object PestParticleLine { showMiddle(event) } - private fun showMiddle(event: LorenzRenderWorldEvent) { + private fun showMiddle(event: SkyhanniRenderWorldEvent) { if (!config.showMiddle) return if (locations.size <= 0) return val plot = GardenPlotAPI.getCurrentPlot() ?: return @@ -106,7 +106,7 @@ object PestParticleLine { event.drawDynamicText(middle, "Middle", 1.0) } - private fun draw(event: LorenzRenderWorldEvent, list: List) { + private fun draw(event: SkyhanniRenderWorldEvent, list: List) { val color = LorenzColor.YELLOW.toColor() for ((prev, next) in list.asSequence().zipWithNext()) { // TODO time in config diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt index 33c9dbea2f57..0e11c3c7d90d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestParticleWaypoint.kt @@ -5,10 +5,10 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.garden.pests.PestUpdateEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.features.garden.GardenAPI @@ -60,7 +60,7 @@ object PestParticleWaypoint { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { reset() } @@ -129,7 +129,7 @@ object PestParticleWaypoint { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (locations.isEmpty()) return if (lastPestTrackerUse.passedSince() > config.showForSeconds.seconds) { @@ -156,7 +156,7 @@ object PestParticleWaypoint { } else guessPoint @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val guessPoint = guessPoint ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt index 19506109ec9e..60835ddfbfd9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/pests/PestProfitTracker.kt @@ -6,9 +6,9 @@ import at.hannibal2.skyhanni.data.ItemAddManager import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.ItemAddEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.PurseChangeCause import at.hannibal2.skyhanni.events.PurseChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addSearchString @@ -90,7 +90,7 @@ object PestProfitTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return PestAPI.pestDeathChatPattern.matchMatcher(event.message) { val amount = group("amount").toInt() diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt index 2ad6f56b1c05..c6fd9916c800 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorDropStatistics.kt @@ -6,9 +6,9 @@ import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -102,7 +102,7 @@ object GardenVisitorDropStatistics { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.onBarnPlot) return if (!ProfileStorageData.loaded) return if (lastAccept.passedSince() > 1.seconds) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt index c9f8b22b2dbc..675abee6900f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorFeatures.kt @@ -8,11 +8,11 @@ import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacks import at.hannibal2.skyhanni.data.SackAPI.getAmountInSacksOrNull import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.OwnInventoryItemUpdateEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SackDataUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorAcceptedEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorArrivalEvent @@ -492,7 +492,7 @@ object GardenVisitorFeatures { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!GardenAPI.inGarden()) return if (!config.shoppingList.display && config.highlightStatus == HighlightMode.DISABLED) return if (!event.isMod(10, 2)) return @@ -533,7 +533,7 @@ object GardenVisitorFeatures { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (config.hypixelArrivedMessage && visitorArrivePattern.matcher(event.message).matches()) { event.blockedReason = "new_visitor_arrived" } diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt index af31448d66e4..ea50a8009749 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/GardenVisitorTimer.kt @@ -3,9 +3,9 @@ package at.hannibal2.skyhanni.features.garden.visitor import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.CropClickEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorArrivalEvent import at.hannibal2.skyhanni.features.garden.GardenAPI import at.hannibal2.skyhanni.features.garden.farming.GardenCropSpeed @@ -187,7 +187,7 @@ object GardenVisitorTimer { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastVisitors = -1 GardenAPI.storage?.nextSixthVisitorArrival?.let { if (it.isFarFuture() && it.toMillis() != -9223370336633802065) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt index 66d03745f372..3e0d9abb002f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/garden/visitor/VisitorListener.kt @@ -8,8 +8,8 @@ import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.WidgetUpdateEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorOpenEvent import at.hannibal2.skyhanni.events.garden.visitor.VisitorRenderEvent @@ -157,7 +157,7 @@ object VisitorListener { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!GardenAPI.inGarden()) return if (!GardenAPI.onBarnPlot) return if (config.highlightStatus != VisitorConfig.HighlightMode.NAME && config.highlightStatus != VisitorConfig.HighlightMode.BOTH) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt index dd9e3d91e9ad..d8e3e0f1fae7 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HarpFeatures.kt @@ -7,8 +7,8 @@ import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.GuiKeyPressEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.DelayedRun @@ -208,7 +208,7 @@ object HarpFeatures { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.hideMelodyTooltip) return if (!isHarpGui(InventoryUtils.openInventoryName())) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt index 8af1fe056829..ccf8a3c430b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/HideNotClickableItems.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.jsonobjects.repo.HideNotClickableItemsJson import at.hannibal2.skyhanni.data.jsonobjects.repo.SalvageFilter import at.hannibal2.skyhanni.events.GuiContainerEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.garden.composter.ComposterOverlay import at.hannibal2.skyhanni.features.garden.visitor.VisitorAPI import at.hannibal2.skyhanni.features.inventory.bazaar.BazaarApi @@ -118,7 +118,7 @@ object HideNotClickableItems { } @SubscribeEvent(priority = EventPriority.LOWEST) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (bypassActive()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt index 78e6063ee542..b9751ae842b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemPickupLog.kt @@ -2,10 +2,10 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PurseChangeEvent import at.hannibal2.skyhanni.events.SackChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.ItemCategory @@ -110,7 +110,7 @@ object ItemPickupLog { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!isEnabled()) return itemList.clear() itemsAddedToInventory.clear() @@ -137,7 +137,7 @@ object ItemPickupLog { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val oldItemList = mutableMapOf>() diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt index 05b0d46c75e7..29d4b96709d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/ItemStars.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.inventory import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.inventory.InventoryConfig.ItemNumberEntry.CRIMSON_ARMOR -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.inventory.ItemDisplayOverlayFeatures.isSelected import at.hannibal2.skyhanni.features.nether.kuudra.KuudraAPI.getKuudraTier import at.hannibal2.skyhanni.features.nether.kuudra.KuudraAPI.isKuudraArmor @@ -36,7 +36,7 @@ object ItemStars { ) @SubscribeEvent(priority = EventPriority.LOW) - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return val stack = event.itemStack if (stack.stackSize != 1) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/inventory/PersonalCompactorOverlay.kt b/src/main/java/at/hannibal2/skyhanni/features/inventory/PersonalCompactorOverlay.kt index 7c6deb255d5a..c40e786e5a5b 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/inventory/PersonalCompactorOverlay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/inventory/PersonalCompactorOverlay.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.features.inventory.PersonalCompactorConfig import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.events.RenderObject +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName import at.hannibal2.skyhanni.utils.ItemUtils.getInternalNameOrNull @@ -51,7 +51,7 @@ object PersonalCompactorOverlay { private val compactorEnabledMap = mutableMapOf() @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return if (!shouldShow()) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt index 34bca61463e3..289af017bd8a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/FireVeilWandParticles.kt @@ -53,7 +53,7 @@ object FireVeilWandParticles { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (config.display != DisplayEntry.LINE) return if (lastClick.passedSince() > 5.5.seconds) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt index fb15bd703a44..6be39a1f026a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/itemabilities/abilitycooldown/ItemAbilityCooldown.kt @@ -5,13 +5,13 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.PlaySoundEvent import at.hannibal2.skyhanni.events.RenderGuiItemOverlayEvent import at.hannibal2.skyhanni.events.RenderItemTipEvent import at.hannibal2.skyhanni.events.RenderObject +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.itemabilities.abilitycooldown.ItemAbility.Companion.getMultiplier import at.hannibal2.skyhanni.features.nether.ashfang.AshfangFreezeCooldown import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -231,7 +231,7 @@ object ItemAbilityCooldown { } @SubscribeEvent - fun onIslandChange(event: LorenzWorldChangeEvent) { + fun onIslandChange(event: WorldChangeEvent) { for (ability in ItemAbility.entries) { ability.lastActivation = 0L ability.specialColor = null @@ -290,7 +290,7 @@ object ItemAbilityCooldown { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return checkHotBar(event.isMod(10)) @@ -385,7 +385,7 @@ object ItemAbilityCooldown { private fun ItemStack.getIdentifier() = getItemUuid() ?: getItemId() @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt index 80477fd88186..a90ab87c71b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/DeepCavernsGuide.kt @@ -142,7 +142,7 @@ object DeepCavernsGuide { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!show) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/GoldenGoblinHighlight.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/GoldenGoblinHighlight.kt index 706af17a32f5..121f0ab30da2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/GoldenGoblinHighlight.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/GoldenGoblinHighlight.kt @@ -2,8 +2,8 @@ package at.hannibal2.skyhanni.features.mining import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.mob.Mob -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils @@ -29,7 +29,7 @@ object GoldenGoblinHighlight { private var lastGoblin: Mob? = null @SubscribeEvent - fun onChatEvent(event: LorenzChatEvent) { + fun onChatEvent(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!MiningNotifications.goldenGoblinSpawn.matches(event.message) && !MiningNotifications.diamondGoblinSpawn.matches(event.message) diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt index b9f205984f38..e92d988824eb 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/KingTalismanHelper.kt @@ -6,8 +6,8 @@ import at.hannibal2.skyhanni.data.MiningAPI import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.CollectionUtils.sorted @@ -222,7 +222,7 @@ object KingTalismanHelper { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return if (!MiningAPI.inDwarvenMines) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt index 79d838f20c97..68d652f68aea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MineshaftPityDisplay.kt @@ -9,8 +9,8 @@ import at.hannibal2.skyhanni.data.MiningAPI import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.events.mining.OreMinedEvent import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay.PityBlock.Companion.getPity import at.hannibal2.skyhanni.features.mining.MineshaftPityDisplay.PityBlock.Companion.getPityBlock @@ -99,7 +99,7 @@ object MineshaftPityDisplay { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!MiningAPI.inGlacialTunnels()) return if (MiningNotifications.mineshaftSpawn.matches(event.message)) { val pityCounter = calculateCounter() diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningCommissionsBlocksColor.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningCommissionsBlocksColor.kt index 5de75e5d1364..4d322fcedb0a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/MiningCommissionsBlocksColor.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/MiningCommissionsBlocksColor.kt @@ -6,10 +6,10 @@ import at.hannibal2.skyhanni.data.MiningAPI.inDwarvenMines import at.hannibal2.skyhanni.data.MiningAPI.inGlacite import at.hannibal2.skyhanni.events.ConfigLoadEvent import at.hannibal2.skyhanni.events.DebugDataCollectEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.TabListUpdateEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.mining.MiningCommissionsBlocksColor.CommissionBlock.Companion.onColor import at.hannibal2.skyhanni.features.mining.OreType.Companion.isOreType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -86,7 +86,7 @@ object MiningCommissionsBlocksColor { // TODO Commission API @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!enabled) return commissionCompletePattern.matchMatcher(event.message) { val name = group("name") @@ -98,7 +98,7 @@ object MiningCommissionsBlocksColor { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val newEnabled = (inCrystalHollows || inGlacite) && config.enabled var reload = false if (newEnabled != enabled) { @@ -149,7 +149,7 @@ object MiningCommissionsBlocksColor { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { enabled = false inDwarvenMines = false inCrystalHollows = false diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt index c3d89d98e183..14adf59602c9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/TunnelsMaps.kt @@ -13,12 +13,12 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.IslandChangeEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent -import at.hannibal2.skyhanni.events.SkyHanniWarpEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyHanniWarpEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.CollectionUtils.addString @@ -204,7 +204,7 @@ object TunnelsMaps { } @SubscribeEvent - fun onRenderItemTooltip(event: LorenzToolTipEvent) { + fun onRenderItemTooltip(event: SkyhanniToolTipEvent) { if (!isEnabled()) return clickTranslate[event.slot.slotIndex]?.let { event.toolTip.add("§e§lRight Click §r§eto for Tunnel Maps.") @@ -394,7 +394,7 @@ object TunnelsMaps { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (checkGoalReached()) return val prevclosest = closestNode @@ -447,7 +447,7 @@ object TunnelsMaps { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val path = path?.takeIf { it.first.isNotEmpty() } ?: return event.draw3DPathWithWaypoint( @@ -478,7 +478,7 @@ object TunnelsMaps { } ?: config.pathColour.toChromaColor() @SubscribeEvent - fun onKeyPress(event: LorenzKeyPressEvent) { + fun onKeyPress(event: KeyPressEvent) { if (!isEnabled()) return if (Minecraft.getMinecraft().currentScreen != null) return campfireKey(event) @@ -493,7 +493,7 @@ object TunnelsMaps { nextSpot() } - private fun campfireKey(event: LorenzKeyPressEvent) { + private fun campfireKey(event: KeyPressEvent) { if (event.keyCode != config.campfireKey) return if (config.travelScroll) { HypixelCommands.warp("basecamp") @@ -523,7 +523,7 @@ object TunnelsMaps { private var nextSpotDelay = SimpleTimeMark.farPast() - private fun nextSpotKey(event: LorenzKeyPressEvent) { + private fun nextSpotKey(event: KeyPressEvent) { if (event.keyCode != config.nextSpotHotkey) return nextSpot() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt index d5ee14ec92e3..209baea44fb0 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt @@ -8,9 +8,9 @@ import at.hannibal2.skyhanni.data.HypixelData import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.BossbarUpdateEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager import at.hannibal2.skyhanni.utils.APIUtils @@ -66,7 +66,7 @@ object MiningEventTracker { val apiError get() = apiErrorCount > 0 @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { eventEndTime = SimpleTimeMark.farPast() lastSentEvent = null } @@ -88,7 +88,7 @@ object MiningEventTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isMiningIsland()) return eventStartedPattern.matchMatcher(event.message) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt index a236c36e919a..5ab06993d2f6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/fossilexcavator/solver/FossilSolverDisplay.kt @@ -67,7 +67,7 @@ object FossilSolverDisplay { var possibleFossilTypes = setOf() @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { clearData() } @@ -89,7 +89,7 @@ object FossilSolverDisplay { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return val slots = InventoryUtils.getItemsInOpenChest() val itemNames = slots.map { it.stack.displayName.removeColor() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/InfernoMinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/InfernoMinionFeatures.kt index 45ad93ca12d2..04d4c707049c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/InfernoMinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/InfernoMinionFeatures.kt @@ -5,8 +5,8 @@ import at.hannibal2.skyhanni.data.jsonobjects.repo.InfernoMinionFuelsJson import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.KeyboardManager @@ -59,7 +59,7 @@ object InfernoMinionFeatures { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!config.infernoFuelBlocker) return if (!inInventory) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt index a9dc3dce34df..eeea48919f80 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionFeatures.kt @@ -13,14 +13,14 @@ import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.InventoryUpdatedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.MinionCloseEvent import at.hannibal2.skyhanni.events.MinionOpenEvent import at.hannibal2.skyhanni.events.MinionStorageOpenEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.BlockUtils.getBlockStateAt import at.hannibal2.skyhanni.utils.ChatUtils @@ -139,7 +139,7 @@ object MinionFeatures { } @SubscribeEvent - fun onRenderLastClickedMinion(event: LorenzRenderWorldEvent) { + fun onRenderLastClickedMinion(event: SkyhanniRenderWorldEvent) { if (!enableWithHub()) return if (!config.lastClickedMinion.display) return @@ -266,7 +266,7 @@ object MinionFeatures { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (coinsPerDay != "") return @@ -310,7 +310,7 @@ object MinionFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastClickedEntity = null lastMinion = null lastMinionOpened = 0L @@ -319,7 +319,7 @@ object MinionFeatures { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message @@ -355,7 +355,7 @@ object MinionFeatures { } @SubscribeEvent - fun onRenderLastEmptied(event: LorenzRenderWorldEvent) { + fun onRenderLastEmptied(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val playerLocation = LocationUtils.playerLocation() diff --git a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt index 67d54f10be94..bbcbeee4ccf6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/minion/MinionXp.kt @@ -4,11 +4,11 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.data.jsonobjects.repo.MinionXPJson import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.MinionCloseEvent import at.hannibal2.skyhanni.events.MinionOpenEvent import at.hannibal2.skyhanni.events.MinionStorageOpenEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.skillprogress.SkillType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName @@ -145,7 +145,7 @@ object MinionXp { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.xpDisplay) return when { @@ -164,7 +164,7 @@ object MinionXp { } } - private fun addXpInfoToTooltip(event: LorenzToolTipEvent) { + private fun addXpInfoToTooltip(event: SkyhanniToolTipEvent) { xpItemMap[toPrimitiveItemStack(event.itemStack)]?.let { event.toolTip.add("") event.toolTip.add(it) diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt index d5129a5fb420..2a6008345e14 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/MarkedPlayerManager.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.config.enums.OutsideSbFeature import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -115,7 +115,7 @@ object MarkedPlayerManager { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (Minecraft.getMinecraft().thePlayer == null) return markedPlayers.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt index 8fcc8fd8779d..4a528fcaa6c2 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/NonGodPotEffectDisplay.kt @@ -6,10 +6,10 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ProfileJoinEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.features.dungeon.DungeonAPI import at.hannibal2.skyhanni.features.rift.RiftAPI @@ -97,7 +97,7 @@ object NonGodPotEffectDisplay { // todo : cleanup and add support for poison candy I, and add support for splash / other formats @SubscribeEvent @Suppress("MaxLineLength") - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (event.message == "§aYou cleared all of your active effects!") { effectDuration.clear() update() @@ -202,7 +202,7 @@ object NonGodPotEffectDisplay { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { checkFooter = true } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt index 74b55434a227..86d171fb70c6 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/discordrpc/DiscordRPCManager.kt @@ -167,7 +167,7 @@ object DiscordRPCManager : IPCListener { private fun isEnabled() = config.enabled.get() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { // The mod has already started the connection process. This variable is my way of running a function when // the player joins SkyBlock but only running it again once they join and leave. if (started || !isEnabled()) return @@ -178,7 +178,7 @@ object DiscordRPCManager : IPCListener { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (nextUpdate.isInFuture()) return // wait 5 seconds to check if the new world is skyblock or not before stopping the function nextUpdate = DelayedRun.runDelayed(5.seconds) { @@ -217,7 +217,7 @@ object DiscordRPCManager : IPCListener { // Events that change things in DiscordStatus @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!isEnabled() || !PriorityEntry.AFK.isSelected()) return // autoPriority 4 is dynamic afk beenAfkFor = SimpleTimeMark.now() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt index 120c53e47b82..7e62ac8df28d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/limbo/LimboTimeTracker.kt @@ -7,10 +7,10 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.HypixelJoinEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.MessageSendToServerEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside @@ -47,7 +47,7 @@ object LimboTimeTracker { private var notMigratedPB = 0 @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (event.message == "§cYou are AFK. Move around to return from AFK." || event.message == "§cYou were spawned in Limbo.") { limboJoinTime = SimpleTimeMark.now() inLimbo = true @@ -64,7 +64,7 @@ object LimboTimeTracker { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { val personalBest = storage?.personalBest ?: 0 if (inLimbo && !shownPB && limboJoinTime.passedSince() >= personalBest.seconds && personalBest != 0) { shownPB = true @@ -89,7 +89,7 @@ object LimboTimeTracker { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { if (!inLimbo) return leaveLimbo() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt index 6ca32d610db6..0ea92e35b345 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorFeatures.kt @@ -7,12 +7,12 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.Perk import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzKeyPressEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent +import at.hannibal2.skyhanni.events.KeyPressEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.withAlpha @@ -120,7 +120,7 @@ object TrevorFeatures { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!onFarmingIsland()) return val formattedMessage = event.message.removeColor() @@ -249,7 +249,7 @@ object TrevorFeatures { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!onFarmingIsland()) return var entityTrapper = EntityUtils.getEntityByID(trapperID) if (entityTrapper !is EntityLivingBase) entityTrapper = EntityUtils.getEntityByID(backupTrapperID) @@ -285,7 +285,7 @@ object TrevorFeatures { } @SubscribeEvent - fun onKeyClick(event: LorenzKeyPressEvent) { + fun onKeyClick(event: KeyPressEvent) { if (!onFarmingIsland()) return if (Minecraft.getMinecraft().currentScreen != null) return if (NEUItems.neuHasFocus()) return @@ -328,12 +328,12 @@ object TrevorFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { resetTrapper() } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { inTrapperDen = areaTrappersDenPattern.matches(LorenzUtils.skyBlockArea) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt index 7d2240d4dbdd..6c1fcee7b8b9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/MatriarchHelper.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.nether import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.data.mob.Mob -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.MobEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.CopyNearbyEntitiesCommand.getMobInfo import at.hannibal2.skyhanni.test.command.ErrorManager @@ -50,7 +50,7 @@ object MatriarchHelper { } @SubscribeEvent - fun onRender(event: LorenzRenderWorldEvent) { + fun onRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (config.highlight) { val color = config.highlightColor.toChromaColor() diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt index 735089c36536..38a712e693ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/nether/reputationhelper/dailyquest/DailyQuestHelper.kt @@ -129,7 +129,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message @@ -182,7 +182,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (!reputationHelper.showLocations()) return @@ -198,7 +198,7 @@ class DailyQuestHelper(val reputationHelper: CrimsonIsleReputationHelper) { renderTownBoard(event) } - private fun renderTownBoard(event: LorenzRenderWorldEvent) { + private fun renderTownBoard(event: SkyhanniRenderWorldEvent) { if (!quests.any { it.needsTownBoardLocation() }) return val location = when (reputationHelper.factionType) { FactionType.BARBARIAN -> townBoardBarbarian diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/WoodenButtonsHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/WoodenButtonsHelper.kt index d3fbefa999a7..ec9716ca21de 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/WoodenButtonsHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/dreadfarm/WoodenButtonsHelper.kt @@ -8,11 +8,11 @@ import at.hannibal2.skyhanni.data.model.GraphNode import at.hannibal2.skyhanni.data.model.GraphNodeTag import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.ItemClickEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.features.rift.RiftAPI.isBlowgun import at.hannibal2.skyhanni.features.rift.everywhere.EnigmaSoulWaypoints.soulLocations @@ -68,14 +68,14 @@ object WoodenButtonsHelper { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { hitButtons.clear() RiftAPI.allButtonsHit = false currentSpot = null } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { findClosestSpot() checkBlowgunActivatedButtons() } @@ -147,7 +147,7 @@ object WoodenButtonsHelper { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!checkButtons()) return buttonHitPattern.matchMatcher(event.message) { @@ -168,7 +168,7 @@ object WoodenButtonsHelper { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!showButtons()) return val spot = currentSpot ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt index dd5910b58c79..2fa8ff4ae56d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveDefenseBlocks.kt @@ -1,10 +1,10 @@ package at.hannibal2.skyhanni.features.rift.area.livingcave import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SecondPassedEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -138,7 +138,7 @@ object LivingCaveDefenseBlocks { staticBlocks.filter { it.location.distance(location) < 15 }.minByOrNull { it.location.distance(location) } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for ((block, time) in movingBlocks) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt index 08079849e11e..df007f766b41 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/livingcave/LivingCaveLivingMetalHelper.kt @@ -4,9 +4,9 @@ import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.BlockClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.ServerBlockChangeEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.events.TitleReceivedEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -61,7 +61,7 @@ object LivingCaveLivingMetalHelper { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return val (a, b) = pair ?: return if (System.currentTimeMillis() > startTime + 5_000) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt index ce91fe989cd5..c896bdc0509f 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/DanceRoomHelper.kt @@ -97,12 +97,12 @@ object DanceRoomHelper { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { inRoom = false } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (event.isMod(10)) { inRoom = danceRoom.isPlayerInside() diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt index e835e3846cb9..8458673bec01 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/mirrorverse/TubulatorParkour.kt @@ -3,8 +3,8 @@ package at.hannibal2.skyhanni.features.rift.area.mirrorverse import at.hannibal2.skyhanni.data.jsonobjects.repo.ParkourJson import at.hannibal2.skyhanni.events.CheckRenderEntityEvent import at.hannibal2.skyhanni.events.ConfigLoadEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ColorUtils.toChromaColor @@ -63,7 +63,7 @@ object TubulatorParkour { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return parkourHelper?.render(event) diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt index 0f397e6e348f..63c72673a042 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/VerminTracker.kt @@ -4,8 +4,8 @@ import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.GuiRenderEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent import at.hannibal2.skyhanni.events.IslandChangeEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut @@ -87,7 +87,7 @@ object VerminTracker { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { for (verminType in VerminType.entries) { if (verminType.pattern.matches(event.message)) { tracker.modify { it.count.addOrPut(verminType, 1) } diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt index 7b88b09ed857..40351214369d 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/westvillage/kloon/KloonHacking.kt @@ -5,10 +5,10 @@ import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryFullyOpenedEvent -import at.hannibal2.skyhanni.events.LorenzChatEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzToolTipEvent import at.hannibal2.skyhanni.events.SecondPassedEvent +import at.hannibal2.skyhanni.events.SkyhanniChatEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniToolTipEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils @@ -117,7 +117,7 @@ object KloonHacking { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!RiftAPI.inRift()) return if (!config.waypoints) return if (!wearingHelmet) return @@ -130,7 +130,7 @@ object KloonHacking { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!RiftAPI.inRift()) return if (!wearingHelmet) return colorPattern.matchMatcher(event.message.removeColor()) { @@ -143,7 +143,7 @@ object KloonHacking { } @SubscribeEvent - fun onTooltip(event: LorenzToolTipEvent) { + fun onTooltip(event: SkyhanniToolTipEvent) { if (!RiftAPI.inRift()) return if (!inTerminalInventory) return if (!config.solver) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt index 218ee9e31e7d..8f52a5ea516a 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/everywhere/EnigmaSoulWaypoints.kt @@ -158,7 +158,7 @@ object EnigmaSoulWaypoints { } @SubscribeEvent - fun onRenderWorld(event: LorenzRenderWorldEvent) { + fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return for (soul in trackedSouls) { soulLocations[soul]?.let { @@ -182,7 +182,7 @@ object EnigmaSoulWaypoints { } @SubscribeEvent - fun onChat(event: LorenzChatEvent) { + fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.removeColor().trim() if (message == "You have already found that Enigma Soul!" || message == "SOUL! You unlocked an Enigma Soul!") { diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt index 23ee38751c77..8d341df33117 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/HideMobNames.kt @@ -1,8 +1,8 @@ package at.hannibal2.skyhanni.features.slayer import at.hannibal2.skyhanni.SkyHanniMod -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher @@ -78,7 +78,7 @@ object HideMobNames { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { lastMobName.clear() mobNamesHidden.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt index 87ceb82424e8..28f61fb21bd8 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/VampireSlayerFeatures.kt @@ -6,11 +6,11 @@ import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.EntityClickEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent -import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent import at.hannibal2.skyhanni.events.SkyHanniRenderEntityEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent +import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.features.rift.RiftAPI import at.hannibal2.skyhanni.mixins.hooks.RenderLivingEntityHelper import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule @@ -75,7 +75,7 @@ object VampireSlayerFeatures { private var nextClawSend = 0L @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return if (!event.isMod(5)) return val start = LocationUtils.playerLocation() @@ -264,7 +264,7 @@ object VampireSlayerFeatures { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!isEnabled()) return if (config.drawLine) { @@ -333,7 +333,7 @@ object VampireSlayerFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { entityList.clear() taggedEntityList.clear() standList = mutableMapOf() diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt index 789f0f041a8a..95cc40fb2527 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt @@ -105,7 +105,7 @@ object EndermanSlayerFeatures { private fun showBeacon() = beaconConfig.highlightBeacon || beaconConfig.showWarning || beaconConfig.showLine @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (!IslandType.THE_END.isInIsland()) return if (beaconConfig.highlightBeacon) { @@ -121,7 +121,7 @@ object EndermanSlayerFeatures { drawNukekubiSkulls(event) } - private fun drawNukekubiSkulls(event: LorenzRenderWorldEvent) { + private fun drawNukekubiSkulls(event: SkyhanniRenderWorldEvent) { for (skull in nukekubiSkulls) { if (skull.isDead) continue if (config.highlightNukekebi) { @@ -147,7 +147,7 @@ object EndermanSlayerFeatures { } } - private fun drawFlyingBeacon(event: LorenzRenderWorldEvent) { + private fun drawFlyingBeacon(event: SkyhanniRenderWorldEvent) { for (beacon in flyingBeacons) { if (beacon.isDead) continue if (beaconConfig.highlightBeacon) { @@ -167,7 +167,7 @@ object EndermanSlayerFeatures { } } - private fun drawSittingBeacon(event: LorenzRenderWorldEvent) { + private fun drawSittingBeacon(event: SkyhanniRenderWorldEvent) { for ((location, time) in sittingBeacon) { if (location.distanceToPlayer() > 20) continue if (beaconConfig.showLine) { @@ -239,7 +239,7 @@ object EndermanSlayerFeatures { } @SubscribeEvent - fun onWorldChange(event: LorenzWorldChangeEvent) { + fun onWorldChange(event: WorldChangeEvent) { endermenWithBeacons.clear() flyingBeacons.clear() nukekubiSkulls.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt index 1d66d7af3cb2..1c1f8356c5d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerHideParticles.kt @@ -20,7 +20,7 @@ object EndermanSlayerHideParticles { private var endermanLocations = listOf() @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isEnabled()) return endermanLocations = EntityUtils.getEntities().map { it.getLorenzVec() }.toList() diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt index bdcb935bb034..0f6fe383c988 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackParticlesCommand.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.test.command import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.ReceiveParticleEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -71,7 +71,7 @@ object TrackParticlesCommand { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isRecording) return val particlesToDisplay = particles.takeWhile { startTime.passedSince() - it.first < 3.seconds } @@ -106,7 +106,7 @@ object TrackParticlesCommand { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (cutOffTime.isInPast()) return worldParticles.forEach { (key, value) -> if (value.size != 1) { diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt index c038d8098699..ff7d6c2e6ebf 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/TrackSoundsCommand.kt @@ -2,9 +2,9 @@ package at.hannibal2.skyhanni.test.command import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.events.GuiRenderEvent -import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent -import at.hannibal2.skyhanni.events.LorenzTickEvent import at.hannibal2.skyhanni.events.PlaySoundEvent +import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils import at.hannibal2.skyhanni.utils.LorenzUtils @@ -72,7 +72,7 @@ object TrackSoundsCommand { } @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!isRecording) return val soundsToDisplay = sounds.takeWhile { startTime.passedSince() - it.first < 3.seconds } @@ -108,7 +108,7 @@ object TrackSoundsCommand { } @SubscribeEvent - fun onWorldRender(event: LorenzRenderWorldEvent) { + fun onWorldRender(event: SkyhanniRenderWorldEvent) { if (cutOffTime.isInPast()) return for ((key, value) in worldSounds) { if (value.size != 1) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt index 6902f9aac534..2fd6b15cfb22 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/EntityOutlineRenderer.kt @@ -360,7 +360,7 @@ object EntityOutlineRenderer { * @param event the client tick event */ @SubscribeEvent - fun onTick(event: LorenzTickEvent) { + fun onTick(event: SkyhanniTickEvent) { if (!(event.phase == EventPriority.NORMAL && isEnabled())) return val renderGlobal = try { From d00522b79ab74bb13414e783f25a3d1e9e781d70 Mon Sep 17 00:00:00 2001 From: nopo Date: Thu, 17 Oct 2024 22:38:56 +1100 Subject: [PATCH 03/37] fix more --- .../java/at/hannibal2/skyhanni/SkyHanniMod.kt | 4 +-- .../hannibal2/skyhanni/api/CollectionAPI.kt | 8 ++--- .../hannibal2/skyhanni/api/DataWatcherAPI.kt | 6 ++-- .../at/hannibal2/skyhanni/api/FmlEventApi.kt | 1 + .../hannibal2/skyhanni/api/GetFromSackAPI.kt | 14 ++++---- .../at/hannibal2/skyhanni/api/ReforgeAPI.kt | 4 +-- .../at/hannibal2/skyhanni/api/SkillAPI.kt | 16 ++++----- .../skyhanni/api/event/SkyHanniEvents.kt | 6 ++-- .../hannibal2/skyhanni/data/ActionBarData.kt | 2 +- .../skyhanni/data/ActionBarStatsData.kt | 6 ++-- .../at/hannibal2/skyhanni/data/BitsAPI.kt | 16 ++++----- .../at/hannibal2/skyhanni/data/BlockData.kt | 4 +-- .../at/hannibal2/skyhanni/data/BossbarData.kt | 8 ++--- .../at/hannibal2/skyhanni/data/ChatManager.kt | 4 +-- .../skyhanni/data/CropAccessoryData.kt | 8 ++--- .../at/hannibal2/skyhanni/data/EntityData.kt | 13 ++++--- .../skyhanni/data/EntityMovementData.kt | 14 ++++---- .../hannibal2/skyhanni/data/EventCounter.kt | 4 +-- .../at/hannibal2/skyhanni/data/FameRanks.kt | 4 +-- .../skyhanni/data/FixedRateTimerManager.kt | 2 +- .../at/hannibal2/skyhanni/data/FriendAPI.kt | 6 ++-- .../data/GardenComposterUpgradesData.kt | 4 +-- .../skyhanni/data/GardenCropMilestones.kt | 6 ++-- .../data/GardenCropMilestonesCommunityFix.kt | 4 +-- .../skyhanni/data/GardenCropUpgrades.kt | 6 ++-- .../at/hannibal2/skyhanni/data/GuiData.kt | 6 ++-- .../hannibal2/skyhanni/data/GuiEditManager.kt | 15 ++++---- .../at/hannibal2/skyhanni/data/GuildAPI.kt | 4 +-- .../skyhanni/data/HighlightOnHoverSlot.kt | 9 +++-- .../at/hannibal2/skyhanni/data/HotmData.kt | 18 +++++----- .../at/hannibal2/skyhanni/data/HypixelData.kt | 25 +++++++------- .../hannibal2/skyhanni/data/IslandGraphs.kt | 13 ++++--- .../hannibal2/skyhanni/data/ItemAddManager.kt | 14 ++++---- .../hannibal2/skyhanni/data/ItemClickData.kt | 4 +-- .../hannibal2/skyhanni/data/ItemTipHelper.kt | 11 +++--- .../skyhanni/data/LocationFixData.kt | 5 ++- .../at/hannibal2/skyhanni/data/MaxwellAPI.kt | 9 +++-- .../at/hannibal2/skyhanni/data/MayorAPI.kt | 12 +++---- .../hannibal2/skyhanni/data/MinecraftData.kt | 14 ++++---- .../at/hannibal2/skyhanni/data/MiningAPI.kt | 21 ++++++------ .../skyhanni/data/NotificationManager.kt | 6 ++-- .../skyhanni/data/OtherInventoryData.kt | 13 ++++--- .../skyhanni/data/OtherPlayersSlayerAPI.kt | 4 +-- .../skyhanni/data/OwnInventoryData.kt | 15 ++++---- .../at/hannibal2/skyhanni/data/PartyAPI.kt | 6 ++-- .../skyhanni/data/PlayerDeathManager.kt | 6 ++-- .../skyhanni/data/ProfileStorageData.kt | 20 +++++------ .../at/hannibal2/skyhanni/data/PurseAPI.kt | 8 ++--- .../at/hannibal2/skyhanni/data/QuiverAPI.kt | 14 ++++---- .../at/hannibal2/skyhanni/data/RenderData.kt | 11 +++--- .../at/hannibal2/skyhanni/data/SackAPI.kt | 12 +++---- .../hannibal2/skyhanni/data/ScoreboardData.kt | 10 +++--- .../at/hannibal2/skyhanni/data/ScreenData.kt | 6 ++-- .../skyhanni/data/SkillExperience.kt | 8 ++--- .../at/hannibal2/skyhanni/data/SlayerAPI.kt | 12 +++---- .../at/hannibal2/skyhanni/data/TitleData.kt | 2 +- .../hannibal2/skyhanni/data/TitleManager.kt | 6 ++-- .../at/hannibal2/skyhanni/data/ToolTipData.kt | 2 +- .../hannibal2/skyhanni/data/TrackerManager.kt | 10 +++--- .../data/bazaar/HypixelBazaarFetcher.kt | 6 ++-- .../data/hypixel/chat/PlayerChatManager.kt | 8 ++--- .../data/hypixel/chat/PlayerNameFormatter.kt | 16 ++++----- .../skyhanni/data/mob/LineToMobHandler.kt | 6 ++-- .../at/hannibal2/skyhanni/data/mob/MobData.kt | 26 +++++++------- .../hannibal2/skyhanni/data/mob/MobDebug.kt | 6 ++-- .../skyhanni/data/mob/MobDetection.kt | 21 ++++++------ .../hannibal2/skyhanni/data/mob/MobFilter.kt | 2 +- .../skyhanni/data/model/SkyblockStat.kt | 6 ++-- .../skyhanni/data/model/TabWidget.kt | 10 +++--- .../skyhanni/data/repo/RepoManager.kt | 6 ++-- .../hannibal2/skyhanni/events/LorenzEvent.kt | 3 +- .../skyhanni/events/SkyhanniChatEvent.kt | 1 + .../features/anvil/AnvilCombineHelper.kt | 4 +-- .../skyhanni/features/bingo/BingoAPI.kt | 6 ++-- .../features/bingo/CompactBingoChat.kt | 4 +-- .../features/bingo/MinionCraftHelper.kt | 12 +++---- .../features/bingo/card/BingoCardDisplay.kt | 9 +++-- .../features/bingo/card/BingoCardReader.kt | 6 ++-- .../features/bingo/card/BingoCardTips.kt | 6 ++-- .../nextstephelper/BingoNextStepHelper.kt | 6 ++-- .../features/chat/ArachneChatMessageHider.kt | 4 +-- .../skyhanni/features/chat/ChatFilter.kt | 6 ++-- .../chat/CompactBestiaryChatMessage.kt | 4 +-- .../features/chat/CompactExperimentRewards.kt | 6 ++-- .../chat/CompactSplashPotionMessage.kt | 4 +-- .../features/chat/PlayerDeathMessages.kt | 6 ++-- .../features/chat/PowderMiningChatFilter.kt | 4 +-- .../features/chat/RareDropMessages.kt | 4 +-- .../features/chat/SkyblockXPInChat.kt | 4 +-- .../skyhanni/features/chat/StashCompact.kt | 4 +-- .../skyhanni/features/chat/WatchdogHider.kt | 6 ++-- .../chat/playerchat/PlayerChatFilter.kt | 4 +-- .../chat/playerchat/PlayerChatModifier.kt | 6 ++-- .../features/chat/translation/Translator.kt | 8 ++--- .../skyhanni/features/chroma/ChromaManager.kt | 4 +-- .../features/combat/ArmorStackDisplay.kt | 6 ++-- .../skyhanni/features/combat/BestiaryData.kt | 12 +++---- .../features/combat/BroodmotherFeatures.kt | 10 +++--- .../features/combat/FerocityDisplay.kt | 4 +-- .../skyhanni/features/combat/FlareDisplay.kt | 14 ++++---- .../features/combat/HideDamageSplash.kt | 7 ++-- .../damageindicator/DamageIndicatorManager.kt | 23 ++++++------- .../endernodetracker/EnderNodeTracker.kt | 16 ++++----- .../combat/ghostcounter/GhostCounter.kt | 22 ++++++------ .../features/combat/mobs/ArachneKillTimer.kt | 6 ++-- .../features/combat/mobs/ArachneSpawnTimer.kt | 7 ++-- .../combat/mobs/AreaMiniBossFeatures.kt | 8 ++--- .../combat/mobs/AshfangMinisNametagHider.kt | 5 ++- .../features/combat/mobs/MobHighlight.kt | 10 +++--- .../features/commands/PartyChatCommands.kt | 6 ++-- .../features/commands/PartyCommands.kt | 8 ++--- .../commands/SendCoordinatedCommand.kt | 4 +-- .../features/commands/TransferCooldown.kt | 6 ++-- .../features/commands/ViewRecipeCommand.kt | 4 +-- .../features/commands/WarpIsCommand.kt | 4 +-- .../skyhanni/features/commands/WikiManager.kt | 8 ++--- .../commands/tabcomplete/PlayerTabComplete.kt | 6 ++-- .../commands/tabcomplete/TabComplete.kt | 4 +-- .../commands/tabcomplete/WarpTabComplete.kt | 6 ++-- .../skyhanni/features/cosmetics/ArrowTrail.kt | 8 ++--- .../cosmetics/CosmeticFollowingLine.kt | 10 +++--- .../features/dungeon/CroesusChestTracker.kt | 16 ++++----- .../skyhanni/features/dungeon/DungeonAPI.kt | 19 +++++------ .../dungeon/DungeonArchitectFeatures.kt | 4 +-- .../features/dungeon/DungeonBossAPI.kt | 8 ++--- .../dungeon/DungeonBossHideDamageSplash.kt | 4 +-- .../features/dungeon/DungeonBossMessages.kt | 4 +-- .../features/dungeon/DungeonChatFilter.kt | 4 +-- .../features/dungeon/DungeonCleanEnd.kt | 18 +++++----- .../features/dungeon/DungeonCopilot.kt | 16 ++++----- .../features/dungeon/DungeonDeathCounter.kt | 10 +++--- .../features/dungeon/DungeonFinderFeatures.kt | 14 ++++---- .../features/dungeon/DungeonHideItems.kt | 12 +++---- .../dungeon/DungeonHighlightClickedBlocks.kt | 8 ++--- .../features/dungeon/DungeonLividFinder.kt | 10 +++--- .../dungeon/DungeonMilestonesDisplay.kt | 12 +++---- .../features/dungeon/DungeonMobManager.kt | 12 +++---- .../dungeon/DungeonRankTabListColor.kt | 4 +-- .../dungeon/DungeonTeammateOutlines.kt | 4 +-- .../features/dungeon/DungeonsRaceGuide.kt | 12 +++---- .../dungeon/HighlightDungeonDeathmite.kt | 4 +-- .../features/dungeon/TerracottaPhase.kt | 6 ++-- .../dungeon/floor7/TerminalWaypoints.kt | 8 ++--- .../UniqueGiftingOpportunitiesFeatures.kt | 10 +++--- .../event/anniversary/Year300RaffleEvent.kt | 8 ++--- .../features/event/carnival/CarnivalGoal.kt | 10 +++--- .../event/carnival/CarnivalQuickStart.kt | 4 +-- .../event/carnival/CarnivalReminder.kt | 8 ++--- .../event/carnival/CarnivalZombieShootout.kt | 10 +++--- .../features/event/diana/AllBurrowsList.kt | 8 ++--- .../features/event/diana/BurrowWarpHelper.kt | 10 +++--- .../features/event/diana/DianaFixChat.kt | 8 ++--- .../event/diana/DianaProfitTracker.kt | 10 +++--- .../event/diana/GriffinBurrowHelper.kt | 21 ++++++------ .../diana/GriffinBurrowParticleFinder.kt | 11 +++--- .../features/event/diana/GriffinPetWarning.kt | 8 ++--- .../event/diana/InquisitorWaypointShare.kt | 11 +++--- .../diana/MythologicalCreatureTracker.kt | 8 ++--- .../features/event/diana/SoopyGuessBurrow.kt | 10 +++--- .../features/event/hoppity/HoppityAPI.kt | 9 +++-- .../event/hoppity/HoppityCallWarning.kt | 15 ++++---- .../event/hoppity/HoppityCollectionData.kt | 4 +-- .../event/hoppity/HoppityCollectionStats.kt | 12 +++---- .../event/hoppity/HoppityEggDisplayManager.kt | 12 +++---- .../event/hoppity/HoppityEggLocations.kt | 10 +++--- .../event/hoppity/HoppityEggLocator.kt | 11 +++--- .../event/hoppity/HoppityEggsCompactChat.kt | 3 +- .../event/hoppity/HoppityEggsManager.kt | 9 +++-- .../event/hoppity/HoppityEggsShared.kt | 4 +-- .../event/hoppity/HoppityEventSummary.kt | 5 ++- .../features/event/hoppity/HoppityNpc.kt | 14 ++++---- .../hoppity/HoppityRabbitTheFishChecker.kt | 8 ++--- .../event/hoppity/NucleusBarriersBox.kt | 6 ++-- .../features/event/hoppity/WarpMenuUniques.kt | 4 +-- .../features/event/jerry/HighlightJerries.kt | 4 +-- .../frozentreasure/FrozenTreasureTracker.kt | 12 +++---- .../waypoints/christmas/PresentWaypoints.kt | 12 +++---- .../waypoints/easter/EasterEggWaypoints.kt | 8 ++--- .../waypoints/halloween/BasketWaypoints.kt | 10 +++--- .../features/event/spook/TheGreatSpook.kt | 6 ++-- .../features/event/winter/JyrreTimer.kt | 10 +++--- .../event/winter/NewYearCakeReminder.kt | 8 ++--- .../event/winter/ReindrakeWarpHelper.kt | 4 +-- .../event/winter/UniqueGiftCounter.kt | 8 ++--- .../features/fame/CityProjectFeatures.kt | 14 ++++---- .../skyhanni/features/fame/UpgradeReminder.kt | 14 ++++---- .../features/fishing/ChumBucketHider.kt | 8 ++--- .../skyhanni/features/fishing/FishingAPI.kt | 13 ++++--- .../features/fishing/FishingBaitWarnings.kt | 6 ++-- .../features/fishing/FishingHookDisplay.kt | 12 +++---- .../skyhanni/features/fishing/FishingTimer.kt | 20 +++++------ .../features/fishing/IsFishingDetection.kt | 6 ++-- .../features/fishing/LavaReplacement.kt | 4 +-- .../features/fishing/SeaCreatureFeatures.kt | 14 ++++---- .../features/fishing/SeaCreatureManager.kt | 8 ++--- .../fishing/SeaCreatureMessageShortener.kt | 4 +-- .../features/fishing/SharkFishCounter.kt | 10 +++--- .../features/fishing/ShowFishingItemName.kt | 6 ++-- .../fishing/ThunderSparksHighlight.kt | 10 +++--- .../features/fishing/TotemOfCorruption.kt | 14 ++++---- .../fishing/tracker/FishingProfitTracker.kt | 14 ++++---- .../fishing/tracker/SeaCreatureTracker.kt | 12 +++---- .../features/fishing/trophy/GeyserFishing.kt | 9 +++-- .../fishing/trophy/GoldenFishTimer.kt | 20 +++++------ .../features/fishing/trophy/OdgerWaypoint.kt | 8 ++--- .../fishing/trophy/TrophyFishDisplay.kt | 10 +++--- .../fishing/trophy/TrophyFishFillet.kt | 6 ++-- .../fishing/trophy/TrophyFishManager.kt | 6 ++-- .../fishing/trophy/TrophyFishMessages.kt | 6 ++-- .../features/garden/AnitaMedalProfit.kt | 10 +++--- .../garden/AtmosphericFilterDisplay.kt | 6 ++-- .../features/garden/FarmingFortuneDisplay.kt | 16 ++++----- .../skyhanni/features/garden/GardenAPI.kt | 15 ++++---- .../features/garden/GardenCropMilestoneFix.kt | 6 ++-- .../features/garden/GardenLevelDisplay.kt | 16 ++++----- .../features/garden/GardenNextJacobContest.kt | 20 +++++------ .../features/garden/GardenOptimalSpeed.kt | 11 +++--- .../skyhanni/features/garden/GardenPlotAPI.kt | 6 ++-- .../features/garden/GardenPlotBorders.kt | 6 ++-- .../features/garden/GardenWarpCommands.kt | 6 ++-- .../features/garden/GardenYawAndPitch.kt | 8 ++--- .../features/garden/SensitivityReducer.kt | 12 +++---- .../features/garden/ToolTooltipTweaks.kt | 6 ++-- .../garden/composter/ComposterDisplay.kt | 8 ++--- .../composter/ComposterInventoryNumbers.kt | 6 ++-- .../garden/composter/ComposterOverlay.kt | 22 ++++++------ .../GardenComposterInventoryFeatures.kt | 8 ++--- .../garden/contest/FarmingContestAPI.kt | 16 ++++----- .../garden/contest/FarmingPersonalBestGain.kt | 4 +-- .../contest/JacobContestFFNeededDisplay.kt | 8 ++--- .../contest/JacobContestStatsSummary.kt | 6 ++-- .../garden/contest/JacobContestTimeNeeded.kt | 7 ++-- .../contest/JacobFarmingContestsInventory.kt | 16 ++++----- .../garden/farming/ArmorDropTracker.kt | 16 ++++----- .../garden/farming/CropMoneyDisplay.kt | 12 +++---- .../features/garden/farming/CropSpeedMeter.kt | 8 ++--- .../garden/farming/DicerRngDropTracker.kt | 12 +++---- .../garden/farming/FarmingWeightDisplay.kt | 14 ++++---- .../garden/farming/GardenBestCropTime.kt | 4 +-- .../farming/GardenBurrowingSporesNotifier.kt | 4 +-- .../farming/GardenCropMilestoneDisplay.kt | 12 +++---- .../garden/farming/GardenCropSpeed.kt | 12 +++---- .../garden/farming/GardenCustomKeybinds.kt | 4 +-- .../garden/farming/GardenStartLocation.kt | 6 ++-- .../garden/farming/WrongFungiCutterWarning.kt | 8 ++--- .../garden/farming/lane/FarmingLaneAPI.kt | 6 ++-- .../garden/farming/lane/FarmingLaneCreator.kt | 6 ++-- .../farming/lane/FarmingLaneFeatures.kt | 9 +++-- .../garden/fortuneguide/CaptureFarmingGear.kt | 10 +++--- .../inventory/AnitaExtraFarmingFortune.kt | 8 ++--- .../inventory/GardenCropMilestoneInventory.kt | 10 +++--- .../inventory/GardenInventoryNumbers.kt | 6 ++-- .../GardenInventoryTooltipOverflow.kt | 4 +-- .../features/garden/inventory/LogBookStats.kt | 10 +++--- .../garden/inventory/SkyMartCopperPrice.kt | 10 +++--- .../inventory/plots/GardenNextPlotPrice.kt | 4 +-- .../garden/inventory/plots/GardenPlotIcon.kt | 12 +++---- .../plots/GardenPlotMenuHighlighting.kt | 6 ++-- .../skyhanni/features/garden/pests/PestAPI.kt | 18 +++++----- .../features/garden/pests/PestFinder.kt | 12 +++---- .../features/garden/pests/PestParticleLine.kt | 6 ++-- .../garden/pests/PestParticleWaypoint.kt | 10 +++--- .../garden/pests/PestProfitTracker.kt | 12 +++---- .../features/garden/pests/PestSpawn.kt | 6 ++-- .../features/garden/pests/PestSpawnTimer.kt | 4 +-- .../features/garden/pests/SprayDisplay.kt | 8 ++--- .../features/garden/pests/SprayFeatures.kt | 8 ++--- .../garden/pests/StereoHarmonyDisplay.kt | 10 +++--- .../garden/visitor/GardenVisitorColorNames.kt | 4 +-- .../visitor/GardenVisitorCompactChat.kt | 4 +-- .../visitor/GardenVisitorDropStatistics.kt | 16 ++++----- .../garden/visitor/GardenVisitorFeatures.kt | 26 +++++++------- .../garden/visitor/GardenVisitorSupercraft.kt | 10 +++--- .../garden/visitor/GardenVisitorTimer.kt | 16 ++++----- .../HighlightVisitorsOutsideOfGarden.kt | 5 ++- .../features/garden/visitor/NPCVisitorFix.kt | 8 ++--- .../features/garden/visitor/VisitorAPI.kt | 8 ++--- .../garden/visitor/VisitorListener.kt | 20 +++++------ .../garden/visitor/VisitorRewardWarning.kt | 9 +++-- .../skyhanni/features/gui/BeaconPower.kt | 10 +++--- .../skyhanni/features/gui/MovableHotBar.kt | 1 + .../skyhanni/features/gui/MovableXpBar.kt | 1 + .../skyhanni/features/gui/TabWidgetDisplay.kt | 6 ++-- .../gui/customscoreboard/CustomScoreboard.kt | 17 +++++----- .../gui/customscoreboard/ScoreboardPattern.kt | 4 +-- .../features/gui/quiver/QuiverDisplay.kt | 10 +++--- .../features/gui/quiver/QuiverWarning.kt | 12 +++---- .../features/inventory/ActiveBeaconEffect.kt | 8 ++--- .../inventory/AuctionOutbidWarning.kt | 4 +-- .../features/inventory/AuctionsHighlighter.kt | 6 ++-- .../features/inventory/BitsPerCookieVisual.kt | 4 +-- .../skyhanni/features/inventory/ChestValue.kt | 12 +++---- .../features/inventory/DojoRankDisplay.kt | 10 +++--- .../features/inventory/FavoritePowerStone.kt | 12 +++---- .../skyhanni/features/inventory/FocusMode.kt | 6 ++-- .../features/inventory/HarpFeatures.kt | 15 ++++---- .../features/inventory/HeldTimeInLore.kt | 4 +-- .../inventory/HideNotClickableItems.kt | 13 ++++--- .../features/inventory/HighlightBonzoMasks.kt | 10 +++--- .../inventory/ItemDisplayOverlayFeatures.kt | 6 ++-- .../features/inventory/ItemPickupLog.kt | 12 +++---- .../skyhanni/features/inventory/ItemStars.kt | 7 ++-- .../features/inventory/MaxPurseItems.kt | 4 +-- .../features/inventory/MinisterInCalendar.kt | 8 ++--- .../features/inventory/PageScrolling.kt | 4 +-- .../inventory/PersonalCompactorOverlay.kt | 10 +++--- .../inventory/PowerStoneGuideFeatures.kt | 12 +++---- .../features/inventory/QuickCraftFeatures.kt | 10 +++--- .../features/inventory/ReforgeHelper.kt | 16 ++++----- .../features/inventory/RngMeterInventory.kt | 8 ++--- .../features/inventory/SackDisplay.kt | 8 ++--- .../features/inventory/ShiftClickBrewing.kt | 4 +-- .../features/inventory/ShiftClickEquipment.kt | 4 +-- .../features/inventory/ShiftClickNPCSell.kt | 8 ++--- .../SkyblockGuideHighlightFeature.kt | 12 +++---- .../features/inventory/StatsTuning.kt | 8 ++--- .../features/inventory/StockOfStonkFeature.kt | 8 ++--- .../features/inventory/SuperCraftFeatures.kt | 4 +-- .../features/inventory/UltimateEnchantStar.kt | 4 +-- .../AuctionHouseCopyUnderbidPrice.kt | 8 ++--- .../AuctionHouseOpenPriceWebsite.kt | 11 +++--- .../features/inventory/bazaar/BazaarApi.kt | 18 +++++----- .../inventory/bazaar/BazaarBestSellMethod.kt | 11 +++--- .../BazaarCancelledBuyOrderClipboard.kt | 8 ++--- .../bazaar/BazaarOpenPriceWebsite.kt | 7 ++-- .../inventory/bazaar/BazaarOrderHelper.kt | 4 +-- .../bazaar/CraftMaterialsFromBazaar.kt | 8 ++--- .../chocolatefactory/ChocolateFactoryAPI.kt | 8 ++--- .../ChocolateFactoryBarnManager.kt | 6 ++-- .../ChocolateFactoryBlockOpen.kt | 4 +-- .../ChocolateFactoryCustomReminder.kt | 12 +++---- .../ChocolateFactoryDataLoader.kt | 12 +++---- .../ChocolateFactoryInventory.kt | 10 +++--- .../ChocolateFactoryKeybinds.kt | 6 ++-- .../ChocolateFactoryScreenFlash.kt | 6 ++-- .../ChocolateFactoryShortcut.kt | 10 +++--- .../chocolatefactory/ChocolateFactoryStats.kt | 8 ++--- .../ChocolateFactoryStrayTracker.kt | 10 +++--- .../ChocolateFactoryTimeTowerManager.kt | 8 ++--- .../ChocolateFactoryTooltip.kt | 4 +-- .../ChocolateFactoryTooltipCompact.kt | 8 ++--- .../ChocolateFactoryTooltipStray.kt | 4 +-- .../ChocolateFactoryUpgradeWarning.kt | 6 ++-- .../chocolatefactory/ChocolateShopPrice.kt | 12 +++---- .../inventory/craft/CraftableItemList.kt | 8 ++--- .../ExperimentationTableAPI.kt | 4 +-- .../ExperimentsDryStreakDisplay.kt | 12 +++---- .../ExperimentsProfitTracker.kt | 16 ++++----- .../experimentationtable/GuardianReminder.kt | 8 ++--- .../SuperpairDataDisplay.kt | 8 ++--- .../SuperpairsClicksAlert.kt | 8 ++--- .../UltraRareBookAlert.kt | 10 +++--- .../inventory/tiarelay/TiaRelayHelper.kt | 12 +++---- .../inventory/tiarelay/TiaRelayWaypoints.kt | 6 ++-- .../inventory/wardrobe/CustomWardrobe.kt | 14 ++++---- .../wardrobe/CustomWardrobeKeybinds.kt | 3 +- .../wardrobe/EstimatedWardrobePrice.kt | 6 ++-- .../inventory/wardrobe/WardrobeAPI.kt | 10 +++--- .../itemabilities/ChickenHeadTimer.kt | 12 +++---- .../itemabilities/CrownOfAvariceCounter.kt | 6 ++-- .../itemabilities/FireVeilWandParticles.kt | 8 ++--- .../abilitycooldown/ItemAbilityCooldown.kt | 17 +++++----- .../skyhanni/features/mining/ColdOverlay.kt | 6 ++-- .../features/mining/DeepCavernsGuide.kt | 20 +++++------ .../features/mining/FlowstateHelper.kt | 10 +++--- .../features/mining/GoldenGoblinHighlight.kt | 6 ++-- .../mining/HighlightMiningCommissionMobs.kt | 10 +++--- .../skyhanni/features/mining/HotmFeatures.kt | 6 ++-- .../features/mining/KingTalismanHelper.kt | 10 +++--- .../features/mining/MineshaftPityDisplay.kt | 9 +++-- .../mining/MiningCommissionsBlocksColor.kt | 14 ++++---- .../features/mining/MiningNotifications.kt | 10 +++--- .../features/mining/PowderPerHotmPerk.kt | 4 +-- .../mining/PrecisionMiningHighlight.kt | 8 ++--- .../skyhanni/features/mining/TunnelsMaps.kt | 24 ++++++------- .../CrystalHollowsNamesInCore.kt | 6 ++-- .../crystalhollows/CrystalHollowsWalls.kt | 4 +-- .../mining/eventtracker/MiningEventDisplay.kt | 8 ++--- .../mining/eventtracker/MiningEventTracker.kt | 14 ++++---- .../fossilexcavator/ExcavatorProfitTracker.kt | 10 +++--- .../fossilexcavator/ExcavatorTooltipHider.kt | 4 +-- .../fossilexcavator/FossilExcavatorAPI.kt | 16 ++++----- .../fossilexcavator/GlacitePowderFeatures.kt | 4 +-- .../fossilexcavator/ProfitPerExcavation.kt | 4 +-- .../solver/FossilSolverDisplay.kt | 18 +++++----- .../mining/glacitemineshaft/CorpseAPI.kt | 6 ++-- .../mining/glacitemineshaft/CorpseLocator.kt | 10 +++--- .../mining/glacitemineshaft/CorpseTracker.kt | 8 ++--- .../glacitemineshaft/MineshaftWaypoints.kt | 10 +++--- .../ProfitPerMineshaftCorpse.kt | 4 +-- .../mining/powdertracker/PowderTracker.kt | 16 ++++----- .../features/minion/InfernoMinionFeatures.kt | 12 +++---- .../features/minion/MinionCollectLogic.kt | 8 ++--- .../features/minion/MinionFeatures.kt | 34 +++++++++---------- .../skyhanni/features/minion/MinionXp.kt | 14 ++++---- .../misc/AuctionHousePriceComparison.kt | 10 +++--- .../features/misc/BetterSignEditing.kt | 6 ++-- .../features/misc/BetterWikiFromMenus.kt | 7 ++-- .../features/misc/BrewingStandOverlay.kt | 4 +-- .../skyhanni/features/misc/ButtonOnPause.kt | 3 +- .../skyhanni/features/misc/CarryTracker.kt | 8 ++--- .../features/misc/CollectionTracker.kt | 6 ++-- .../features/misc/ContributorManager.kt | 6 ++-- .../skyhanni/features/misc/CopyPlaytime.kt | 6 ++-- .../skyhanni/features/misc/CrashOnDeath.kt | 4 +-- .../skyhanni/features/misc/CustomTextBox.kt | 10 +++--- .../features/misc/ExpOrbsOnGroundHider.kt | 4 +-- .../features/misc/FixGhostEntities.kt | 6 ++-- .../features/misc/FixNEUHeavyPearls.kt | 4 +-- .../skyhanni/features/misc/GFSPiggyBank.kt | 4 +-- .../skyhanni/features/misc/HideArmor.kt | 8 ++--- .../skyhanni/features/misc/HideFarEntities.kt | 6 ++-- .../features/misc/InGameDateDisplay.kt | 6 ++-- .../skyhanni/features/misc/InWaterDisplay.kt | 4 +-- .../skyhanni/features/misc/IslandAreas.kt | 16 ++++----- .../features/misc/JoinCrystalHollows.kt | 8 ++--- .../skyhanni/features/misc/LastServers.kt | 4 +-- .../skyhanni/features/misc/LesserOrbHider.kt | 8 ++--- .../skyhanni/features/misc/LockMouseLook.kt | 10 +++--- .../features/misc/MagicalPowerDisplay.kt | 6 ++-- .../features/misc/MarkedPlayerManager.kt | 10 +++--- .../skyhanni/features/misc/MiscFeatures.kt | 5 +-- .../features/misc/MovementSpeedDisplay.kt | 4 +-- .../skyhanni/features/misc/NoBitsWarning.kt | 6 ++-- .../features/misc/NonGodPotEffectDisplay.kt | 16 ++++----- .../skyhanni/features/misc/ParticleHider.kt | 6 ++-- .../features/misc/PartyMemberOutlines.kt | 4 +-- .../features/misc/PatcherSendCoordinates.kt | 12 +++---- .../features/misc/PocketSackInASackDisplay.kt | 8 ++--- .../features/misc/QuickModMenuSwitch.kt | 7 ++-- .../features/misc/ReplaceRomanNumerals.kt | 8 ++--- .../misc/RestorePieceOfWizardPortalLore.kt | 4 +-- .../features/misc/ServerRestartTitle.kt | 4 +-- .../features/misc/SkyBlockKickDuration.kt | 8 ++--- .../features/misc/TabWidgetSettings.kt | 8 ++--- .../misc/ThunderBottleNotification.kt | 4 +-- .../skyhanni/features/misc/TimeFeatures.kt | 6 ++-- .../skyhanni/features/misc/TpsCounter.kt | 8 ++--- .../features/misc/UserLuckBreakdown.kt | 12 +++---- .../misc/compacttablist/AdvancedPlayerList.kt | 4 +-- .../misc/compacttablist/TabListReader.kt | 6 ++-- .../misc/compacttablist/TabListRenderer.kt | 9 ++--- .../misc/discordrpc/DiscordRPCManager.kt | 16 ++++----- .../features/misc/items/EstimatedItemValue.kt | 18 +++++----- .../misc/items/GlowingDroppedItems.kt | 4 +-- .../misc/items/enchants/EnchantParser.kt | 8 ++--- .../features/misc/limbo/LimboPlaytime.kt | 8 ++--- .../features/misc/limbo/LimboTimeTracker.kt | 18 +++++----- .../DefaultConfigFeatures.kt | 4 +-- .../features/misc/pets/CurrentPetDisplay.kt | 10 +++--- .../features/misc/pets/PetCandyUsedDisplay.kt | 6 ++-- .../features/misc/pets/PetExpTooltip.kt | 6 ++-- .../features/misc/pets/PetItemDisplay.kt | 4 +-- .../skyhanni/features/misc/pets/PetNametag.kt | 4 +-- .../misc/reminders/ReminderManager.kt | 4 +-- .../teleportpad/TeleportPadCompactName.kt | 4 +-- .../teleportpad/TeleportPadInventoryNumber.kt | 6 ++-- .../features/misc/trevor/TrevorFeatures.kt | 20 +++++------ .../features/misc/trevor/TrevorTracker.kt | 8 ++--- .../features/misc/update/UpdateManager.kt | 6 ++-- .../misc/visualwords/ModifyVisualWords.kt | 4 +-- .../nether/CrimsonMinibossRespawnTimer.kt | 12 +++---- .../features/nether/MatriarchHelper.kt | 8 ++--- .../skyhanni/features/nether/PabloHelper.kt | 4 +-- .../features/nether/SulphurSkitterBox.kt | 10 +++--- .../nether/VolcanoExplosivityDisplay.kt | 6 ++-- .../nether/ashfang/AshfangFreezeCooldown.kt | 8 ++--- .../features/nether/ashfang/AshfangHider.kt | 11 +++--- .../nether/ashfang/AshfangHighlights.kt | 7 ++-- .../features/nether/ashfang/AshfangManager.kt | 15 ++++---- .../ashfang/AshfangNextResetCooldown.kt | 6 ++-- .../features/nether/kuudra/KuudraAPI.kt | 10 +++--- .../CrimsonIsleReputationHelper.kt | 16 ++++----- .../dailyquest/DailyQuestHelper.kt | 16 ++++----- .../kuudra/DailyKuudraBossHelper.kt | 6 ++-- .../miniboss/DailyMiniBossHelper.kt | 6 ++-- .../area/colosseum/BlobbercystsHighlight.kt | 7 ++-- .../rift/area/dreadfarm/RiftAgaricusCap.kt | 8 ++--- .../dreadfarm/RiftWiltedBerberisHelper.kt | 12 +++---- .../rift/area/dreadfarm/VoltHighlighter.kt | 6 ++-- .../area/dreadfarm/WoodenButtonsHelper.kt | 12 +++---- .../livingcave/LivingCaveDefenseBlocks.kt | 12 +++---- .../livingcave/LivingCaveLivingMetalHelper.kt | 9 +++-- .../livingcave/LivingMetalSuitProgress.kt | 6 ++-- .../mirrorverse/CraftRoomHolographicMob.kt | 8 ++--- .../rift/area/mirrorverse/DanceRoomHelper.kt | 18 +++++----- .../area/mirrorverse/RiftLavaMazeParkour.kt | 12 +++---- .../area/mirrorverse/RiftUpsideDownParkour.kt | 12 +++---- .../rift/area/mirrorverse/TubulatorParkour.kt | 10 +++--- .../stillgorechateau/RiftBloodEffigies.kt | 16 ++++----- .../area/stillgorechateau/SplatterHearts.kt | 6 ++-- .../rift/area/westvillage/RiftGunthersRace.kt | 16 ++++----- .../area/westvillage/VerminHighlighter.kt | 6 ++-- .../rift/area/westvillage/VerminTracker.kt | 12 +++---- .../area/westvillage/kloon/KloonHacking.kt | 21 ++++++------ .../features/rift/area/wyldwoods/RiftLarva.kt | 4 +-- .../rift/area/wyldwoods/RiftOdonata.kt | 4 +-- .../rift/area/wyldwoods/ShyCruxWarnings.kt | 6 ++-- .../rift/everywhere/CruxTalismanDisplay.kt | 8 ++--- .../rift/everywhere/EnigmaSoulWaypoints.kt | 18 +++++----- .../rift/everywhere/HighlightRiftGuide.kt | 9 +++-- .../rift/everywhere/PunchcardHighlight.kt | 12 +++---- .../rift/everywhere/RiftHorsezookaHider.kt | 4 +-- .../features/rift/everywhere/RiftTimer.kt | 14 ++++---- .../rift/everywhere/motes/MotesSession.kt | 6 ++-- .../rift/everywhere/motes/RiftMotesOrb.kt | 10 +++--- .../everywhere/motes/ShowMotesNpcSellPrice.kt | 16 ++++----- .../features/skillprogress/SkillProgress.kt | 16 ++++----- .../features/skillprogress/SkillTooltip.kt | 4 +-- .../skyhanni/features/slayer/HideMobNames.kt | 7 ++-- .../features/slayer/SlayerBossSpawnSoon.kt | 4 +-- .../features/slayer/SlayerItemsOnGround.kt | 6 ++-- .../features/slayer/SlayerMiniBossFeatures.kt | 8 ++--- .../features/slayer/SlayerProfitTracker.kt | 16 ++++----- .../features/slayer/SlayerQuestWarning.kt | 6 ++-- .../features/slayer/SlayerRngMeterDisplay.kt | 14 ++++---- .../features/slayer/VampireSlayerFeatures.kt | 14 ++++---- .../slayer/blaze/BlazeSlayerClearView.kt | 10 +++--- .../slayer/blaze/BlazeSlayerDaggerHelper.kt | 12 +++---- .../blaze/BlazeSlayerFirePitsWarning.kt | 8 ++--- .../slayer/blaze/FirePillarDisplay.kt | 6 ++-- .../slayer/blaze/HellionShieldHelper.kt | 6 ++-- .../slayer/enderman/EndermanSlayerFeatures.kt | 14 ++++---- .../enderman/EndermanSlayerHideParticles.kt | 8 ++--- .../stranded/HighlightPlaceableNpcs.kt | 11 +++--- .../summonings/SummoningMobManager.kt | 14 ++++---- .../features/summonings/SummoningSoulsName.kt | 8 ++--- .../skyhanni/mixins/hooks/GuiContainerHook.kt | 18 +++++----- .../mixins/hooks/GuiPlayerTabOverlayHook.kt | 2 +- .../skyhanni/mixins/hooks/GuiScreenHook.kt | 2 +- .../skyhanni/mixins/hooks/RenderItemHook.kt | 4 +-- .../mixins/hooks/RenderLivingEntityHelper.kt | 4 +-- .../mixins/transformers/MixinGuiChat.java | 4 +-- .../MixinNetHandlerPlayClient.java | 2 +- .../transformers/MixinRenderManager.java | 2 +- .../UpdateDataWatcherEventPatch.java | 2 +- .../renderer/MixinRendererLivingEntity.java | 2 +- .../hannibal2/skyhanni/test/DebugCommand.kt | 2 +- .../test/HighlightMissingRepoItems.kt | 7 ++-- .../skyhanni/test/ParkourWaypointSaver.kt | 6 ++-- .../hannibal2/skyhanni/test/ShowItemUuid.kt | 6 ++-- .../skyhanni/test/SkyHanniDebugsAndTests.kt | 30 ++++++++-------- .../skyhanni/test/TestCopyBestiaryValues.kt | 6 ++-- .../skyhanni/test/TestCopyRngMeterValues.kt | 6 ++-- .../skyhanni/test/TestExportTools.kt | 6 ++-- .../skyhanni/test/TestShowSlotNumber.kt | 4 +-- .../at/hannibal2/skyhanni/test/WorldEdit.kt | 6 ++-- .../skyhanni/test/command/ErrorManager.kt | 4 +-- .../skyhanni/test/command/TestChatCommand.kt | 2 +- .../test/command/TrackParticlesCommand.kt | 10 +++--- .../test/command/TrackSoundsCommand.kt | 10 +++--- .../skyhanni/test/graph/GraphEditor.kt | 9 +++-- .../test/graph/GraphEditorBugFinder.kt | 4 +-- .../skyhanni/test/graph/GraphNodeEditor.kt | 4 +-- .../test/hotswap/HotswapSupportImpl.kt | 6 ++-- .../at/hannibal2/skyhanni/utils/ChatUtils.kt | 4 +-- .../skyhanni/utils/ComputerEnvDebug.kt | 4 +-- .../skyhanni/utils/ComputerTimeOffset.kt | 6 ++-- .../skyhanni/utils/EntityOutlineRenderer.kt | 8 ++--- .../hannibal2/skyhanni/utils/EntityUtils.kt | 9 ++--- .../skyhanni/utils/EssenceItemUtils.kt | 4 +-- .../at/hannibal2/skyhanni/utils/ItemUtils.kt | 4 +-- .../skyhanni/utils/KeyboardManager.kt | 13 +++---- .../skyhanni/utils/MinecraftConsoleFilter.kt | 4 +-- .../at/hannibal2/skyhanni/utils/NEUItems.kt | 7 ++-- .../hannibal2/skyhanni/utils/TabListData.kt | 9 +++-- .../skyhanni/utils/renderables/DragNDrop.kt | 7 ++-- .../utils/renderables/RenderableTooltips.kt | 1 + .../utils/repopatterns/RepoPatternManager.kt | 6 ++-- 569 files changed, 2441 insertions(+), 2488 deletions(-) diff --git a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt index e48d618ffdcb..3fba88edea9c 100644 --- a/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt +++ b/src/main/java/at/hannibal2/skyhanni/SkyHanniMod.kt @@ -32,7 +32,7 @@ import net.minecraftforge.fml.common.Loader import net.minecraftforge.fml.common.Mod import net.minecraftforge.fml.common.event.FMLInitializationEvent import net.minecraftforge.fml.common.event.FMLPreInitializationEvent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import org.apache.logging.log4j.Level import org.apache.logging.log4j.LogManager import org.apache.logging.log4j.Logger @@ -90,7 +90,7 @@ class SkyHanniMod { MinecraftForge.EVENT_BUS.register(obj) } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (screenToOpen != null) { screenTicks++ diff --git a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt index 2584b6616406..737e52b680d5 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/CollectionAPI.kt @@ -19,7 +19,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object CollectionAPI { @@ -44,12 +44,12 @@ object CollectionAPI { "Mushroom" to "RED_MUSHROOM".asInternalName() ) - @SubscribeEvent + @HandleEvent fun onProfileJoin(event: ProfileJoinEvent) { collectionValue.clear() } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { val inventoryName = event.inventoryName if (inventoryName.endsWith(" Collection")) { @@ -87,7 +87,7 @@ object CollectionAPI { } } - @SubscribeEvent + @HandleEvent fun onItemAdd(event: ItemAddEvent) { if (event.source == ItemAddManager.Source.COMMAND) return val internalName = event.internalName diff --git a/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt index e7e7fd2b5ac3..e7e4c2373697 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/DataWatcherAPI.kt @@ -3,18 +3,18 @@ package at.hannibal2.skyhanni.api import at.hannibal2.skyhanni.events.DataWatcherUpdatedEvent import at.hannibal2.skyhanni.events.EntityCustomNameUpdateEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object DataWatcherAPI { private const val DATA_VALUE_CUSTOM_NAME = 2 - @SubscribeEvent + @HandleEvent fun onDataWatcherUpdate(event: DataWatcherUpdatedEvent) { for (updatedEntry in event.updatedEntries) { if (updatedEntry.dataValueId == DATA_VALUE_CUSTOM_NAME) { - EntityCustomNameUpdateEvent(event.entity.customNameTag, event.entity).postAndCatch() + EntityCustomNameUpdateEvent(event.entity.customNameTag, event.entity).post() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt b/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt index 0adb824a5a6a..397ef646978c 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/FmlEventApi.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.events.entity.EntityEnterWorldEvent import at.hannibal2.skyhanni.events.minecraft.ClientDisconnectEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraftforge.event.entity.EntityJoinWorldEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.network.FMLNetworkEvent diff --git a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt index ee0641ddc3f6..83572a20d1e9 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/GetFromSackAPI.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.api import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.SackAPI import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent @@ -27,7 +28,6 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.inventory.Slot -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.Deque import java.util.LinkedList import kotlin.time.Duration.Companion.seconds @@ -86,7 +86,7 @@ object GetFromSackAPI { private fun addToInventory(items: List, slotId: Int) = inventoryMap.put(slotId, items) - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (queue.isNotEmpty() && lastTimeOfCommand.passedSince() >= minimumDelay) { @@ -97,12 +97,12 @@ object GetFromSackAPI { } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inventoryMap.clear() } - @SubscribeEvent + @HandleEvent fun onSlotClicked(event: GuiContainerEvent.SlotClickEvent) { if (!LorenzUtils.inSkyBlock) return if (event.clickedButton != 1) return // filter none right clicks @@ -111,7 +111,7 @@ object GetFromSackAPI { event.cancel() } - @SubscribeEvent + @HandleEvent fun onTooltip(event: SkyhanniToolTipEvent) { if (!LorenzUtils.inSkyBlock) return val list = inventoryMap[event.slot.slotIndex] ?: return @@ -122,7 +122,7 @@ object GetFromSackAPI { } } - @SubscribeEvent + @HandleEvent fun onMessageToServer(event: MessageSendToServerEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.queuedGFS && !config.bazaarGFS) return @@ -201,7 +201,7 @@ object GetFromSackAPI { return CommandResult.VALID to PrimitiveItemStack(item, amountString.toDouble().toInt()) } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!config.bazaarGFS || LorenzUtils.noTradeMode) return diff --git a/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt index 534d38d47c82..10be3871a529 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/ReforgeAPI.kt @@ -20,7 +20,7 @@ import com.google.gson.TypeAdapter import com.google.gson.stream.JsonReader import com.google.gson.stream.JsonWriter import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object ReforgeAPI { @@ -151,7 +151,7 @@ object ReforgeAPI { override fun toString(): String = "Reforge $name" } - @SubscribeEvent + @HandleEvent fun onNeuRepoReload(event: NeuRepositoryReloadEvent) { val reforgeStoneData = event.readConstant>("reforgestones", reforgeGson).values val reforgeData = event.readConstant>("reforges", reforgeGson).values diff --git a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt index 95e39d1f73a7..d51015b673a1 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/SkillAPI.kt @@ -35,7 +35,7 @@ import at.hannibal2.skyhanni.utils.TabListData import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.annotations.Expose import net.minecraft.command.CommandBase -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import java.util.LinkedList import java.util.regex.Matcher import kotlin.time.Duration.Companion.seconds @@ -86,7 +86,7 @@ object SkillAPI { var showDisplay = false var lastUpdate = SimpleTimeMark.farPast() - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { val activeSkill = activeSkill ?: return val info = skillXPInfoMap[activeSkill] ?: return @@ -108,7 +108,7 @@ object SkillAPI { } } - @SubscribeEvent + @HandleEvent fun onActionBarUpdate(event: ActionBarUpdateEvent) { val actionBar = event.actionBar.removeColor() val components = SPACE_SPLITTER.splitToList(actionBar) @@ -129,7 +129,7 @@ object SkillAPI { skillMultiplierPattern -> handleSkillPatternMultiplier(matcher, skillType, skillInfo) } - SkillExpGainEvent(skillType, matcher.group("gained").formatDouble()).postAndCatch() + SkillExpGainEvent(skillType, matcher.group("gained").formatDouble()).post() showDisplay = true lastUpdate = SimpleTimeMark.now() @@ -142,14 +142,14 @@ object SkillAPI { } } - @SubscribeEvent + @HandleEvent fun onNEURepoReload(event: NeuRepositoryReloadEvent) { levelArray = event.readConstant("leveling").levelingXp levelingMap = levelArray.withIndex().associate { (index, xp) -> index to xp } exactLevelingMap = levelArray.withIndex().associate { (index, xp) -> xp to index } } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { val inventoryName = event.inventoryName for (stack in event.inventoryItems.values) { @@ -213,7 +213,7 @@ object SkillAPI { } } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Skills") val storage = storage @@ -266,7 +266,7 @@ object SkillAPI { currentXp ) if (skillInfo.overflowLevel > 60 && levelOverflow == skillInfo.overflowLevel + 1) - SkillOverflowLevelUpEvent(skillType, skillInfo.overflowLevel, levelOverflow).postAndCatch() + SkillOverflowLevelUpEvent(skillType, skillInfo.overflowLevel, levelOverflow).post() skillInfo.apply { this.level = level diff --git a/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt index 97fcbf3c6f62..897aa222eff9 100644 --- a/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt +++ b/src/main/java/at/hannibal2/skyhanni/api/event/SkyHanniEvents.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import java.lang.reflect.Method @SkyHanniModule @@ -46,14 +46,14 @@ object SkyHanniEvents { .addListener(method, instance, options) } - @SubscribeEvent + @HandleEvent fun onRepoLoad(event: RepositoryReloadEvent) { val data = event.getConstant("DisabledEvents") disabledHandlers = data.disabledHandlers disabledHandlerInvokers = data.disabledInvokers } - @SubscribeEvent + @HandleEvent fun onDebug(event: DebugDataCollectEvent) { event.title("Events") event.addIrrelevant { diff --git a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt index 7cc1bef8a7b9..151b6837142e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ActionBarData.kt @@ -13,7 +13,7 @@ object ActionBarData { fun getActionBar() = actionBar - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { actionBar = "" } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt b/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt index b2145db767c5..dd2417420088 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ActionBarStatsData.kt @@ -1,12 +1,12 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.ActionBarUpdateEvent import at.hannibal2.skyhanni.events.ActionBarValueUpdateEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.intellij.lang.annotations.Language enum class ActionBarStatsData(@Language("RegExp") rawPattern: String) { @@ -45,7 +45,7 @@ enum class ActionBarStatsData(@Language("RegExp") rawPattern: String) { entries.forEach { it.pattern } } - @SubscribeEvent + @HandleEvent fun onActionBarUpdate(event: ActionBarUpdateEvent) { if (!LorenzUtils.inSkyBlock) return @@ -57,7 +57,7 @@ enum class ActionBarStatsData(@Language("RegExp") rawPattern: String) { ActionBarValueUpdateEvent(data) } else null } - }.forEach { it.postAndCatch() } + }.forEach { it.post() } } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt index 7da2c98b77c6..0fa8d2cce5fb 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BitsAPI.kt @@ -21,7 +21,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeResets import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.days @SkyHanniModule @@ -143,7 +143,7 @@ object BitsAPI { "^(§aCommunity Shop|§eFame Rank)$", ) - @SubscribeEvent + @HandleEvent fun onScoreboardChange(event: ScoreboardUpdateEvent) { if (!isEnabled()) return for (line in event.scoreboard) { @@ -166,7 +166,7 @@ object BitsAPI { } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() @@ -206,7 +206,7 @@ object BitsAPI { fun bitsPerCookie(): Int = (defaultCookieBits * (currentFameRank?.bitsMultiplier ?: 1.0)).toInt() - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return @@ -311,14 +311,14 @@ object BitsAPI { fun hasCookieBuff() = cookieBuffTime?.isInFuture() ?: false private fun sendBitsGainEvent(difference: Int) = - BitsUpdateEvent.BitsGain(bits, bitsAvailable, difference).postAndCatch() + BitsUpdateEvent.BitsGain(bits, bitsAvailable, difference).post() - private fun sendBitsSpentEvent() = BitsUpdateEvent.BitsSpent(bits, bitsAvailable).postAndCatch() - private fun sendBitsAvailableGainedEvent() = BitsUpdateEvent.BitsAvailableGained(bits, bitsAvailable).postAndCatch() + private fun sendBitsSpentEvent() = BitsUpdateEvent.BitsSpent(bits, bitsAvailable).post() + private fun sendBitsAvailableGainedEvent() = BitsUpdateEvent.BitsAvailableGained(bits, bitsAvailable).post() fun isEnabled() = LorenzUtils.inSkyBlock && profileStorage != null - @SubscribeEvent + @HandleEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(35, "#profile.bits.bitsToClaim", "#profile.bits.bitsAvailable") } diff --git a/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt b/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt index 0dcc1714e1a1..ec135d96b187 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BlockData.kt @@ -15,10 +15,10 @@ object BlockData { if (event.packet is S23PacketBlockChange) { val blockPos = event.packet.blockPosition ?: return val blockState = event.packet.blockState ?: return - ServerBlockChangeEvent(blockPos, blockState).postAndCatch() + ServerBlockChangeEvent(blockPos, blockState).post() } else if (event.packet is S22PacketMultiBlockChange) { for (block in event.packet.changedBlocks) { - ServerBlockChangeEvent(block.pos, block.blockState).postAndCatch() + ServerBlockChangeEvent(block.pos, block.blockState).post() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt index 120bb1f69c0a..97c1a6d9ac79 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/BossbarData.kt @@ -5,7 +5,7 @@ import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.WorldChangeEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.entity.boss.BossStatus -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object BossbarData { @@ -14,14 +14,14 @@ object BossbarData { fun getBossbar() = bossbar ?: "" - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { val oldBossbar = bossbar ?: return previousServerBossbar = oldBossbar bossbar = null } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { val bossbarLine = BossStatus.bossName ?: return if (bossbarLine.isBlank() || bossbarLine.isEmpty()) return @@ -30,6 +30,6 @@ object BossbarData { if (previousServerBossbar.isNotEmpty()) previousServerBossbar = "" bossbar = bossbarLine - BossbarUpdateEvent(bossbarLine).postAndCatch() + BossbarUpdateEvent(bossbarLine).post() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt index f414901bbbf5..015e782a624e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt @@ -109,7 +109,7 @@ object ChatManager { trimmedMessage, trimmedMessage.split(" "), originatingModContainer - ).postAndCatch() + ).post() ) { event.cancel() messageHistory[IdentityCharacteristics(component)] = result.copy(actionKind = ActionKind.OUTGOING_BLOCKED) @@ -129,7 +129,7 @@ object ChatManager { } val key = IdentityCharacteristics(original) val chatEvent = SkyhanniChatEvent(message, original) - chatEvent.postAndCatch() + chatEvent.post() val blockReason = chatEvent.blockedReason.uppercase() if (blockReason != "") { diff --git a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt index d1923a938dfb..5a79792a66d4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/CropAccessoryData.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object CropAccessoryData { @@ -25,13 +25,13 @@ object CropAccessoryData { private var accessoryInBag = CropAccessory.NONE private var accessoryInInventory = CropAccessory.NONE - @SubscribeEvent + @HandleEvent fun onProfileJoin(event: ProfileJoinEvent) { accessoryInBag = CropAccessory.NONE accessoryInInventory = CropAccessory.NONE } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryUpdatedEvent) { if (!accessoryBagNamePattern.matches(event.inventoryName)) return @@ -42,7 +42,7 @@ object CropAccessoryData { } } - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { if (!LorenzUtils.inSkyBlock) return if (!event.repeatSeconds(5)) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt index 6d99da74e585..fd3d004c721a 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt @@ -25,7 +25,6 @@ import net.minecraft.entity.item.EntityItemFrame import net.minecraft.entity.item.EntityXPOrb import net.minecraft.network.play.server.S1CPacketEntityMetadata import net.minecraft.util.ChatComponentText -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds @SkyHanniModule @@ -44,7 +43,7 @@ object EntityData { EntityPlayerSP::class.java, ) - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { for (entity in EntityUtils.getEntities()) { // this completely ignores the ignored entities list? val maxHealth = entity.baseMaxHealth @@ -52,7 +51,7 @@ object EntityData { val oldMaxHealth = maxHealthMap.getOrDefault(id, -1) if (oldMaxHealth != maxHealth) { maxHealthMap[id] = maxHealth - EntityMaxHealthUpdateEvent(entity, maxHealth.derpy()).postAndCatch() + EntityMaxHealthUpdateEvent(entity, maxHealth.derpy()).post() } } } @@ -62,7 +61,7 @@ object EntityData { maxHealthMap -= event.entity.entityId } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { maxHealthMap.clear() } @@ -83,7 +82,7 @@ object EntityData { val health = (it.`object` as Float).toInt() if (entity is EntityWither && health == 300 && entityId < 0) return if (entity is EntityLivingBase) { - EntityHealthUpdateEvent(entity, health.derpy()).postAndCatch() + EntityHealthUpdateEvent(entity, health.derpy()).post() } } } @@ -100,14 +99,14 @@ object EntityData { private fun postRenderNametag(entity: Entity, chatComponent: ChatComponentText) = nametagCache.getOrPut(entity) { val event = EntityDisplayNameEvent(entity, chatComponent) - event.postAndCatch() + event.post() event.chatComponent } @JvmStatic fun getHealthDisplay(text: String) = healthDisplayCache.getOrPut(text) { val event = EntityHealthDisplayEvent(text) - event.postAndCatch() + event.post() event.text } diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt index 5885a6524507..3b02ee80696e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EntityMovementData.kt @@ -17,7 +17,7 @@ import at.hannibal2.skyhanni.utils.getLorenzVec import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft import net.minecraft.entity.Entity -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds @@ -47,7 +47,7 @@ object EntityMovementData { } } - @SubscribeEvent + @HandleEvent fun onIslandChange(event: IslandChangeEvent) { val nextData = nextTeleport ?: return if (nextData.island != event.newIsland) return @@ -63,7 +63,7 @@ object EntityMovementData { nextTeleport = null } - @SubscribeEvent + @HandleEvent fun onPlayerMove(event: EntityMoveEvent) { if (!LorenzUtils.inSkyBlock || event.entity != Minecraft.getMinecraft().thePlayer) return @@ -81,7 +81,7 @@ object EntityMovementData { } } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return addToTrack(Minecraft.getMinecraft().thePlayer) @@ -94,12 +94,12 @@ object EntityMovementData { val distance = newLocation.distance(oldLocation) if (distance > 0.01) { entityLocation[entity] = newLocation - EntityMoveEvent(entity, oldLocation, newLocation, distance).postAndCatch() + EntityMoveEvent(entity, oldLocation, newLocation, distance).post() } } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (!warpingPattern.matches(event.message)) return @@ -108,7 +108,7 @@ object EntityMovementData { } } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { entityLocation.clear() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt b/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt index 6e308c18965f..6716de60f5d6 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/EventCounter.kt @@ -7,7 +7,7 @@ import at.hannibal2.skyhanni.utils.CollectionUtils.addOrPut import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.NumberUtil.addSeparators import at.hannibal2.skyhanni.utils.SimpleTimeMark -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -20,7 +20,7 @@ object EventCounter { private var enabled = false - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { enabled = LorenzUtils.onHypixel && config.eventCounter } diff --git a/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt b/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt index 750f1294390e..c0420de1460b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FameRanks.kt @@ -3,7 +3,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.data.jsonobjects.repo.FameRankJson import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object FameRanks { @@ -12,7 +12,7 @@ object FameRanks { fun getFameRankByNameOrNull(name: String) = fameRanks[name] - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { val ranks = event.getConstant("FameRank") fameRanks = ranks.fameRank.values.map { FameRank(it.name, it.fameRequired, it.bitsMultiplier, it.votes) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt index 36dc3c6f0b24..773fa6792901 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FixedRateTimerManager.kt @@ -14,7 +14,7 @@ object FixedRateTimerManager { fixedRateTimer(name = "skyhanni-fixed-rate-timer-manager", period = 1000L) { DelayedRun.onThread.execute { if (!LorenzUtils.onHypixel) return@execute - SecondPassedEvent(totalSeconds).postAndCatch() + SecondPassedEvent(totalSeconds).post() totalSeconds++ } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt index b159374e3000..bb8c55d6c73f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/FriendAPI.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.util.ChatStyle -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import java.util.UUID @SkyHanniModule @@ -55,7 +55,7 @@ object FriendAPI { FriendsJson.PlayerFriends().also { it.friends = mutableMapOf() } }.friends - @SubscribeEvent + @HandleEvent fun onHypixelJoin(event: HypixelJoinEvent) { if (SkyHanniMod.friendsData.players == null) { SkyHanniMod.friendsData.players = mutableMapOf() @@ -74,7 +74,7 @@ object FriendAPI { SkyHanniMod.configManager.saveConfig(ConfigFileType.FRIENDS, "Save file") } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { readFriendsList(event) diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt index 18093b880b86..90a8f2069b96 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenComposterUpgradesData.kt @@ -8,12 +8,12 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ItemUtils.name import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimalIfNecessary import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object GardenComposterUpgradesData { - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!GardenAPI.inGarden()) return if (event.inventoryName != "Composter Upgrades") return diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt index d8fab21f44cf..eed7c3e954e8 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestones.kt @@ -15,7 +15,7 @@ import at.hannibal2.skyhanni.utils.SoundUtils import at.hannibal2.skyhanni.utils.SoundUtils.playSound import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object GardenCropMilestones { @@ -40,7 +40,7 @@ object GardenCropMilestones { return null } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (event.inventoryName != "Crop Milestones") return @@ -183,7 +183,7 @@ object GardenCropMilestones { return (progress - startCrops).toDouble() / (end - startCrops) } - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { cropMilestoneData = event.getConstant("Garden").cropMilestones } diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt index 691a3c8e262b..b82c20f7bc78 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropMilestonesCommunityFix.kt @@ -24,7 +24,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import kotlinx.coroutines.launch import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object GardenCropMilestonesCommunityFix { @@ -36,7 +36,7 @@ object GardenCropMilestonesCommunityFix { private var showWrongData = false private var showWhenAllCorrect = false - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { val data = event.getConstant("Garden") val map = data.cropMilestoneCommunityHelp diff --git a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt index 0e8cd53e282c..74e7131efa97 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GardenCropUpgrades.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object GardenCropUpgrades { @@ -29,7 +29,7 @@ object GardenCropUpgrades { private val cropUpgrades: MutableMap? get() = GardenAPI.storage?.cropUpgrades - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!GardenAPI.inGarden()) return @@ -40,7 +40,7 @@ object GardenCropUpgrades { } } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!GardenAPI.inGarden()) return if (event.inventoryName != "Crop Upgrades") return diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt index 1f9d332fe38b..dea54f4f9de2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiData.kt @@ -29,7 +29,7 @@ object GuiData { if (preDrawEventCancelled) event.cancel() } - @SubscribeEvent(priority = EventPriority.HIGH) + @HandleEvent(priority = HandleEvent.HIGH) fun onClick(event: GuiContainerEvent.SlotClickEvent) { if (preDrawEventCancelled) event.cancel() } @@ -59,7 +59,7 @@ object GuiData { if (preDrawEventCancelled) event.isCanceled = true } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { DelayedRun.runNextTick { if (Minecraft.getMinecraft().currentScreen !is GuiChest) { @@ -68,7 +68,7 @@ object GuiData { } } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { preDrawEventCancelled = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt index 145037643dba..27285efa67ed 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuiEditManager.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.core.config.Position import at.hannibal2.skyhanni.config.core.config.gui.GuiPositionEditor import at.hannibal2.skyhanni.events.GuiPositionMovedEvent @@ -23,8 +24,6 @@ import net.minecraft.client.gui.inventory.GuiContainer import net.minecraft.client.gui.inventory.GuiEditSign import net.minecraft.client.gui.inventory.GuiInventory import net.minecraft.client.renderer.GlStateManager -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.lwjgl.input.Keyboard import org.lwjgl.opengl.GL11 import java.util.UUID @@ -41,7 +40,7 @@ object GuiEditManager { private var currentBorderSize = mutableMapOf>() private var lastMovedGui: String? = null - @SubscribeEvent + @HandleEvent fun onKeyClick(event: KeyPressEvent) { if (event.keyCode != SkyHanniMod.feature.gui.keyBindOpen) return if (event.keyCode == Keyboard.KEY_RETURN) { @@ -62,17 +61,17 @@ object GuiEditManager { openGuiPositionEditor(hotkeyReminder = false) } - @SubscribeEvent(priority = EventPriority.LOWEST) + @HandleEvent(priority = HandleEvent.LOWEST) fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { GlStateManager.color(1f, 1f, 1f, 1f) GlStateManager.enableBlend() GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0) } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { lastMovedGui?.let { - GuiPositionMovedEvent(it).postAndCatch() + GuiPositionMovedEvent(it).post() lastMovedGui = null } } @@ -114,11 +113,11 @@ object GuiEditManager { GlStateManager.translate(0f, 0f, 200f) - GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch() + GuiRenderEvent.GuiOverlayRenderEvent().post() GlStateManager.pushMatrix() GlStateManager.enableDepth() - GuiRenderEvent.ChestGuiOverlayRenderEvent().postAndCatch() + GuiRenderEvent.ChestGuiOverlayRenderEvent().post() GlStateManager.popMatrix() GlStateManager.translate(0f, 0f, -200f) diff --git a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt index d9b501eebda2..f7c8b1b6d3a4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/GuildAPI.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.SkyhanniChatEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.StringUtils.cleanPlayerName -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object GuildAPI { @@ -11,7 +11,7 @@ object GuildAPI { private var inGuildMessage = false private val list = mutableListOf() - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { val message = event.message if (message.startsWith("§6Guild Name: ")) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt index c5aa22e66fd7..cfb2f2c3b2c5 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HighlightOnHoverSlot.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent @@ -8,24 +9,22 @@ import at.hannibal2.skyhanni.utils.InventoryUtils import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.highlight -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object HighlightOnHoverSlot { val currentSlots = mutableMapOf, List>() - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryOpenEvent) { currentSlots.clear() } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { currentSlots.clear() } - @SubscribeEvent(priority = EventPriority.LOW) + @HandleEvent(priority = HandleEvent.LOW) fun onDrawBackground(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!LorenzUtils.inSkyBlock) return val list = currentSlots.flatMapTo(mutableSetOf()) { it.value } diff --git a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt index 5d9b94e6737c..24ecf6cb1e10 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HotmData.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.HotmAPI import at.hannibal2.skyhanni.api.HotmAPI.MayhemPerk import at.hannibal2.skyhanni.api.HotmAPI.SkymallPerk +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.storage.ProfileSpecificStorage import at.hannibal2.skyhanni.data.jsonobjects.local.HotmTree import at.hannibal2.skyhanni.data.model.TabWidget @@ -33,7 +34,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.StringUtils.allLettersFirstUppercase import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.inventory.Slot -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.math.pow private fun calculateCoreOfTheMountainLoot(level: Int): Map = buildMap { @@ -675,7 +675,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onScoreboardUpdate(event: ScoreboardUpdateEvent) { if (!LorenzUtils.inSkyBlock) return @@ -690,7 +690,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { if (!inInventory) return inInventory = false @@ -698,7 +698,7 @@ enum class HotmData( heartItem = null } - @SubscribeEvent + @HandleEvent fun onInventoryFullyOpen(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return inInventory = inventoryPattern.matches(event.inventoryName) @@ -711,7 +711,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onWidgetUpdate(event: WidgetUpdateEvent) { if (!event.isWidget(TabWidget.POWDER)) return event.lines.forEach { @@ -727,7 +727,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return if (resetChatPattern.matches(event.message)) { @@ -765,14 +765,14 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onWorldSwitch(event: IslandChangeEvent) { if (HotmAPI.mineshaftMayhem == null) return HotmAPI.mineshaftMayhem = null ChatUtils.debug("resetting mineshaftMayhem") } - @SubscribeEvent + @HandleEvent fun onProfileSwitch(event: ProfileJoinEvent) { HotmAPI.PowderType.entries.forEach { if (it.getStorage() == null) { @@ -784,7 +784,7 @@ enum class HotmData( } } - @SubscribeEvent + @HandleEvent fun onDebug(event: DebugDataCollectEvent) { event.title("HotM") event.addIrrelevant { diff --git a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt index 28824cbaae26..876ca7a933ba 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/HypixelData.kt @@ -34,7 +34,6 @@ import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.JsonObject import io.github.moulberry.notenoughupdates.NotEnoughUpdates import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.concurrent.thread import kotlin.time.Duration.Companion.seconds @@ -192,7 +191,7 @@ object HypixelData { ) } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Server ID") if (!LorenzUtils.inSkyBlock) { @@ -288,7 +287,7 @@ object HypixelData { private var loggerIslandChange = LorenzLogger("debug/island_change") - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { locrawData = null skyBlock = false @@ -314,12 +313,12 @@ object HypixelData { hasScoreboardUpdated = false } - @SubscribeEvent + @HandleEvent fun onScoreboardUpdate(event: ScoreboardUpdateEvent) { hasScoreboardUpdated = true } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.onHypixel) return @@ -328,14 +327,14 @@ object HypixelData { val newProfile = message.replace("your profile was changed to:", "").replace("(co-op)", "").trim() if (profileName == newProfile) return profileName = newProfile - ProfileJoinEvent(newProfile).postAndCatch() + ProfileJoinEvent(newProfile).post() } if (message.startsWith("you are playing on profile:")) { val newProfile = message.replace("you are playing on profile:", "").replace("(co-op)", "").trim() ProfileStorageData.profileJoinMessage() if (profileName == newProfile) return profileName = newProfile - ProfileJoinEvent(newProfile).postAndCatch() + ProfileJoinEvent(newProfile).post() } } @@ -346,12 +345,12 @@ object HypixelData { if (RiftAPI.inRift()) newProfile = newProfile.reversed() if (profileName == newProfile) return profileName = newProfile - ProfileJoinEvent(newProfile).postAndCatch() + ProfileJoinEvent(newProfile).post() } } // TODO rewrite everything in here - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) { checkNEULocraw() @@ -378,7 +377,7 @@ object HypixelData { if (!LorenzUtils.onHypixel) { checkHypixel() if (LorenzUtils.onHypixel) { - HypixelJoinEvent().postAndCatch() + HypixelJoinEvent.post() SkyHanniMod.repo.displayRepoStatus(true) } } @@ -411,7 +410,7 @@ object HypixelData { } } - @SubscribeEvent + @HandleEvent fun onTabListUpdate(event: WidgetUpdateEvent) { when (event.widget) { TabWidget.AREA -> checkIsland(event) @@ -425,7 +424,7 @@ object HypixelData { TabListData.getTabList().matchFirst(UtilsPatterns.tabListProfilePattern) { profileName = group("profile").lowercase() - ProfileJoinEvent(profileName).postAndCatch() + ProfileJoinEvent(profileName).post() } } @@ -503,7 +502,7 @@ object HypixelData { // TODO don't send events when one of the arguments is none, at least when not on sb anymore if (skyBlockIsland != islandType) { - IslandChangeEvent(islandType, skyBlockIsland).postAndCatch() + IslandChangeEvent(islandType, skyBlockIsland).post() if (islandType == IslandType.UNKNOWN) { ChatUtils.debug("Unknown island detected: '$foundIsland'") loggerIslandChange.log("Unknown: '$foundIsland'") diff --git a/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt b/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt index 32a795626c74..0cebf72e8494 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/IslandGraphs.kt @@ -35,7 +35,6 @@ import at.hannibal2.skyhanni.utils.chat.Text.onClick import at.hannibal2.skyhanni.utils.chat.Text.send import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color import java.io.File import kotlin.time.Duration.Companion.milliseconds @@ -137,21 +136,21 @@ object IslandGraphs { "(Glacite Tunnels|Dwarven Base Camp|Great Glacite Lake|Fossil Research Center)", ) - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { if (!LorenzUtils.inSkyBlock) return loadIsland(LorenzUtils.skyBlockIsland) } - @SubscribeEvent + @HandleEvent fun onIslandChange(event: IslandChangeEvent) { if (currentIslandGraph != null) return if (event.newIsland == IslandType.NONE) return loadIsland(event.newIsland) } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { currentIslandGraph = null if (currentTarget != null) { @@ -224,7 +223,7 @@ object IslandGraphs { closestNode = null } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (event.isMod(2)) { @@ -327,7 +326,7 @@ object IslandGraphs { } } - @SubscribeEvent + @HandleEvent fun onPlayerMove(event: EntityMoveEvent) { if (LorenzUtils.inSkyBlock && event.entity == Minecraft.getMinecraft().thePlayer) { hasMoved = true @@ -473,7 +472,7 @@ object IslandGraphs { componentText.send(PATHFIND_ID) } - @SubscribeEvent + @HandleEvent fun onRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return val path = fastestPath ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt index 409094fb5577..0b96a23414cc 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemAddManager.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.ItemAddEvent @@ -16,7 +17,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TimeLimitedSet import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds @@ -39,14 +39,14 @@ object ItemAddManager { private var inSackInventory = false private var lastSackInventoryLeave = SimpleTimeMark.farPast() - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryOpenEvent) { if (event.inventoryName.contains("Sack")) { inSackInventory = true } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { if (inSackInventory) { inSackInventory = false @@ -54,7 +54,7 @@ object ItemAddManager { } } - @SubscribeEvent + @HandleEvent fun onSackChange(event: SackChangeEvent) { if (!LorenzUtils.inSkyBlock) return @@ -70,7 +70,7 @@ object ItemAddManager { superCraftedItems.clear() } - @SubscribeEvent + @HandleEvent fun onItemAdd(event: ItemAddInInventoryEvent) { if (!LorenzUtils.inSkyBlock) return @@ -85,13 +85,13 @@ object ItemAddManager { } private fun Source.addItem(internalName: NEUInternalName, amount: Int) { - ItemAddEvent(internalName, amount, this).postAndCatch() + ItemAddEvent(internalName, amount, this).post() } private var lastDiceRoll = SimpleTimeMark.farPast() private var superCraftedItems = TimeLimitedSet(30.seconds) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (diceRollChatPattern.matches(event.message)) { lastDiceRoll = SimpleTimeMark.now() diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt index 2bcf589a3d50..26d7234a3881 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemClickData.kt @@ -64,7 +64,7 @@ object ItemClickData { } } - /* @SubscribeEvent + /* @HandleEvent fun onEntityClick(event: InputEvent) { if (!LorenzUtils.inSkyBlock) return @@ -83,6 +83,6 @@ object ItemClickData { if (minecraft.thePlayer == null) return if (clickedEntity == null) return - EntityClickEvent(clickType, clickedEntity, InventoryUtils.getItemInHand()).postAndCatch() + EntityClickEvent(clickType, clickedEntity, InventoryUtils.getItemInHand()).post() } */ } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt index fbbd78e138ba..5ebaff057fec 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemTipHelper.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.DrawScreenAfterEvent import at.hannibal2.skyhanni.events.GuiRenderItemEvent import at.hannibal2.skyhanni.events.RenderInventoryItemTipEvent @@ -14,19 +15,17 @@ import net.minecraft.client.Minecraft import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.client.renderer.GlStateManager import net.minecraft.inventory.ContainerChest -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object ItemTipHelper { - @SubscribeEvent + @HandleEvent fun onRenderItemOverlayPost(event: GuiRenderItemEvent.RenderOverlayEvent.GuiRenderItemPost) { val stack = event.stack ?: return if (!LorenzUtils.inSkyBlock || stack.stackSize != 1) return val itemTipEvent = RenderItemTipEvent(stack, mutableListOf()) - itemTipEvent.postAndCatch() + itemTipEvent.post() if (itemTipEvent.renderObjects.isEmpty()) return @@ -39,7 +38,7 @@ object ItemTipHelper { } } - @SubscribeEvent(priority = EventPriority.HIGHEST) + @HandleEvent(priority = HandleEvent.HIGHEST) fun onRenderInventoryItemOverlayPost(event: DrawScreenAfterEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniDebugsAndTests.globalRender) return @@ -60,7 +59,7 @@ object ItemTipHelper { val stack = slot.stack ?: continue val itemTipEvent = RenderInventoryItemTipEvent(inventoryName, slot, stack) - itemTipEvent.postAndCatch() + itemTipEvent.post() val stackTip = itemTipEvent.stackTip if (stackTip.isEmpty()) continue diff --git a/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt index 20dfbb615722..bc5664851943 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/LocationFixData.kt @@ -1,12 +1,11 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.LocationFixJson import at.hannibal2.skyhanni.events.RepositoryReloadEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LocationUtils.isPlayerInside import net.minecraft.util.AxisAlignedBB -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object LocationFixData { @@ -16,7 +15,7 @@ object LocationFixData { private data class LocationFix(val area: AxisAlignedBB, val realLocation: String) // priority set to low so that IslandType can load their island names from repo earlier - @SubscribeEvent(priority = EventPriority.LOW) + @HandleEvent(priority = HandleEvent.LOW) fun onRepoReload(event: RepositoryReloadEvent) { val data = event.getConstant("LocationFix") locationFixes.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt index 6ae287ee27f0..50dd02ace14f 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MaxwellAPI.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.data +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.MaxwellPowersJson import at.hannibal2.skyhanni.events.InventoryOpenEvent import at.hannibal2.skyhanni.events.RepositoryReloadEvent @@ -24,8 +25,6 @@ import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.annotations.Expose import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.regex.Pattern @SkyHanniModule @@ -128,7 +127,7 @@ object MaxwellAPI { fun isThaumaturgyInventory(inventoryName: String) = thaumaturgyGuiPattern.matches(inventoryName) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() @@ -159,7 +158,7 @@ object MaxwellAPI { } // load earlier, so that other features can already use the api in this event - @SubscribeEvent(priority = EventPriority.HIGH) + @HandleEvent(priority = HandleEvent.HIGH) fun onInventoryOpen(event: InventoryOpenEvent) { if (!isEnabled()) return @@ -305,7 +304,7 @@ object MaxwellAPI { private fun isEnabled() = LorenzUtils.inSkyBlock && storage != null // Load powers from repo - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { val data = event.getConstant("MaxwellPowers") powers = data.powers diff --git a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt index a6cc5805b47f..11810b650fb1 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MayorAPI.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.data.Mayor.Companion.addPerks import at.hannibal2.skyhanni.data.Mayor.Companion.getMayorFromPerk @@ -37,7 +38,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.hours import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.minutes @@ -119,7 +119,7 @@ object MayorAPI { */ fun mayorNameWithColorCode(input: String) = mayorNameToColorCode(input) + input - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { if (!LorenzUtils.onHypixel) return if (event.repeatSeconds(2)) { @@ -148,7 +148,7 @@ object MayorAPI { } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return @@ -159,7 +159,7 @@ object MayorAPI { } } - @SubscribeEvent + @HandleEvent fun onInventory(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return @@ -239,7 +239,7 @@ object MayorAPI { private fun List.bestCandidate() = maxBy { it.votes } - @SubscribeEvent + @HandleEvent fun onConfigReload(event: ConfigLoadEvent) { SkyHanniMod.feature.dev.debug.assumeMayor.onToggle { val mayor = SkyHanniMod.feature.dev.debug.assumeMayor.get() @@ -253,7 +253,7 @@ object MayorAPI { } } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Mayor") event.addIrrelevant { diff --git a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt index 0b923cd55858..8b3936278bee 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MinecraftData.kt @@ -34,7 +34,7 @@ object MinecraftData { LorenzVec(packet.x, packet.y, packet.z), packet.pitch, packet.volume - ).postAndCatch() + ).post() ) { event.cancel() } @@ -42,7 +42,7 @@ object MinecraftData { @SubscribeEvent fun onWorldChange(event: WorldEvent.Load) { - WorldChangeEvent().postAndCatch() + WorldChangeEvent.post() } @HandleEvent(receiveCancelled = true, onlyOnSkyblock = true) @@ -58,7 +58,7 @@ object MinecraftData { LorenzVec(packet.xOffset, packet.yOffset, packet.zOffset), packet.isLongDistance, packet.particleArgs, - ).postAndCatch() + ).post() ) { event.cancel() } @@ -73,10 +73,10 @@ object MinecraftData { DelayedRun.checkRuns() totalTicks++ - SkyhanniTickEvent(totalTicks).postAndCatch() + SkyhanniTickEvent(totalTicks).post() } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return val hand = InventoryUtils.getItemInHand() @@ -90,11 +90,11 @@ object MinecraftData { } InventoryUtils.itemInHandId = newItem InventoryUtils.latestItemInHand = hand - ItemInHandChangeEvent(newItem, oldItem).postAndCatch() + ItemInHandChangeEvent(newItem, oldItem).post() } } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { InventoryUtils.itemInHandId = NEUInternalName.NONE InventoryUtils.recentItemsInHand.clear() diff --git a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt index b021a4b0af3a..d233233e25c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/MiningAPI.kt @@ -33,7 +33,6 @@ import at.hannibal2.skyhanni.utils.TimeUtils.format import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import io.netty.util.internal.ConcurrentSet import net.minecraft.init.Blocks -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.concurrent.ConcurrentLinkedQueue import kotlin.math.absoluteValue import kotlin.time.Duration.Companion.milliseconds @@ -152,7 +151,7 @@ object MiningAPI { fun inColdIsland() = inAnyIsland(IslandType.DWARVEN_MINES, IslandType.MINESHAFT) - @SubscribeEvent + @HandleEvent fun onScoreboardChange(event: ScoreboardUpdateEvent) { val newCold = ScoreboardPattern.coldPattern.firstMatcher(event.scoreboard) { group("cold").toInt().absoluteValue @@ -171,7 +170,7 @@ object MiningAPI { recentClickedBlocks += event.position to SimpleTimeMark.now() } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!inColdIsland()) return if (coldResetPattern.matches(event.message)) { @@ -199,7 +198,7 @@ object MiningAPI { } - @SubscribeEvent + @HandleEvent fun onPlayerDeath(event: PlayerDeathEvent) { if (event.name == LorenzUtils.getPlayerName()) { updateCold(0) @@ -207,7 +206,7 @@ object MiningAPI { } } - @SubscribeEvent + @HandleEvent fun onPlaySound(event: PlaySoundEvent) { if (!inCustomMiningIsland()) return if (event.soundName == "random.explode" && lastPickobulusUse.passedSince() < 5.seconds) { @@ -242,7 +241,7 @@ object MiningAPI { } } - @SubscribeEvent + @HandleEvent fun onBlockChange(event: ServerBlockChangeEvent) { if (!inCustomMiningIsland()) return val oldState = event.oldState @@ -285,7 +284,7 @@ object MiningAPI { } } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!inCustomMiningIsland()) return if (currentAreaOreBlocks.isEmpty()) return @@ -309,7 +308,7 @@ object MiningAPI { updateLocation() } - @SubscribeEvent + @HandleEvent fun onIslandChange(event: IslandChangeEvent) { updateLocation() } @@ -333,7 +332,7 @@ object MiningAPI { recentClickedBlocks.removeIf { it.second.passedSince() >= originalBlock.time.passedSince() } } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { if (cold != 0) updateCold(0) lastColdReset = SimpleTimeMark.now() @@ -367,7 +366,7 @@ object MiningAPI { lastOreMinedTime = SimpleTimeMark.now() } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Mining API") if (!inCustomMiningIsland()) { @@ -397,7 +396,7 @@ object MiningAPI { // Hypixel sends cold data once in scoreboard even after resetting it if (cold == 0 && lastColdUpdate.passedSince() < 1.seconds) return lastColdUpdate = SimpleTimeMark.now() - ColdUpdateEvent(newCold).postAndCatch() + ColdUpdateEvent(newCold).post() cold = newCold } diff --git a/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt b/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt index 2b8c6053cb2e..241a51aa7dac 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/NotificationManager.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.TimeUtils.format import at.hannibal2.skyhanni.utils.compat.GuiScreenUtils import io.github.notenoughupdates.moulconfig.internal.RenderUtils import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import org.lwjgl.input.Keyboard import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds @@ -28,7 +28,7 @@ object NotificationManager { private const val CLOSE_TEXT = "§c[X] Close" - @SubscribeEvent + @HandleEvent fun onKeyClick(event: KeyPressEvent) { currentNotification ?: return if (lastNotificationClosed.passedSince() < 200.milliseconds) return @@ -37,7 +37,7 @@ object NotificationManager { lastNotificationClosed = SimpleTimeMark.now() } - @SubscribeEvent + @HandleEvent fun onRenderOverlay(event: GuiRenderEvent) { val notification = getCurrentNotification() ?: return diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt index dc0d6b01b4e0..bb9902dd8053 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherInventoryData.kt @@ -12,7 +12,6 @@ import net.minecraft.item.ItemStack import net.minecraft.network.play.server.S2DPacketOpenWindow import net.minecraft.network.play.server.S2EPacketCloseWindow import net.minecraft.network.play.server.S2FPacketSetSlot -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object OtherInventoryData { @@ -21,20 +20,20 @@ object OtherInventoryData { private var acceptItems = false private var lateEvent: InventoryUpdatedEvent? = null - @SubscribeEvent + @HandleEvent fun onCloseWindow(event: GuiContainerEvent.CloseWindowEvent) { close() } fun close(reopenSameName: Boolean = false) { - InventoryCloseEvent(reopenSameName).postAndCatch() + InventoryCloseEvent(reopenSameName).post() currentInventory = null } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { lateEvent?.let { - it.postAndCatch() + it.post() lateEvent = null } } @@ -95,9 +94,9 @@ object OtherInventoryData { } private fun done(inventory: Inventory) { - InventoryFullyOpenedEvent(inventory).postAndCatch() + InventoryFullyOpenedEvent(inventory).post() inventory.fullyOpenedOnce = true - InventoryUpdatedEvent(inventory).postAndCatch() + InventoryUpdatedEvent(inventory).post() acceptItems = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/OtherPlayersSlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/OtherPlayersSlayerAPI.kt index 0401746c4edb..16c89818bdb4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OtherPlayersSlayerAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OtherPlayersSlayerAPI.kt @@ -6,12 +6,12 @@ import at.hannibal2.skyhanni.events.entity.slayer.SlayerDeathEvent import at.hannibal2.skyhanni.features.slayer.SlayerType import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.test.command.ErrorManager -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object OtherPlayersSlayerAPI { - @SubscribeEvent + @HandleEvent fun onMobDespawn(event: MobEvent.DeSpawn.SkyblockMob) { val mob = event.mob diff --git a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt index b025f6be0816..34486ef80b5b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/OwnInventoryData.kt @@ -27,7 +27,6 @@ import net.minecraft.client.Minecraft import net.minecraft.network.play.client.C0EPacketClickWindow import net.minecraft.network.play.server.S0DPacketCollectItem import net.minecraft.network.play.server.S2FPacketSetSlot -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds @@ -54,7 +53,7 @@ object OwnInventoryData { val slot = packet.func_149173_d() val item = packet.func_149174_e() ?: return DelayedRun.runNextTick { - OwnInventoryItemUpdateEvent(item, slot).postAndCatch() + OwnInventoryItemUpdateEvent(item, slot).post() } } } @@ -69,7 +68,7 @@ object OwnInventoryData { } } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (itemAmounts.isEmpty()) { @@ -95,7 +94,7 @@ object OwnInventoryData { return map } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { itemAmounts = emptyMap() } @@ -109,14 +108,14 @@ object OwnInventoryData { } } - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { val item = Minecraft.getMinecraft().thePlayer.inventory.itemStack ?: return val internalNameOrNull = item.getInternalNameOrNull() ?: return ignoreItem(500.milliseconds) { it == internalNameOrNull } } - @SubscribeEvent + @HandleEvent fun onSlotClick(event: GuiContainerEvent.SlotClickEvent) { ignoreItem(500.milliseconds) { true } @@ -161,7 +160,7 @@ object OwnInventoryData { } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { sackToInventoryChatPattern.matchMatcher(event.message) { val name = group("name") @@ -187,6 +186,6 @@ object OwnInventoryData { if (internalName.startsWith("MAP-")) return - ItemAddInInventoryEvent(internalName, add).postAndCatch() + ItemAddInInventoryEvent(internalName, add).post() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt index d586b8c8386f..e6df4bd62d10 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PartyAPI.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.StringUtils.removeResets import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.random.Random @SkyHanniModule @@ -106,13 +106,13 @@ object PartyAPI { } } - @SubscribeEvent + @HandleEvent fun onPartyChat(event: PartyChatEvent) { val name = event.author.cleanPlayerName() addPlayer(name) } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { val message = event.message.trimWhiteSpace().removeResets() diff --git a/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt b/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt index 7e50b02532f1..0e3f5b05a5b3 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PlayerDeathManager.kt @@ -6,7 +6,7 @@ import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object PlayerDeathManager { @@ -19,13 +19,13 @@ object PlayerDeathManager { "§c ☠ §r§7§r§.(?.+)§r§7 (?.+)", ) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { val message = event.message deathMessagePattern.matchMatcher(message) { val name = group("name") val reason = group("reason").removeColor() - PlayerDeathEvent(name, reason, event).postAndCatch() + PlayerDeathEvent(name, reason, event).post() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt index fa90a126a124..476aada60fd0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ProfileStorageData.kt @@ -20,7 +20,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TabListData import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -35,7 +35,7 @@ object ProfileStorageData { var sackProfiles: SackData.ProfileSpecific? = null var hypixelDataLoaded = false - @SubscribeEvent(priority = EventPriority.HIGHEST) + @HandleEvent(priority = HandleEvent.HIGHEST) fun onProfileJoin(event: ProfileJoinEvent) { val playerSpecific = playerSpecific val sackPlayers = sackPlayers @@ -51,7 +51,7 @@ object ProfileStorageData { } loadProfileSpecific(playerSpecific, sackPlayers, profileName) - ConfigLoadEvent().postAndCatch() + ConfigLoadEvent().post() } private fun workaroundIn10SecondsProfileStorage(profileName: String) { @@ -72,16 +72,16 @@ object ProfileStorageData { ErrorManager.skyHanniError("sackPlayers is null in ProfileJoinEvent!") } loadProfileSpecific(playerSpecific, sackPlayers, profileName) - ConfigLoadEvent().postAndCatch() + ConfigLoadEvent().post() } - @SubscribeEvent + @HandleEvent fun onTabListUpdate(event: WidgetUpdateEvent) { if (!event.isWidget(TabWidget.PROFILE)) return noTabListTime = if (event.isClear()) SimpleTimeMark.now() else SimpleTimeMark.farPast() } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return if (noTabListTime == SimpleTimeMark.farPast()) return @@ -120,18 +120,18 @@ object ProfileStorageData { profileSpecific = playerSpecific.profiles.getOrPut(profileName) { ProfileSpecificStorage() } sackProfiles = sackProfile.profiles.getOrPut(profileName) { SackData.ProfileSpecific() } loaded = true - ConfigLoadEvent().postAndCatch() + ConfigLoadEvent().post() } - @SubscribeEvent + @HandleEvent fun onHypixelJoin(event: HypixelJoinEvent) { val playerUuid = LorenzUtils.getRawPlayerUuid() playerSpecific = SkyHanniMod.feature.storage.players.getOrPut(playerUuid) { PlayerSpecificStorage() } sackPlayers = SkyHanniMod.sackData.players.getOrPut(playerUuid) { SackData.PlayerSpecific() } - ConfigLoadEvent().postAndCatch() + ConfigLoadEvent().post() } - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { hypixelDataLoaded = false } diff --git a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt index 0f029a1f2e2e..1fe3790bf0c4 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/PurseAPI.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchFirst import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -30,12 +30,12 @@ object PurseAPI { var currentPurse = 0.0 private set - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inventoryCloseTime = SimpleTimeMark.now() } - @SubscribeEvent + @HandleEvent fun onScoreboardChange(event: ScoreboardUpdateEvent) { event.scoreboard.matchFirst(coinsPattern) { val newPurse = group("coins").formatDouble() @@ -43,7 +43,7 @@ object PurseAPI { if (diff == 0.0) return currentPurse = newPurse - PurseChangeEvent(diff, getCause(diff)).postAndCatch() + PurseChangeEvent(diff, getCause(diff)).post() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt index aee77452b671..b683433ac834 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/QuiverAPI.kt @@ -27,7 +27,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeResets import at.hannibal2.skyhanni.utils.StringUtils.trimWhiteSpace import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.item.ItemBow -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule @@ -103,7 +103,7 @@ object QuiverAPI { "§7Active Arrow: §.(?.*) §7\\(§e(?.*)§7\\)" ) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!isEnabled()) return val message = event.message.trimWhiteSpace().removeResets() @@ -193,7 +193,7 @@ object QuiverAPI { } } - @SubscribeEvent + @HandleEvent fun onInventoryFullyLoaded(event: InventoryFullyOpenedEvent) { if (!isEnabled()) return if (!quiverInventoryNamePattern.matches(event.inventoryName)) return @@ -211,7 +211,7 @@ object QuiverAPI { } } - @SubscribeEvent + @HandleEvent fun onInventoryUpdate(event: OwnInventoryItemUpdateEvent) { if (!isEnabled() && event.slot != 44) return val stack = event.itemStack @@ -274,10 +274,10 @@ object QuiverAPI { } private fun postUpdateEvent(arrowType: ArrowType? = currentArrow) { - QuiverUpdateEvent(arrowType, currentAmount).postAndCatch() + QuiverUpdateEvent(arrowType, currentAmount).post() } - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { if (!isEnabled()) return if (event.repeatSeconds(2)) { @@ -287,7 +287,7 @@ object QuiverAPI { } // Load arrows from repo - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { val arrowData = event.getConstant("ArrowTypes") arrows = arrowData.arrows.map { ArrowType(it.value.arrow, it.key.asInternalName()) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt index fb7ec9a6103a..4fd5b84e2fc8 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/RenderData.kt @@ -15,6 +15,7 @@ import net.minecraft.client.renderer.GlStateManager import net.minecraftforge.client.event.GuiScreenEvent import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.client.event.RenderWorldLastEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule @@ -28,7 +29,7 @@ object RenderData { if (GuiEditManager.isInGui() || VisualWordGui.isInGui()) return GlStateManager.translate(0f, 0f, -3f) - GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch() + GuiRenderEvent.GuiOverlayRenderEvent().post() GlStateManager.translate(0f, 0f, 3f) } @@ -45,11 +46,11 @@ object RenderData { if (GuiEditManager.isInGui()) { GlStateManager.translate(0f, 0f, -3f) - GuiRenderEvent.GuiOverlayRenderEvent().postAndCatch() + GuiRenderEvent.GuiOverlayRenderEvent().post() GlStateManager.translate(0f, 0f, 3f) } - GuiRenderEvent.ChestGuiOverlayRenderEvent().postAndCatch() + GuiRenderEvent.ChestGuiOverlayRenderEvent().post() GlStateManager.popMatrix() } @@ -59,11 +60,11 @@ object RenderData { @SubscribeEvent fun onRenderWorld(event: RenderWorldLastEvent) { if (!SkyHanniDebugsAndTests.globalRender) return - SkyhanniRenderWorldEvent(event.partialTicks).postAndCatch() + SkyhanniRenderWorldEvent(event.partialTicks).post() } // TODO find better spot for this - @SubscribeEvent + @HandleEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.transform(17, "chroma.chromaDirection") { element -> ConfigUtils.migrateIntToEnum(element, ChromaConfig.Direction::class.java) diff --git a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt index 41bbe9ee77f0..bc9a1b62981e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SackAPI.kt @@ -33,7 +33,7 @@ import at.hannibal2.skyhanni.utils.StringUtils.removeNonAscii import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import com.google.gson.annotations.Expose import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object SackAPI { @@ -85,7 +85,7 @@ object SackAPI { var sackListNames = emptySet() private set - @SubscribeEvent + @HandleEvent fun onInventoryClose(event: InventoryCloseEvent) { inSackInventory = false isRuneSack = false @@ -97,7 +97,7 @@ object SackAPI { stackList.clear() } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { val inventoryName = event.inventoryName val isNewInventory = inventoryName != lastOpenedInventory @@ -225,7 +225,7 @@ object SackAPI { private val sackChangeRegex = Regex("""([+-][\d,]+) (.+) \((.+)\)""") - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!event.message.removeColor().startsWith("[Sacks]")) return @@ -257,13 +257,13 @@ object SackAPI { } val sackEvent = SackChangeEvent(sackChanges, otherItemsAdded, otherItemsRemoved) updateSacks(sackEvent) - sackEvent.postAndCatch() + sackEvent.post() if (chatConfig.hideSacksChange) { event.blockedReason = "sacks_change" } } - @SubscribeEvent + @HandleEvent fun onNeuRepoReload(event: NeuRepositoryReloadEvent) { val sacksData = event.readConstant("sacks").sacks val uniqueSackItems = mutableSetOf() diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt index 9ed661e02e9b..32609b8367dc 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScoreboardData.kt @@ -1,9 +1,9 @@ package at.hannibal2.skyhanni.data import at.hannibal2.skyhanni.api.event.HandleEvent -import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.RawScoreboardUpdateEvent import at.hannibal2.skyhanni.events.ScoreboardUpdateEvent +import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.events.minecraft.packet.PacketReceivedEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.ChatUtils @@ -15,8 +15,6 @@ import net.minecraft.network.play.server.S3CPacketUpdateScore import net.minecraft.network.play.server.S3EPacketTeams import net.minecraft.scoreboard.Score import net.minecraft.scoreboard.ScorePlayerTeam -import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object ScoreboardData { @@ -100,7 +98,7 @@ object ScoreboardData { println(" ") } - @SubscribeEvent(priority = EventPriority.HIGHEST) + @HandleEvent(priority = HandleEvent.HIGHEST) fun onTick(event: SkyhanniTickEvent) { if (!dirty) return dirty = false @@ -109,14 +107,14 @@ object ScoreboardData { val list = fetchScoreboardLines().reversed() val semiFormatted = list.map { cleanSB(it) } if (semiFormatted != sidebarLines) { - RawScoreboardUpdateEvent(semiFormatted).postAndCatch() + RawScoreboardUpdateEvent(semiFormatted).post() sidebarLines = semiFormatted } sidebarLinesRaw = list val new = formatLines(list) if (new != sidebarLinesFormatted) { - ScoreboardUpdateEvent(new).postAndCatch() + ScoreboardUpdateEvent(new).post() sidebarLinesFormatted = new } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt index c37fb6cbd3ae..7d7be280fc40 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ScreenData.kt @@ -4,19 +4,19 @@ import at.hannibal2.skyhanni.events.InventoryCloseEvent import at.hannibal2.skyhanni.events.SkyhanniTickEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object ScreenData { private var wasOpen = false - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { val isOpen = Minecraft.getMinecraft().currentScreen != null if (wasOpen == isOpen) return wasOpen = isOpen if (!wasOpen) { - InventoryCloseEvent(false).postAndCatch() + InventoryCloseEvent(false).post() } } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt b/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt index 367c3794e8d7..2b62fafeb39c 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SkillExperience.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.NumberUtil.romanToDecimal import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object SkillExperience { @@ -26,12 +26,12 @@ object SkillExperience { ".* §e(?.*)§6/.*" ) - @SubscribeEvent + @HandleEvent fun onProfileJoin(event: ProfileJoinEvent) { skillExp.clear() } - @SubscribeEvent + @HandleEvent fun onActionBarUpdate(event: ActionBarUpdateEvent) { if (!LorenzUtils.inSkyBlock) return @@ -46,7 +46,7 @@ object SkillExperience { } } - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (event.inventoryName != "Your Skills") return diff --git a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt index 5658ce3eeaa4..ac51621d2849 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/SlayerAPI.kt @@ -19,7 +19,7 @@ import at.hannibal2.skyhanni.utils.RecalculatingValue import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeLimitedCache -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds @@ -57,7 +57,7 @@ object SlayerAPI { } } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Slayer") @@ -74,7 +74,7 @@ object SlayerAPI { } } - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!LorenzUtils.inSkyBlock) return @@ -101,7 +101,7 @@ object SlayerAPI { return null } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.inSkyBlock) return @@ -112,12 +112,12 @@ object SlayerAPI { if (slayerQuest != latestSlayerCategory) { val old = latestSlayerCategory latestSlayerCategory = slayerQuest - SlayerChangeEvent(old, latestSlayerCategory).postAndCatch() + SlayerChangeEvent(old, latestSlayerCategory).post() } val slayerProgress = ScoreboardData.sidebarLinesFormatted.nextAfter("Slayer Quest", 2) ?: "" if (latestSlayerProgress != slayerProgress) { - SlayerProgressChangeEvent(latestSlayerProgress, slayerProgress).postAndCatch() + SlayerProgressChangeEvent(latestSlayerProgress, slayerProgress).post() latestSlayerProgress = slayerProgress } diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt index f8ad4f652fc3..a58e00a16a78 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TitleData.kt @@ -16,7 +16,7 @@ object TitleData { if (packet !is S45PacketTitle) return val message = packet.message ?: return val formattedText = message.formattedText - if (TitleReceivedEvent(formattedText).postAndCatch()) { + if (TitleReceivedEvent(formattedText).post()) { event.cancel() } } diff --git a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt index 95dbe1577f56..814e7cba80af 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TitleManager.kt @@ -9,7 +9,7 @@ import io.github.notenoughupdates.moulconfig.internal.TextRenderUtils import net.minecraft.client.Minecraft import net.minecraft.client.gui.ScaledResolution import net.minecraft.client.renderer.GlStateManager -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import org.lwjgl.opengl.GL11 import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds @@ -52,12 +52,12 @@ object TitleManager { sendTitle(title, duration, height, fontSize) } - @SubscribeEvent + @HandleEvent fun onProfileJoin(event: ProfileJoinEvent) { endTime = SimpleTimeMark.farPast() } - @SubscribeEvent + @HandleEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (endTime.isInPast()) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt index f11f8ae00c8a..e9a037bdda3e 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ToolTipData.kt @@ -17,7 +17,7 @@ object ToolTipData { val slot = lastSlot ?: return val itemStack = slot.stack ?: return try { - if (SkyhanniToolTipEvent(slot, itemStack, toolTip).postAndCatch()) { + if (SkyhanniToolTipEvent(slot, itemStack, toolTip).post()) { toolTip.clear() } } catch (e: Throwable) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt index c1a7a60c3f49..3e3594c4fbdd 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/TrackerManager.kt @@ -10,7 +10,7 @@ import at.hannibal2.skyhanni.utils.ConditionalUtils import at.hannibal2.skyhanni.utils.NEUInternalName import at.hannibal2.skyhanni.utils.NumberUtil.formatIntOrUserError import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object TrackerManager { @@ -19,7 +19,7 @@ object TrackerManager { var dirty = false var commandEditTrackerSuccess = false - @SubscribeEvent + @HandleEvent fun onConfigLoad(event: ConfigLoadEvent) { val config = SkyHanniMod.feature.misc.tracker.hideCheapItems ConditionalUtils.onToggle(config.alwaysShowBest, config.minPrice, config.enabled) { @@ -27,14 +27,14 @@ object TrackerManager { } } - @SubscribeEvent(priority = EventPriority.HIGHEST) + @HandleEvent(priority = HandleEvent.HIGHEST) fun onRenderOverlayFirst(event: GuiRenderEvent) { if (hasChanged) { dirty = true } } - @SubscribeEvent(priority = EventPriority.LOWEST) + @HandleEvent(priority = HandleEvent.LOWEST) fun onRenderOverlayLast(event: GuiRenderEvent) { if (hasChanged) { dirty = false @@ -62,7 +62,7 @@ object TrackerManager { } commandEditTrackerSuccess = false - ItemAddEvent(internalName, amount, ItemAddManager.Source.COMMAND).postAndCatch() + ItemAddEvent(internalName, amount, ItemAddManager.Source.COMMAND).post() if (!commandEditTrackerSuccess) { ChatUtils.userError("Could not edit the Item Tracker! Does this item belong to this tracker? Is the tracker active right now?") } diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt index ed0a7c958bbe..8ec2bcb66fdd 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.data.bazaar import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.ConfigManager import at.hannibal2.skyhanni.events.DebugDataCollectEvent import at.hannibal2.skyhanni.events.SkyhanniTickEvent @@ -19,7 +20,6 @@ import at.hannibal2.skyhanni.utils.json.fromJson import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds @@ -35,7 +35,7 @@ object HypixelBazaarFetcher { private var failedAttempts = 0 private var nextFetchIsManual = false - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Bazaar Data Fetcher from API") @@ -53,7 +53,7 @@ object HypixelBazaarFetcher { } } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!canFetch()) return SkyHanniMod.coroutineScope.launch { diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt index 7edfbb1d8509..37dd7e44dab7 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerChatManager.kt @@ -19,7 +19,7 @@ import at.hannibal2.skyhanni.utils.ComponentSpan import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.util.IChatComponent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent /** * Reading normal chat events, and splitting them up into many different player chat events, with all available extra information @@ -113,7 +113,7 @@ object PlayerChatManager { "(?.*)(?§a\\[✌] )(?.*)" ) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { val chatComponent = event.chatComponent.intoSpan().stripHypixelMessage() coopPattern.matchStyledMatcher(chatComponent) { @@ -205,13 +205,13 @@ object PlayerChatManager { private fun sendSystemMessage(event: SkyhanniChatEvent) { with(SystemMessageEvent(event.message, event.chatComponent)) { - val cancelled = postAndCatch() + val cancelled = post() event.handleChat(cancelled, blockedReason, chatComponent) } } private fun AbstractChatEvent.postChat(event: SkyhanniChatEvent) { - val cancelled = postAndCatch() + val cancelled = post() event.handleChat(cancelled, blockedReason, chatComponent) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt index 35356f32f3bf..026f5c9799f2 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/hypixel/chat/PlayerNameFormatter.kt @@ -29,7 +29,7 @@ import com.google.gson.JsonArray import com.google.gson.JsonNull import net.minecraft.util.ChatComponentText import net.minecraft.util.IChatComponent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent /** * Listening to the player chat events, and applying custom chat options to them. @@ -54,7 +54,7 @@ object PlayerNameFormatter { "(?(?:§.){0,2}.) (?.*)" ) - @SubscribeEvent + @HandleEvent fun onPlayerAllChat(event: PlayerAllChatEvent) { if (!isEnabled()) return val levelColor = event.levelColor @@ -82,7 +82,7 @@ object PlayerNameFormatter { event.chatComponent = StringUtils.replaceIfNeeded(event.chatComponent, all) ?: return } - @SubscribeEvent + @HandleEvent fun onCoopChat(event: CoopChatEvent) { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( @@ -95,7 +95,7 @@ object PlayerNameFormatter { ) ?: return } - @SubscribeEvent + @HandleEvent fun onGuildChat(event: GuildChatEvent) { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( @@ -108,7 +108,7 @@ object PlayerNameFormatter { ) ?: return } - @SubscribeEvent + @HandleEvent fun onPartyChat(event: PartyChatEvent) { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( @@ -121,7 +121,7 @@ object PlayerNameFormatter { ) ?: return } - @SubscribeEvent + @HandleEvent fun onPrivateChat(event: PrivateMessageChatEvent) { if (!isEnabled()) return event.chatComponent = @@ -136,7 +136,7 @@ object PlayerNameFormatter { ) ?: return } - @SubscribeEvent + @HandleEvent fun onPlayerShowItemChat(event: PlayerShowItemChatEvent) { if (!isEnabled()) return event.chatComponent = StringUtils.replaceIfNeeded( @@ -246,7 +246,7 @@ object PlayerNameFormatter { fun isEnabled() = LorenzUtils.inSkyBlock && config.enable - @SubscribeEvent + @HandleEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.transform(41, "chat.PlayerMessagesConfig.partsOrder") { element -> val newList = JsonArray() diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt index cbd61ffc55f4..cc77eeeedae9 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/LineToMobHandler.kt @@ -1,11 +1,11 @@ package at.hannibal2.skyhanni.data.mob +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.MobEvent import at.hannibal2.skyhanni.events.SkyhanniRenderWorldEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.awt.Color @SkyHanniModule @@ -25,12 +25,12 @@ object LineToMobHandler { lines[mob] = settings } - @SubscribeEvent + @HandleEvent fun onMobDeSpawn(event: MobEvent.DeSpawn) { lines.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onLorenzRenderWorld(event: SkyhanniRenderWorldEvent) { if (!LorenzUtils.inSkyBlock) return if (lines.isEmpty()) return diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt index 2363945d21df..737fb971a770 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobData.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.utils.LorenzLogger import at.hannibal2.skyhanni.utils.getLorenzVec import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import java.util.TreeMap import at.hannibal2.skyhanni.data.mob.Mob.Type as MobType @@ -89,66 +89,66 @@ object MobData { } } - @SubscribeEvent + @HandleEvent fun onMobEventSpawn(event: MobEvent.Spawn) { entityToMob.putAll(event.mob.makeEntityToMobAssociation()) currentMobs.add(event.mob) notSeenMobs.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onMobEventDeSpawn(event: MobEvent.DeSpawn) { event.mob.fullEntityList().forEach { entityToMob.remove(it) } currentMobs.remove(event.mob) notSeenMobs.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onSkyblockMobSpawnEvent(event: MobEvent.Spawn.SkyblockMob) { skyblockMobs.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onSkyblockMobDeSpawnEvent(event: MobEvent.DeSpawn.SkyblockMob) { skyblockMobs.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onSummonSpawnEvent(event: MobEvent.Spawn.Summon) { summoningMobs.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onSummonDeSpawnEvent(event: MobEvent.DeSpawn.Summon) { summoningMobs.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onSpecialSpawnEvent(event: MobEvent.Spawn.Special) { special.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onSpecialDeSpawnEvent(event: MobEvent.DeSpawn.Special) { special.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onDisplayNPCSpawnEvent(event: MobEvent.Spawn.DisplayNPC) { displayNPCs.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onDisplayNPCDeSpawnEvent(event: MobEvent.DeSpawn.DisplayNPC) { displayNPCs.remove(event.mob) } - @SubscribeEvent + @HandleEvent fun onRealPlayerSpawnEvent(event: MobEvent.Spawn.Player) { players.add(event.mob) } - @SubscribeEvent + @HandleEvent fun onRealPlayerDeSpawnEvent(event: MobEvent.DeSpawn.Player) { players.remove(event.mob) } diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt index c5aac7206940..588e4eff3606 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDebug.kt @@ -15,7 +15,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.drawString import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityPlayerSP -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object MobDebug { @@ -46,7 +46,7 @@ object MobDebug { } } - @SubscribeEvent + @HandleEvent fun onWorldRenderDebug(event: SkyhanniRenderWorldEvent) { if (config.showRayHit || config.showInvisible) { lastRayHit = MobUtils.rayTraceForMobs(Minecraft.getMinecraft().thePlayer, event.partialTicks) @@ -87,7 +87,7 @@ object MobDebug { } } - @SubscribeEvent + @HandleEvent fun onMobEvent(event: MobEvent) { if (!config.logEvents) return val text = "Mob ${if (event is MobEvent.Spawn) "Spawn" else "Despawn"}: ${ diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt index 40b9b0dea46b..063f124c5cbe 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobDetection.kt @@ -33,7 +33,6 @@ import net.minecraft.network.play.server.S01PacketJoinGame import net.minecraft.network.play.server.S0CPacketSpawnPlayer import net.minecraft.network.play.server.S0FPacketSpawnMob import net.minecraft.world.World -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.concurrent.ConcurrentLinkedQueue import java.util.concurrent.atomic.AtomicBoolean @@ -63,7 +62,7 @@ object MobDetection { private fun mobDetectionReset() { MobData.currentMobs.map { it.createDeSpawnEvent() - }.forEach { it.postAndCatch() } + }.forEach { it.post() } MobData.retries.clear() } @@ -101,7 +100,7 @@ object MobDetection { this.armorStand?.let { it.worldObj != world } ?: false ) || this.extraEntities.any { it.worldObj != world } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (shouldClear.get()) { // Needs to work outside skyblock since it needs clearing when leaving skyblock and joining limbo mobDetectionReset() @@ -167,7 +166,7 @@ object MobDetection { Mob.Type.PROJECTILE -> MobEvent.FirstSeen.Projectile(mob) Mob.Type.DISPLAY_NPC -> MobEvent.FirstSeen.DisplayNPC(mob) Mob.Type.BASIC, Mob.Type.DUNGEON, Mob.Type.BOSS, Mob.Type.SLAYER -> MobEvent.FirstSeen.SkyblockMob(mob) - }.postAndCatch() + }.post() } return isVisible } @@ -175,7 +174,7 @@ object MobDetection { /**@return a false means that it should try again (later)*/ private fun entitySpawn(entity: EntityLivingBase, roughType: Mob.Type): Boolean { when (roughType) { - Mob.Type.PLAYER -> MobEvent.Spawn.Player(MobFactories.player(entity)).postAndCatch() + Mob.Type.PLAYER -> MobEvent.Spawn.Player(MobFactories.player(entity)).post() Mob.Type.DISPLAY_NPC -> return MobFilter.createDisplayNPC(entity) Mob.Type.BASIC -> { @@ -197,7 +196,7 @@ object MobDetection { Mob.Type.PROJECTILE -> MobEvent.Spawn.Projectile(mob) Mob.Type.DISPLAY_NPC -> MobEvent.Spawn.DisplayNPC(mob) // Needed for some special cases Mob.Type.PLAYER -> return mobDetectionError("An Player Ended Here. How?") - }.postAndCatch() + }.post() } } } @@ -223,7 +222,7 @@ object MobDetection { val entity = EntityUtils.getEntityByID(id) as? EntityBat ?: return@drainForEach if (MobData.entityToMob[entity] != null) return@drainForEach removeRetry(entity) - MobEvent.Spawn.Projectile(MobFactories.projectile(entity, "Spirit Scepter Bat")).postAndCatch() + MobEvent.Spawn.Projectile(MobFactories.projectile(entity, "Spirit Scepter Bat")).post() } EntityPacketType.VILLAGER -> { @@ -247,12 +246,12 @@ object MobDetection { if (MobData.entityToMob[entity] != null) return@drainForEach if (!entity.powered) return@drainForEach removeRetry(entity) - MobEvent.Spawn.Special(MobFactories.special(entity, "Creeper Veil")).postAndCatch() + MobEvent.Spawn.Special(MobFactories.special(entity, "Creeper Veil")).post() } } } - @SubscribeEvent + @HandleEvent fun onEntityHealthUpdateEvent(event: EntityHealthUpdateEvent) { when { event.entity is EntityBat && event.health == 6 -> { @@ -276,7 +275,7 @@ object MobDetection { } private fun entityDeSpawn(entity: EntityLivingBase) { - MobData.entityToMob[entity]?.createDeSpawnEvent()?.postAndCatch() ?: removeRetry(entity) + MobData.entityToMob[entity]?.createDeSpawnEvent()?.post() ?: removeRetry(entity) allEntitiesViaPacketId.remove(entity.entityId) } @@ -377,7 +376,7 @@ object MobDetection { shouldClear.set(true) } - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Mob Detection") if (forceReset) { diff --git a/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt b/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt index 6938958e97b4..6c89e144d609 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/mob/MobFilter.kt @@ -201,7 +201,7 @@ object MobFilter { listOfClickArmorStand.contains(armorStand.name) } ?: return false val armorStand = MobUtils.getArmorStand(clickArmorStand, -1) ?: return false - MobEvent.Spawn.DisplayNPC(MobFactories.displayNPC(entity, armorStand, clickArmorStand)).postAndCatch() + MobEvent.Spawn.DisplayNPC(MobFactories.displayNPC(entity, armorStand, clickArmorStand)).post() return true } diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt index d1c6dede0327..948b5611525b 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/SkyblockStat.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.allLettersFirstUppercase import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraft.client.Minecraft -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import org.intellij.lang.annotations.Language import java.util.EnumMap import java.util.regex.Pattern @@ -125,7 +125,7 @@ enum class SkyblockStat( } } - @SubscribeEvent + @HandleEvent fun onInventory(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.inSkyBlock) return onSkyblockMenu(event) @@ -153,7 +153,7 @@ enum class SkyblockStat( } } - @SubscribeEvent + @HandleEvent fun onTabList(event: WidgetUpdateEvent) { if (!event.isWidget(TabWidget.STATS, TabWidget.DUNGEON_SKILLS_AND_STATS)) return val type = if (event.isWidget(TabWidget.DUNGEON_SKILLS_AND_STATS)) StatSourceType.TABLIST_DUNGEON else StatSourceType.TABLIST diff --git a/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt b/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt index e5939c3f758d..428ffb63d0c0 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/model/TabWidget.kt @@ -12,7 +12,7 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern import net.minecraftforge.fml.common.eventhandler.EventPriority -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import java.util.regex.Matcher import java.util.regex.Pattern @@ -345,12 +345,12 @@ enum class TabWidget( if (lines == this.lines) return this.lines = lines isActive = true - WidgetUpdateEvent(this, lines).postAndCatch() + WidgetUpdateEvent(this, lines).post() } private fun postClearEvent() { lines = emptyList() - WidgetUpdateEvent(this, lines).postAndCatch() + WidgetUpdateEvent(this, lines).post() } /** Update the state of the widget, posts the clear if [isActive] == true && [gotChecked] == false */ @@ -375,7 +375,7 @@ enum class TabWidget( entries.forEach { it.pattern } } - @SubscribeEvent(priority = EventPriority.HIGH) + @HandleEvent(priority = HandleEvent.HIGH) fun onTabListUpdate(event: TabListUpdateEvent) { if (!LorenzUtils.inSkyBlock) { if (separatorIndexes.isNotEmpty()) { @@ -409,7 +409,7 @@ enum class TabWidget( } } - @SubscribeEvent(priority = EventPriority.LOW) + @HandleEvent(priority = HandleEvent.LOW) fun onRepoReload(event: RepositoryReloadEvent) { extraPatterns = repoGroup.getUnusedPatterns() } diff --git a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt index 1d81502f3f61..388991db294d 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/repo/RepoManager.kt @@ -13,7 +13,7 @@ import at.hannibal2.skyhanni.utils.chat.Text.asComponent import at.hannibal2.skyhanni.utils.chat.Text.send import com.google.gson.JsonObject import net.minecraft.util.IChatComponent -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import org.apache.commons.io.FileUtils import java.io.BufferedReader import java.io.BufferedWriter @@ -311,9 +311,9 @@ class RepoManager(private val configLocation: File) { ).use { writer -> writer.write(gson.toJson(json)) } } - @SubscribeEvent + @HandleEvent fun onNeuRepoReload(event: io.github.moulberry.notenoughupdates.events.RepositoryReloadEvent) { - NeuRepositoryReloadEvent().postAndCatch() + NeuRepositoryReloadEvent().post() } fun resetRepositoryLocation(manual: Boolean = false) { diff --git a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt index b567d9ae6d06..6d144fd42e14 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/LorenzEvent.kt @@ -13,7 +13,6 @@ import at.hannibal2.skyhanni.utils.system.PlatformUtils import net.minecraftforge.common.MinecraftForge import net.minecraftforge.fml.common.eventhandler.Event import net.minecraftforge.fml.common.eventhandler.IEventListener -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent /** * Use @[SubscribeEvent] @@ -27,7 +26,7 @@ abstract class LorenzEvent : Event() { } @Deprecated("Use SkyHanniEvent instead", ReplaceWith("")) - fun postAndCatch() = postAndCatchAndBlock {} + fun post() = postAndCatchAndBlock {} companion object { diff --git a/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt index 7ab31b08d9a0..32fd0274ecc0 100644 --- a/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt +++ b/src/main/java/at/hannibal2/skyhanni/events/SkyhanniChatEvent.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.events +import at.hannibal2.skyhanni.api.event.CancellableSkyHanniEvent import at.hannibal2.skyhanni.api.event.SkyHanniEvent import net.minecraft.util.IChatComponent diff --git a/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt index 625ded34f838..e3eb1176bebf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/anvil/AnvilCombineHelper.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.anvil import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.events.GuiContainerEvent import at.hannibal2.skyhanni.skyhannimodule.SkyHanniModule import at.hannibal2.skyhanni.utils.InventoryUtils.getInventoryName @@ -12,12 +13,11 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils.highlight import net.minecraft.client.gui.inventory.GuiChest import net.minecraft.inventory.ContainerChest -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @SkyHanniModule object AnvilCombineHelper { - @SubscribeEvent + @HandleEvent fun onBackgroundDrawn(event: GuiContainerEvent.BackgroundDrawnEvent) { if (!LorenzUtils.inSkyBlock) return if (!SkyHanniMod.feature.inventory.anvilCombineHelper) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt index 5950f484d565..8254fe3ad583 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.features.bingo +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.config.storage.PlayerSpecificStorage.BingoSession import at.hannibal2.skyhanni.data.ProfileStorageData import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoData @@ -15,7 +16,6 @@ import at.hannibal2.skyhanni.utils.RegexUtils.matches import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.time.LocalTime import java.time.OffsetDateTime import java.time.ZoneOffset @@ -36,7 +36,7 @@ object BingoAPI { " §.Ⓑ §.Bingo" ) - @SubscribeEvent + @HandleEvent fun onDebugDataCollect(event: DebugDataCollectEvent) { event.title("Bingo Card") @@ -67,7 +67,7 @@ object BingoAPI { } } - @SubscribeEvent + @HandleEvent fun onRepoReload(event: RepositoryReloadEvent) { ranks = event.getConstant("BingoRanks").ranks data = event.getConstant("Bingo").bingoTips diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt index 0a880b98fdce..2796c49e6a77 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/CompactBingoChat.kt @@ -8,7 +8,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RegexUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent @SkyHanniModule object CompactBingoChat { @@ -35,7 +35,7 @@ object CompactBingoChat { "§[e3]§l▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬" ) - @SubscribeEvent + @HandleEvent fun onChat(event: SkyhanniChatEvent) { if (!config.enabled) return if (!LorenzUtils.isBingoProfile && !config.outsideBingo) return diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt index 8a7dbba93171..7eff304b69c3 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/MinionCraftHelper.kt @@ -28,7 +28,7 @@ import com.google.gson.JsonArray import com.google.gson.JsonObject import net.minecraft.client.Minecraft import net.minecraft.item.ItemStack -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent +import at.hannibal2.skyhanni.api.event.HandleEvent import kotlin.time.Duration.Companion.seconds @SkyHanniModule @@ -49,12 +49,12 @@ object MinionCraftHelper { private val allIngredients = mutableListOf() private val alreadyNotified = mutableListOf() - @SubscribeEvent + @HandleEvent fun onWorldChange(event: WorldChangeEvent) { alreadyNotified.clear() } - @SubscribeEvent + @HandleEvent fun onTick(event: SkyhanniTickEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.minionCraftHelperEnabled) return @@ -238,7 +238,7 @@ object MinionCraftHelper { } } - @SubscribeEvent + @HandleEvent fun onRenderOverlay(event: GuiRenderEvent.GuiOverlayRenderEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.minionCraftHelperEnabled) return @@ -261,7 +261,7 @@ object MinionCraftHelper { private fun isMinionName(itemName: String) = itemName.contains(" Minion ") && !itemName.contains(" Minion Skin") - @SubscribeEvent + @HandleEvent fun onInventoryOpen(event: InventoryFullyOpenedEvent) { if (!LorenzUtils.isBingoProfile) return if (event.inventoryName != "Crafted Minions") return @@ -275,7 +275,7 @@ object MinionCraftHelper { } } - @SubscribeEvent + @HandleEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.transform(26, "#player.bingoSessions") { element -> for ((_, data) in element.asJsonObject.entrySet()) { diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardDisplay.kt index b0f883ac240a..a7c666ff0764 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardDisplay.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardDisplay.kt @@ -26,7 +26,6 @@ import at.hannibal2.skyhanni.utils.renderables.Renderable import net.minecraft.client.Minecraft import net.minecraft.client.gui.GuiChat import net.minecraft.client.gui.inventory.GuiInventory -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration.Companion.days @SkyHanniModule @@ -69,7 +68,7 @@ object BingoCardDisplay { } } - @SubscribeEvent + @HandleEvent fun onSecondPassed(event: SecondPassedEvent) { if (hasHiddenPersonalGoals) { update() @@ -215,7 +214,7 @@ object BingoCardDisplay { private var lastSneak = false private var inventoryOpen = false - @SubscribeEvent + @HandleEvent fun onRenderOverlay(event: GuiRenderEvent) { if (!LorenzUtils.isBingoProfile) return if (!config.enabled) return @@ -257,14 +256,14 @@ object BingoCardDisplay { update() } - @SubscribeEvent + @HandleEvent fun onConfigLoad(event: ConfigLoadEvent) { config.hideCommunityGoals.onToggle { update() } config.nextTipDuration.onToggle { update() } update() } - @SubscribeEvent + @HandleEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { event.move(2, "bingo", "event.bingo") } diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt index ad743115cfd1..b91774e95a67 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/card/BingoCardReader.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.features.bingo.card import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.api.event.HandleEvent import at.hannibal2.skyhanni.data.jsonobjects.repo.BingoData import at.hannibal2.skyhanni.events.InventoryUpdatedEvent import at.hannibal2.skyhanni.events.SkyhanniChatEvent @@ -20,7 +21,6 @@ import at.hannibal2.skyhanni.utils.SimpleTimeMark import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.TimeUtils import at.hannibal2.skyhanni.utils.repopatterns.RepoPattern -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import kotlin.time.Duration @SkyHanniModule @@ -41,7 +41,7 @@ object BingoCardReader { ".*§7§eThe next hint will unlock in (?