diff options
| author | syeyoung <cyoung06@naver.com> | 2022-05-21 21:18:14 +0900 |
|---|---|---|
| committer | syeyoung <cyoung06@naver.com> | 2022-05-21 21:28:52 +0900 |
| commit | 20dd3f99a7b139b5848128246c622fd9cfefa478 (patch) | |
| tree | 78e5f84ad22fd53876d488f6b58c3528aebe6501 /src/main/java/kr/syeyoung/dungeonsguide/dungeon | |
| parent | 50de034c046c4ddea033b73793c8825ecb5bb86f (diff) | |
| download | Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.tar.gz Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.tar.bz2 Skyblock-Dungeons-Guide-20dd3f99a7b139b5848128246c622fd9cfefa478.zip | |
- Project separation
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon')
61 files changed, 0 insertions, 5721 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonActionManager.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonActionManager.java deleted file mode 100644 index 667f329c..00000000 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonActionManager.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod - * Copyright (C) 2021 cyoung06 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - */ - -package kr.syeyoung.dungeonsguide.dungeon; - -import lombok.Getter; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLiving; -import net.minecraft.util.BlockPos; -import net.minecraft.util.Vec3; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class DungeonActionManager { - @Getter - private static final Map<Integer , Vec3> spawnLocation = new HashMap<Integer, Vec3>(); - - @Getter - private static final List<Integer> killeds = new ArrayList<Integer>(); -} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java deleted file mode 100755 index bd04d7a9..00000000 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/DungeonContext.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod - * Copyright (C) 2021 cyoung06 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - */ - -package kr.syeyoung.dungeonsguide.dungeon; - -import kr.syeyoung.dungeonsguide.DungeonsGuide; -import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonSpecificDataProvider; -import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonSpecificDataProviderRegistry; -import kr.syeyoung.dungeonsguide.dungeon.events.*; -import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; -import kr.syeyoung.dungeonsguide.events.BossroomEnterEvent; -import kr.syeyoung.dungeonsguide.features.FeatureRegistry; -import kr.syeyoung.dungeonsguide.features.impl.dungeon.FeatureDungeonMap; -import kr.syeyoung.dungeonsguide.roomprocessor.RoomProcessor; -import kr.syeyoung.dungeonsguide.roomprocessor.bossfight.BossfightProcessor; -import kr.syeyoung.dungeonsguide.utils.TextUtils; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.client.Minecraft; -import net.minecraft.client.network.NetworkPlayerInfo; -import net.minecraft.scoreboard.ScorePlayerTeam; -import net.minecraft.util.BlockPos; -import net.minecraft.util.ChatComponentText; -import net.minecraft.util.IChatComponent; -import net.minecraft.world.World; -import net.minecraftforge.client.event.ClientChatReceivedEvent; -import net.minecraftforge.common.MinecraftForge; - -import java.awt.*; -import java.util.*; -import java.util.List; - -public class DungeonContext { - @Getter - private final World world; - @Getter - private final MapProcessor mapProcessor; - - @Getter - @Setter - private BlockPos dungeonMin; - - @Getter - private final Map<Point, DungeonRoom> roomMapper = new HashMap<Point, DungeonRoom>(); - @Getter - private final List<DungeonRoom> dungeonRoomList = new ArrayList<DungeonRoom>(); - - @Getter - private final List<RoomProcessor> globalRoomProcessors = new ArrayList<RoomProcessor>(); - - @Getter - private final Map<String, Integer> deaths = new HashMap<String, Integer>(); - @Getter - private final List<String[]> milestoneReached = new ArrayList<String[]>(); - @Getter - @Setter - private long BossRoomEnterSeconds = -1; - @Getter - @Setter - private long init = -1; - @Getter - @Setter - private BlockPos bossroomSpawnPos = null; - - @Getter - @Setter - private boolean trapRoomGen = false; - - @Getter - private boolean gotMimic = false; - - private int latestSecretCnt = 0; - private int latestTotalSecret = 0; - private int latestCrypts = 0; - - @Getter - private int maxSpeed = 600; - @Getter - private double secretPercentage = 1.0; - - public void setGotMimic(boolean gotMimic) { - this.gotMimic = gotMimic; - createEvent(new DungeonNodataEvent("MIMIC_KILLED")); - } - - @Getter - @Setter - private BossfightProcessor bossfightProcessor; - - @Getter - private final Set<String> players = new HashSet<String>(); - - @Getter - private final List<DungeonEvent> events = new ArrayList<DungeonEvent>(); - - public DungeonContext(World world) { - this.world = world; - createEvent(new DungeonNodataEvent("DUNGEON_CONTEXT_CREATION")); - mapProcessor = new MapProcessor(this); - DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - if (doorFinder != null) { - trapRoomGen = doorFinder.isTrapSpawn(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - - secretPercentage = doorFinder.secretPercentage(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - maxSpeed = doorFinder.speedSecond(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - } else mapProcessor.setBugged(true); - init = System.currentTimeMillis(); - } - - public void createEvent(DungeonEventData eventData) { - events.add(new DungeonEvent(eventData)); - } - - - private final Rectangle roomBoundary = new Rectangle(-10,-10,138,138); - - public void tick() { - mapProcessor.tick(); - - if (mapProcessor.isInitialized() && BossRoomEnterSeconds == -1 && !roomBoundary.contains(mapProcessor.worldPointToMapPoint(Minecraft.getMinecraft().thePlayer.getPositionVector()))) { - BossRoomEnterSeconds = FeatureRegistry.DUNGEON_SBTIME.getTimeElapsed() / 1000; - bossroomSpawnPos = Minecraft.getMinecraft().thePlayer.getPosition(); - MinecraftForge.EVENT_BUS.post(new BossroomEnterEvent()); - createEvent(new DungeonNodataEvent("BOSSROOM_ENTER")); - DungeonSpecificDataProvider doorFinder = DungeonSpecificDataProviderRegistry.getDoorFinder(DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - if (doorFinder != null) { - bossfightProcessor = doorFinder.createBossfightProcessor(world, DungeonsGuide.getDungeonsGuide().getSkyblockStatus().getDungeonName()); - } else { - DungeonsGuide.sendDebugChat(new ChatComponentText("Error:: Null Data Providier")); - } - } - List<NetworkPlayerInfo> list = FeatureDungeonMap.field_175252_a.sortedCopy(Minecraft.getMinecraft().thePlayer.sendQueue.getPlayerInfoMap()); - try { - for (int i = 1; i < 20; i++) { - NetworkPlayerInfo networkPlayerInfo = list.get(i); - String name = networkPlayerInfo.getDisplayName() != null ? networkPlayerInfo.getDisplayName().getFormattedText() : ScorePlayerTeam.formatPlayerName(networkPlayerInfo.getPlayerTeam(), networkPlayerInfo.getGameProfile().getName()); - if (name.trim().equals("§r") || name.startsWith("§r ")) continue; - players.add(TextUtils.stripColor(name).trim().split(" ")[0]); - } - } catch (Exception e) {} - - if (latestSecretCnt != FeatureRegistry.DUNGEON_SECRETS.getSecretsFound()) { - int newSecretCnt = FeatureRegistry.DUNGEON_SECRETS.getSecretsFound(); - createEvent(new DungeonSecretCountChangeEvent(latestSecretCnt, newSecretCnt, latestTotalSecret, FeatureRegistry.DUNGEON_SECRETS.sureOfTotalSecrets())); - latestSecretCnt = newSecretCnt; - } - if (latestTotalSecret != FeatureRegistry.DUNGEON_SECRETS.getTotalSecretsInt()) { - latestTotalSecret = FeatureRegistry.DUNGEON_SECRETS.getTotalSecretsInt(); - createEvent(new DungeonSecretCountChangeEvent(latestSecretCnt, latestSecretCnt, latestTotalSecret, FeatureRegistry.DUNGEON_SECRETS.sureOfTotalSecrets())); - } - if (latestCrypts != FeatureRegistry.DUNGEON_TOMBS.getTombsFound()) { - int newlatestCrypts = FeatureRegistry.DUNGEON_TOMBS.getTombsFound(); - createEvent(new DungeonCryptBrokenEvent(latestCrypts, newlatestCrypts)); - this.latestCrypts = newlatestCrypts; - } - } - - @Getter - private boolean ended = false; - @Getter - private boolean defeated = false; - public void onChat(ClientChatReceivedEvent event) { - IChatComponent component = event.message; - String formatted = component.getFormattedText(); - if (formatted.contains("$DG-Comm")) { - event.setCanceled(true); - String data = component.getFormattedText().substring(component.getFormattedText().indexOf("$DG-Comm")); - String actual = TextUtils.stripColor(data); - String coords = actual.split(" ")[1]; - String secrets = actual.split(" ")[2]; - int x = Integer.parseInt(coords.split("/")[0]); - int z = Integer.parseInt(coords.split("/")[1]); - int secrets2 = Integer.parseInt(secrets); - Point roomPt = mapProcessor.worldPointToRoomPoint(new BlockPos(x,70,z)); - DungeonsGuide.sendDebugChat(new ChatComponentText("Message from Other dungeons guide :: "+roomPt.x+" / " + roomPt.y + " total secrets "+secrets2)); - DungeonRoom dr = roomMapper.get(roomPt); - if (dr != null) { - dr.setTotalSecrets(secrets2); - } - } else if (formatted.contains("$DG-Mimic")) { - setGotMimic(true); - } else if (formatted.startsWith("§r§c§lPUZZLE FAIL! ") && formatted.endsWith(" §r§4Y§r§ci§r§6k§r§ee§r§as§r§2!§r")) { - createEvent(new DungeonPuzzleFailureEvent(TextUtils.stripColor(formatted.split(" ")[2]), formatted)); - } else if (formatted.contains("§6> §e§lEXTRA STATS §6<")) { - createEvent(new DungeonNodataEvent("DUNGEON_END")); - ended = true; - } else if (formatted.contains("§r§c☠ §r§eDefeated ")) { - defeated = true; - } - } -} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java deleted file mode 100755 index b6089ebd..00000000 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/MapProcessor.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod - * Copyright (C) 2021 cyoung06 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. - */ - -package kr.syeyoung.dungeonsguide.dungeon; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import com.google.common.collect.Sets; -import kr.syeyoung.dungeonsguide.DungeonsGuide; -import kr.syeyoung.dungeonsguide.dungeon.doorfinder.EDungeonDoorType; -import kr.syeyoung.dungeonsguide.dungeon.events.DungeonMapUpdateEvent; -import kr.syeyoung.dungeonsguide.dungeon.events.DungeonNodataEvent; -import kr.syeyoung.dungeonsguide.dungeon.events.DungeonRoomDiscoverEvent; -import kr.syeyoung.dungeonsguide.dungeon.events.SerializableBlockPos; -import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; -import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonSpecificDataProviderRegistry; -import kr.syeyoung.dungeonsguide.dungeon.doorfinder.DungeonSpecificDataProvider; -import kr.syeyoung.dungeonsguide.events.DungeonContextInitializationEvent; -import kr.syeyoung.dungeonsguide.features.FeatureRegistry; -import kr.syeyoung.dungeonsguide.stomp.StompPayload; -import kr.syeyoung.dungeonsguide.utils.MapUtils; -import kr.syeyoung.dungeonsguide.wsresource.StaticResource; -import kr.syeyoung.dungeonsguide.wsresource.StaticResourceCache; -import lombok.Getter; -import lombok.Setter; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemMap; -import net.minecraft.item.ItemStack; -import net.minecraft.util.*; -import net.minecraft.world.storage.MapData; -import net.minecraftforge.common.MinecraftForge; -import org.json.JSONObject; - -import javax.vecmath.Vector2d; -import javax.vecmath.Vector2f; -import java.awt.*; -import java.util.*; -import java.util.List; -import java.util.concurrent.ExecutionException; - -public class MapProcessor { - |
