diff options
author | syeyoung <cyong06@naver.com> | 2021-02-10 22:38:29 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-02-10 22:38:29 +0900 |
commit | ed9a5d483335a4d71160a1ff54ad783f971dc016 (patch) | |
tree | 87aa19f1a863fb668da0060077e34762fdb62943 /src/main | |
parent | 8d81f25a74af028357f33c4a44f73fc929ad5338 (diff) | |
download | Skyblock-Dungeons-Guide-ed9a5d483335a4d71160a1ff54ad783f971dc016.tar.gz Skyblock-Dungeons-Guide-ed9a5d483335a4d71160a1ff54ad783f971dc016.tar.bz2 Skyblock-Dungeons-Guide-ed9a5d483335a4d71160a1ff54ad783f971dc016.zip |
OK bats go brrr
Diffstat (limited to 'src/main')
3 files changed, 17 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java index 08246c2a..0a897ddd 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/actions/ActionChangeState.java @@ -1,6 +1,7 @@ package kr.syeyoung.dungeonsguide.dungeon.actions; import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic; +import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonSecret; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; import lombok.Data; import lombok.EqualsAndHashCode; @@ -40,6 +41,8 @@ public class ActionChangeState extends AbstractAction{ DungeonMechanic mechanic = dungeonRoom.getDungeonRoomInfo().getMechanics().get(mechanicName); if (mechanic== null) return false; + if (mechanic instanceof DungeonSecret && ((DungeonSecret) mechanic).getSecretType() != DungeonSecret.SecretType.CHEST) + return true; return mechanic.getCurrentState(dungeonRoom).equalsIgnoreCase(state); } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java index 728d0b5f..63d2c013 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/eventlistener/DungeonListener.java @@ -37,6 +37,7 @@ import net.minecraftforge.client.event.GuiScreenEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; @@ -477,8 +478,9 @@ public class DungeonListener { @Getter private Map<Integer, Vec3> entityIdToPosMap = new HashMap<Integer, Vec3>(); @SubscribeEvent - public void onEntitySpawn(LivingSpawnEvent spawn) { - EntitySpawnManager.getSpawnLocation().put(spawn.entity.getEntityId(), new Vec3(spawn.x, spawn.y, spawn.z)); + public void onEntitySpawn(EntityJoinWorldEvent spawn) { + System.out.println("Spawned "+spawn.entity); + EntitySpawnManager.getSpawnLocation().put(spawn.entity.getEntityId(), new Vec3(spawn.entity.posX, spawn.entity.posY, spawn.entity.posZ)); } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java index dc09f46d..6e96788a 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/GeneralRoomProcessor.java @@ -3,6 +3,7 @@ package kr.syeyoung.dungeonsguide.roomprocessor; import kr.syeyoung.dungeonsguide.SkyblockStatus; import kr.syeyoung.dungeonsguide.config.Config; import kr.syeyoung.dungeonsguide.dungeon.DungeonContext; +import kr.syeyoung.dungeonsguide.dungeon.EntitySpawnManager; import kr.syeyoung.dungeonsguide.dungeon.actions.tree.ActionRoute; import kr.syeyoung.dungeonsguide.dungeon.mechanics.DungeonMechanic; import kr.syeyoung.dungeonsguide.dungeon.roomfinder.DungeonRoom; @@ -15,6 +16,7 @@ import lombok.Getter; import lombok.Setter; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.util.BlockPos; @@ -56,6 +58,14 @@ public class GeneralRoomProcessor implements RoomProcessor { 5, i * 8 + 13, 0xFF00FF00); } } + + + Entity en = Minecraft.getMinecraft().objectMouseOver.entityHit; + if (en == null) return;; + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + if (EntitySpawnManager.getSpawnLocation().containsKey(en.getEntityId())) { + fr.drawString("Spawned at "+EntitySpawnManager.getSpawnLocation().get(en.getEntityId()), sr.getScaledWidth() / 2, sr.getScaledHeight() / 2, 0xFFFFFFFF); + } } @Override |