/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
const Color = Java.type("java.awt.Color")
import Feature from "../../featureClass/class";
import { f, m } from "../../../mappings/mappings";
import renderLibs from "../../../guimanager/renderLibs";
import ToggleSetting from "../settings/settingThings/toggle";
import { drawBoxAtBlock } from "../../utils/renderUtils";
import { SoopyGui, SoopyRenderEvent } from "../../../guimanager";
import SoopyGuiElement from "../../../guimanager/GuiElement/SoopyGuiElement";
import SoopyMouseClickEvent from "../../../guimanager/EventListener/SoopyMouseClickEvent";
import ButtonWithArrow from "../../../guimanager/GuiElement/ButtonWithArrow";
import ImageLocationSetting from "../settings/settingThings/imageLocation";
import socketConnection from "../../socketConnection";
import SoopyKeyPressEvent from "../../../guimanager/EventListener/SoopyKeyPressEvent";
import SettingBase from "../settings/settingThings/settingBase";
import { Box } from "../../utils/renderJavaUtils";
const BufferedImage = Java.type("java.awt.image.BufferedImage")
const AlphaComposite = Java.type("java.awt.AlphaComposite")
class DungeonMap extends Feature {
constructor() {
super()
}
isInDungeon() {
if (!this.FeatureManager || !this.FeatureManager.features["dataLoader"]) return false
return this.FeatureManager.features["dataLoader"].class.isInDungeon
}
onEnable() {
this.initVariables()
this.mapInfo = new SettingBase("NOTE: The more players in the party with this", "category enabled the more accurate the map will be.", undefined, "map_info", this)
this.renderMap = new ToggleSetting("Render Map", "Toggles Rendering the map on the hud", false, "dmap_render", this)
this.mapLocation = new ImageLocationSetting("Map Location", "Sets the location of the map on the hud", "dmap_location", this, [10, 10, 1], new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/dungeonMap/map.png"))), 100, 100).requires(this.renderMap)
this.mapBackground = new ToggleSetting("Map Background And Border", "Puts a grey background behind the map + Black border", true, "dmap_background", this)
this.showMapInBoss = new ToggleSetting("Keep showing the map in the dungeon boss room", "This will center the map when in boss to still be usefull", true, "dmap_enable_boss", this)
this.borderedHeads = new ToggleSetting("Add a black border around heads on map", "", false, "dmap_border_head", this)
this.brBox = new ToggleSetting("Box around doors in br", "In map category because it uses map to find location (no esp)", true, "dmap_door", this)
this.spiritLeapOverlay = new ToggleSetting("Spirit leap overlay", "Cool overlay for the spirit leap menu", true, "spirit_leap_overlay", this)
// this.spiritLeapOverlay = new ToggleSetting("Spirit leap overlay", "Cool overlay for the spirit leap menu", true, "spirit_leap_overlay", this).requires(this.spiritLeapOverlay)
this.MAP_QUALITY_SCALE = 1
this.IMAGE_SIZE = 128 * this.MAP_QUALITY_SCALE
this.defaultPlayerImage = renderLibs.getImage("https://crafatar.com/avatars/dc8c39647b294e03ae9ed13ebd65dd29?size=8", true)
this.mapDataPlayers = {}
this.offset = []
this.people = []
this.mapScale = 1
this.puzzles = {}
this.puzzlesTab = []
this.roomWidth = 1
this.nameToUUID = {}
this.deadPlayers = new Set()
this.newPuzzlesTab = []
this.mortLocationOnMap = undefined
this.brBoxLoc = undefined
this.keys = 0
// this.invMapImage = new BufferedImage(128, 128, BufferedImage.TYPE_INT_ARGB)
// this.renderImage = new BufferedImage(this.IMAGE_SIZE, this.IMAGE_SIZE, BufferedImage.TYPE_INT_ARGB)
this.mapData = undefined
this.idToPlayer = {}
this.barrier_block_item = new Item("minecraft:barrier")
this.puzzleItems = {
"Water Board": new Item("minecraft:water_bucket"),
"Higher Or Lower": new Item("minecraft:blaze_powder"),
"Quiz": new Item("minecraft:book"),
"Three Weirdos": new Item("minecraft:chest"),
"Tic Tac Toe": new Item("minecraft:shears"),
"Teleport Maze": new Item("minecraft:end_portal_frame"),
"Ice Fill": new Item("minecraft:ice"),
"Creeper Beams": new Item("minecraft:sea_lantern"),
"Bomb Defuse": new Item("minecraft:tnt"),
"Boulder": new Item("minecraft:planks"),
"Ice Path": new Item("minecraft:mob_spawner")
}
this.dungeonBossImages = {
// "F1": [
// {
// image: new Image(javax.imageio.ImageIO.read(new java.io.File("./config/ChatTriggers/modules/SoopyV2/features/dungeonMap/dungeonBossImages/f1.png"))),
//