class CachedNBT { constructor() { this.clear(), (this.lastfilterUse = 0); } clear() { (this.nbt = {}), (this.meta = {}), (this.dropChance = {}); } updateFilterLastUsed() { this.lastfilterUse = new Date().getTime(); } setMetaForNBT(e, t, a, o, n) { this.meta[e] = { data: t, fwClass: a, eventClass: o, stackPos: n }; } getItemType(e) { let t = this.nbt[e]; if (void 0 != t && "{}" != t) { var a = new CMDParser("").parseCompound( extractSegment("{", "}", t.indexOf("{"), t) ); return void 0 != a.id ? extractMinecraftID(a.id.val) : -1; } return -1; } setNBT(e, t) { this.lastfilterUse + 2e3 < new Date().getTime() && (t.length > 0 ? 0 == t.indexOf(",Slot:") ? (this.nbt[e] = "{" + t.substr(t.indexOf("b") + 2) + "}") : (this.nbt[e] = "{" + t.substr(1) + "}") : (this.nbt[e] = "{}")); } setBlockNBT(e, t) { void 0 != t && "{}" != t && "" != t && this.lastfilterUse + 2e3 < new Date().getTime() && (this.nbt[e] = t); } getNBT(e) { return this.nbt[e]; } loadCachedItemNBT(e) { let t = this.nbt[e]; if (void 0 != t && "{}" != t) try { let n = new CMDParser(""); var a = n.parseCompound( extractSegment("{", "}", t.indexOf("{"), t) ), o = $("#" + e).val(); loadItemNBTIntoSlot(a, o, e, n); } catch (e) {} } loadCachedEntityNBT(e) { let t = "e" + e, a = this.nbt[t]; if (void 0 != a && "{}" != a) try { let t = new CMDParser(""), o = t.parseCompound( extractSegment("{", "}", a.indexOf("{"), a) ); t.loadSummonCommand(o, e); } catch (e) {} } loadCachedBlockNBT(e) { let t = this.nbt[e]; if (void 0 != t && "{}" != t && "" != t) try { let e = new CMDParser(""), a = e.parseCompound( extractSegment("{", "}", t.indexOf("{"), t) ); e.loadBlockDataCommand(a, $("#block").val()); } catch (e) {} } } class Settings { constructor() { this.readSettings(), $("#settings").draggable(), $("#settings").hide(), $("#closeSettingsBut").bind("click", function () { $("#settings").hide(); }), $("#removeSlash").bind("change", function () { (settings.removeSlash = $("#removeSlash").is(":checked")), settings.writeSettings(), generateCommand(); }), $("#loadItemUI").bind("change", function () { (settings.loadItemUI = $("#loadItemUI").is(":checked")), settings.writeSettings(); }), $("#namespace").bind("keyup", function () { (settings.namespace = $("#namespace").val()), settings.writeSettings(), generateCommand(); }), $("#updateNamespace").bind("change", function () { (settings.updateNamespace = $("#updateNamespace").is( ":checked" )), settings.writeSettings(); }), $("#warnOnClose").bind("change", function () { (settings.warnOnClose = $("#warnOnClose").is(":checked")), settings.writeSettings(), settings.warnOnClose ? window.addEventListener("beforeunload", function (e) { e.preventDefault(), (e.returnValue = "Have you saved your command?"); }) : window.removeEventListener("beforeunload", function ( e ) { e.preventDefault(), (e.returnValue = "Have you saved your command?"); }); }); } readSettings() { localStorage.namespace ? (this.namespace = localStorage.namespace) : (this.namespace = ""), localStorage.updateNamespace && "true" == localStorage.updateNamespace ? (this.updateNamespace = !0) : (this.updateNamespace = !1), localStorage.removeSlash && "true" == localStorage.removeSlash ? (this.removeSlash = !0) : (this.removeSlash = !1), localStorage.loadItemUI && "true" == localStorage.loadItemUI ? (this.loadItemUI = !0) : (this.loadItemUI = !1), localStorage.warnOnClose && "true" == localStorage.warnOnClose ? ((this.warnOnClose = !0), "true" == localStorage.warnOnClose && window.addEventListener("beforeunload", function (e) { e.preventDefault(), (e.returnValue = "Have you saved your command?"); })) : (this.warnOnClose = !1), $("#namespace").val(this.namespace), $("#updateNamespace").attr("checked", this.updateNamespace), $("#loadItemUI").attr("checked", this.loadItemUI), $("#removeSlash").attr("checked", this.removeSlash), $("#warnOnClose").attr("checked", this.warnOnClose); } modifyNamespace(e) { this.updateNamespace && ((this.namespace = e), $("#namespace").val(this.namespace), this.writeSettings()); } writeSettings() { (localStorage.loadItemUI = this.loadItemUI), (localStorage.namespace = this.namespace), (localStorage.updateNamespace = this.updateNamespace), (localStorage.removeSlash = this.removeSlash), (localStorage.warnOnClose = this.warnOnClose); } } function showSettings() { $("#settings").css({ top: mouse.y + 200, left: mouse.x }), $("#settings").show(); } function occurrences(e, t, a) { if (((e += ""), (t += "").length <= 0)) return e.length + 1; for (var o = 0, n = 0, s = a ? 1 : t.length; (n = e.indexOf(t, n)) >= 0; ) ++o, (n += s); return o; } class CMDParser { constructor(e) { (this.level = 0), (this.state = "S"), (e = e.trim()), (this.nbt = null), (this.executeParts = []); } parseLootTableNBT(e, t, a) { (this.nbt = convert_value_to_contents(extractSegment("{", "}", 0, a))), (this.root = this.parseCompound(this.nbt)), loadItemNBTIntoSlot( { tag: { type: "compound", val: this.root } }, t, e, this ); } parseTheCommand(e) { this.preParts = e.split(/\s+/); for (var t = 0; t < this.preParts.length; t++) for ( ; t + 1 < this.preParts.length && (occurrences(this.preParts[t], "[", !1) != occurrences(this.preParts[t], "]", !1) || occurrences(this.preParts[t], "{", !1) != occurrences(this.preParts[t], "}", !1)); ) (this.preParts[t] += " " + this.preParts[t + 1]), this.preParts.splice(t + 1, 1); var a; if ( -1 != this.preParts[0].indexOf("execute") && -1 == e.indexOf("execute if entity") ) { for ( a = "execute", this.preParts.splice(0, 1); "run" != this.preParts[0] && this.preParts.length > 0; ) (a += " " + this.preParts[0]), this.preParts.splice(0, 1); this.preParts.splice(0, 1); } for (t = 0; t < this.preParts.length; t++) "{" == this.preParts[t].charAt(0) ? (this.nbt = extractSegment("{", "}", 0, this.preParts[t])) : "[" == this.preParts[t].charAt(0) ? (this.nbt = extractSegment("[", "]", 0, this.preParts[t])) : "@" == this.preParts[t].charAt(0) ? -1 != this.preParts[t].indexOf("nbt=") && (this.nbt = extractSegment( "{", "}", this.preParts[t].indexOf("nbt=") + 4, this.preParts[t] )) : -1 != this.preParts[t].indexOf("{") && (this.nbt = extractSegment( "{", "}", this.preParts[t].indexOf("{"), this.preParts[t] )); if ( ((this.nbt = convert_value_to_contents(this.nbt)), -1 == this.preParts[0].indexOf("tellraw") && -1 == this.preParts[0].indexOf("title") && (this.root = this.parseCompound(this.nbt)), $("#disableOutput").prop("checked", !0), -1 != this.preParts[0].indexOf("summon")) ) { loadForm("summon"); var o = extractMinecraftID113(this.preParts[1]); if ( !$("#entity" + entityIndex + " option[value='" + o + "']") .length ) throw new MCSException(o + " is not a valid entity id"); $("#entity" + entityIndex).val(o), $("#entity" + entityIndex).trigger("change"), $("#Summon").val( this.preParts[2] + " " + this.preParts[3] + " " + this.preParts[4] ), this.loadSummonCommand(this.root, entityIndex); } else if ( -1 != this.preParts[0].indexOf("execute") && -1 != this.preParts[1].indexOf("if") && -1 != this.preParts[2].indexOf("entity") ) { loadForm("execute if entity"); var n = this.preParts[3]; try { loadTargetSelectorsFromCommand113(n), this.loadSummonCommand(this.root, entityIndex); } catch (e) { throw e; } } else if ( -1 != this.preParts[0].indexOf("tp") || -1 != this.preParts[0].indexOf("teleport") ) { loadForm("teleport"); try { -1 != this.preParts[1].indexOf("@e") && ($("#entity0").val("entity"), $("#entity0").trigger("change")), loadTargetSelectorsFromCommandGeneric( this.preParts[1], "entity0" ), this.preParts.length > 3 ? ($("#target0").val("block"), $("#target0").trigger("change"), $("#Block").val( this.preParts[2] + " " + this.preParts[3] + " " + this.preParts[4] )) : ($("#target0").val( "e" == this.preParts[2].charAt(1) ? "entity" : "player" ), $("#target0").trigger("change"), loadTargetSelectorsFromCommandGeneric( this.preParts[2], "target0" )); } catch (e) { throw e; } } else if (-1 != this.preParts[0].indexOf("kill")) { loadForm("kill"); n = this.preParts[1]; try { loadTargetSelectorsFromCommand113(n), this.loadSummonCommand(this.root, entityIndex); } catch (e) { throw e; } } else if (-1 != this.preParts[0].indexOf("data")) { if (-1 != this.preParts[2].indexOf("block")) throw new MCSException( "Sorry 'data merge block' commands can't be imported into the MCStacker form." ); if (-1 != this.preParts[2].indexOf("entity")) { loadForm("data merge entity"); n = this.preParts[3]; for ( var s = 4; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; try { loadTargetSelectorsFromCommand113(n); } catch (e) { throw e; } this.loadSummonCommand(this.root, entityIndex); } } else if (-1 != this.preParts[0].indexOf("give")) { loadForm("give"); for ( n = this.preParts[1], s = 2; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommand113(n); var i = {}, r = extractMinecraftID113(this.preParts[s]); if ( (s++, isNaN(this.preParts[s]) ? (i.Count = { type: "raw", val: 1 }) : (i.Count = { type: "raw", val: this.preParts[s] }), (i.tag = { type: "compound", val: this.root }), $("#GiveItem0").length) ) { if (!$("#GiveItem0 option[value='" + r + "']").length) throw new MCSException(r + " is not a valid item id"); $("#GiveItem0").val(r), $("#GiveItem0").trigger("change"), loadItemNBTIntoSlot(i, r, "GiveItem0", this); } } else if (-1 != this.preParts[0].indexOf("effect")) { loadForm("effect"); (s = 2), (n = this.preParts[s]); for ( s++; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; -1 != n.indexOf("@e") && ($("#entity0").val("entity"), $("#entity0").trigger("change")), loadTargetSelectorsFromCommandGeneric(n, "entity0"); var l = extractMinecraftID113(this.preParts[s]); $("#effect").val(objectKeyByValue(statuseffects1p13, l)), s++, this.preParts.length > s && ($("#seconds").val(this.preParts[s]), s++, this.preParts.length > s && ($("#amplifier").val(this.preParts[s]), s++, this.preParts.length > s && $("#hideParticles").val(this.preParts[s]))); } else if (-1 != this.preParts[0].indexOf("replaceitem")) { if ((loadForm("replaceitem"), "block" == this.preParts[1])) $("#replaceitem").val("block"), $("#replaceitem").trigger("change"), $("#Block").val( this.preParts[2] + " " + this.preParts[3] + " " + this.preParts[4] ), (s = 6); else { n = this.preParts[2]; for ( s = 3; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommand113(n), $("#Slot0").val(this.preParts[s]), s++; } (i = {}), (r = extractMinecraftID113(this.preParts[s])); if ( (s++, (i.Count = { type: "raw", val: this.preParts[s] }), (i.tag = { type: "compound", val: this.root }), !$("#GiveItem0 option[value='" + r + "']").length) ) throw new MCSException(r + " is not a valid item id"); $("#GiveItem0").val(r), $("#GiveItem0").trigger("change"), loadItemNBTIntoSlot(i, r, "GiveItem0", this); } else if (-1 != this.preParts[0].indexOf("setblock")) { loadForm("setblock"), $("#Block").val( this.preParts[1] + " " + this.preParts[2] + " " + this.preParts[3] ); o = extractMinecraftID113(this.preParts[4]); if (!$("#block option[value='" + o + "']").length) throw new MCSException(o + " is not a block id"); $("#block").val(o), $("#block").trigger("change"), this.parseBlockState113(this.preParts[4], "BS0"), $("#blockHandle option[value='" + this.preParts[5] + "']") .length > 0 && $("#blockHandle").val(this.preParts[5]), this.loadBlockDataFromNBT($("#block").val()); } else if (-1 != this.preParts[0].indexOf("loot")) { loadForm("loot"); s = 2; if ( ("replace" == this.preParts[1] && ((this.preParts[1] = this.preParts[1] + " " + this.preParts[2]), this.preParts.splice(2, 1)), $("#targetType").val(this.preParts[1]), $("#targetType").trigger("change"), "spawn" == this.preParts[1] || "insert" == this.preParts[1] || "replace block" == this.preParts[1]) ) $("#Loot").val( this.preParts[s] + " " + this.preParts[s + 1] + " " + this.preParts[s + 2] ), (s += 3); else if ( "give" == this.preParts[1] || "replace entity" == this.preParts[1] ) { for ( n = this.preParts[s]; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommandGeneric(n, "entity0"), s++; } if ( (("replace entity" != this.preParts[1] && "replace block" != this.preParts[1]) || ($("#slot").val(this.preParts[s]), s++), $("#sourceType").val(this.preParts[s]), $("#sourceType").trigger("change"), "loot" == this.preParts[s] || "fish" == this.preParts[s]) ) { if ( (s++, $("#LootTable").val(this.preParts[s]), "fish" == this.preParts[s - 1]) ) { $("#Fishing").val( this.preParts[s + 1] + " " + this.preParts[s + 2] + " " + this.preParts[s + 3] ), (s += 4); (i = {}), (r = extractMinecraftID113(this.preParts[s])); if ( ((i.Count = { type: "raw", val: 1 }), (i.tag = { type: "compound", val: this.root }), !$("#FishingTool0 option[value='" + r + "']").length) ) throw new MCSException(r + " is not a valid item id"); $("#FishingTool0").val(r), $("#FishingTool0").trigger("change"), loadItemNBTIntoSlot(i, r, "FishingTool0", this); } } else if ("mine" == this.preParts[s]) { $("#Mining").val( this.preParts[s + 1] + " " + this.preParts[s + 2] + " " + this.preParts[s + 3] ), (s += 4); (i = {}), (r = extractMinecraftID113(this.preParts[s])); if ( ((i.Count = { type: "raw", val: 1 }), (i.tag = { type: "compound", val: this.root }), !$("#MiningTool0 option[value='" + r + "']").length) ) throw new MCSException(r + " is not a valid item id"); $("#MiningTool0").val(r), $("#MiningTool0").trigger("change"), loadItemNBTIntoSlot(i, r, "MiningTool0", this); } else if ("kill" == this.preParts[s]) { s++; for ( n = this.preParts[s]; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommandGeneric(n, "kill0"); } } else if (-1 != this.preParts[0].indexOf("bossbar")) { if ( (loadForm("bossbar"), $("#action").val(this.preParts[1]), $("#ID0").val(this.preParts[2]), "set" == this.preParts[1]) ) { if ( ($("#action").trigger("change"), $("#set").val(this.preParts[3]), "name" == this.preParts[3]) ) importTellrawJSON("bossbarPane", JSON.parse(this.nbt)); else if ("players" == this.preParts[3]) { $("#set").trigger("change"); for ( n = this.preParts[4], s = 5; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommand113(n); } } else if ("add" == this.preParts[1]) { importTellrawJSON("bossbarPane", JSON.parse(this.nbt)); } } else if (-1 != this.preParts[0].indexOf("scoreboard")) { loadForm("scoreboard"), $("#add_modify").val(this.preParts[2]), $("#add_modify").trigger("change"), $("#objective").val(this.preParts[3]), "add" == this.preParts[2] && $("#Criteria0").val(this.preParts[4]), importTellrawJSON("scoreboardPane", JSON.parse(this.nbt)); } else if (-1 != this.preParts[0].indexOf("team")) { loadForm("team"), $("#add_modify").val(this.preParts[1]), $("#add_modify").trigger("change"), $("#team").val(this.preParts[2]), "modify" == this.preParts[1] && $("#Part0").val(this.preParts[3]), importTellrawJSON("teamPane", JSON.parse(this.nbt)); } else if ( -1 != this.preParts[0].indexOf("tellraw") || -1 != this.preParts[0].indexOf("title") ) { for ( n = this.preParts[1], s = 2; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; -1 != this.preParts[0].indexOf("tellraw") ? loadForm("tellraw") : (loadForm("title"), $("#titleType").val(this.preParts[s])), loadTargetSelectorsFromCommand113(n), importTellrawJSON("tellrawPane", JSON.parse(this.nbt)); } else if (-1 != this.preParts[0].indexOf("particle")) { loadForm("particle"), $("#name").val(this.preParts[1]), $("#name").trigger("change"); s = 2; var c, d = 8; if ( "dust" == this.preParts[1] || -1 != this.preParts[1].indexOf("entity_effect") ) "dust" == this.preParts[1] ? ((c = floatToHex(this.preParts[2]) + floatToHex(this.preParts[3]) + floatToHex(this.preParts[4])), $("#dustSize").val(this.preParts[5]), (s = 6), (d = 12)) : -1 != this.preParts[1].indexOf("entity_effect") && (c = floatToHex(this.preParts[5]) + floatToHex(this.preParts[6]) + floatToHex(this.preParts[7])), new jscolor.color( document.getElementById("mobSpell_color"), {} ).fromString(c.toUpperCase()), changeParticelXdYdZd($("#mobSpell_color").val()); else if ("item" == this.preParts[1]) $("#item0").val(extractMinecraftID(this.preParts[2])), (s = 3); else if ( "block" == this.preParts[1] || "falling_dust" == this.preParts[1] ) { o = extractMinecraftID113(this.preParts[2]); if (!$("#block option[value='" + o + "']").length) throw new MCSException(o + " is not a block id"); $("#block").val(o), $("#block").trigger("change"), this.parseBlockState113(this.preParts[2], "BS0"), (s = 3); } if ( ($("#Location").val( this.preParts[s] + " " + this.preParts[++s] + " " + this.preParts[++s] ), "item" == this.preParts[1] || "falling_dust" == this.preParts[1] || "block" == this.preParts[1] ? ((s = 6), (d = 9)) : "dust" == this.preParts[1] ? ((s = 9), (d = 12)) : "entity_effect" == this.preParts[1] || "ambient_entity_effect" == this.preParts[1] ? ((d = 8), (s = 5)) : (s = 5), -1 == this.preParts[1].indexOf("entity_effect") && ($("#xd").val(this.preParts[s]), $("#yd").val(this.preParts[++s]), $("#zd").val(this.preParts[++s])), $("#speed").val(this.preParts[d]), this.preParts.length > 9 && ($("#count").val(this.preParts[++d]), this.preParts.length > 10 && "force" == this.preParts[++d] && $("#mode").val("force"), this.preParts.length - 1 > d)) ) { for ( n = this.preParts[++d]; -1 != n.indexOf("[") && -1 == n.indexOf("]") && d < this.preParts.length; ) (n += " " + this.preParts[d]), d++; showHide("TSPane", "TSPaneSH"), loadTargetSelectorsFromCommand113(n); } } else if (-1 != this.preParts[0].indexOf("playsound")) { loadForm("playsound"), $("#sound").val(this.preParts[1]), $("#source").val(this.preParts[2]); for ( n = this.preParts[3], s = 4; -1 != n.indexOf("[") && -1 == n.indexOf("]") && s < this.preParts.length; ) (n += " " + this.preParts[s]), s++; loadTargetSelectorsFromCommand113(n); try { $("#Position").val( this.preParts[s] + " " + this.preParts[s + 1] + " " + this.preParts[s + 2] ), $("#volume").val(this.preParts[s + 3]), $("#pitch").val(this.preParts[s + 4]), $("#minvolume").val(this.preParts[s + 5]); } catch (e) {} } else { if (-1 == this.preParts[0].indexOf("fill")) throw new MCSException( "MCStacker can't import '" + this.preParts[0] + "' commands ." ); loadForm("fill"), $("#Corner").val( this.preParts[1] + " " + this.preParts[2] + " " + this.preParts[3] ), $("#Opposite").val( this.preParts[4] + " " + this.preParts[5] + " " + this.preParts[6] ); o = extractMinecraftID113(this.preParts[7]); if (!$("#block option[value='" + o + "']").length) throw new MCSException(o + " is not a block id"); if ( ($("#block").val(o), $("#block").trigger("change"), this.parseBlockState113(this.preParts[7], "BS0"), $("#blockHandle option[value='" + this.preParts[8] + "']") .length > 0 && $("#blockHandle").val(this.preParts[8]), this.preParts.length > 9) ) { if ( ((o = extractMinecraftID113(this.preParts[9])), !$("#replaceblock option[value='" + o + "']").length) ) throw new MCSException(o + " is not a valid block id."); $("#replaceblock").val(o), $("#replaceblock").trigger("change"), this.parseBlockState113(this.preParts[9], "ReplaceBS0"); } this.loadBlockDataFromNBT($("#block").val()); } void 0 != a && (createExecuteForm(), $("#exeString").val(a + " run")), $("#disableOutput").prop("checked", !1), generateCommand(); } parseBlockState113(e, t) { for (var a = "", o = 0; o < e.length; o++) { if ("{" == e.charAt(o)) return; if ("[" == e.charAt(o)) { a = (a = e.substr(o + 1)).substr(0, a.indexOf("]")); break; } } if (a.length) { var n = a.split(","); for (o = 0; o < n.length; o++) { var s = n[o].split("="); $("#" + s[0] + t).val(s[1]); } } } loadBlockDataFromNBT(e) { if (-1 != e.indexOf("_banner")) { if (void 0 != this.root.Patterns) { let e = compoundToNBTString(this.root); $("#BlockEntityTag0").val( "Patterns:" + extractSegment("[", "]", e.indexOf("Patterns") + 9, e) ); } this.loadBlockDataCommand(this.root, e); } else if ( ("player_head" != e && "player_wall_head" != e) || void 0 == this.root.Owner ) if ("campfire" == e || "soul_campfire" == e) { if ( (this.loadBlockDataCommand(this.root, e), void 0 != this.root.CookingTimes) ) for ( var t = 0; t < 4 && t < this.root.CookingTimes.val.length; t++ ) $("#" + t + "CookingTime0").val( this.root.CookingTimes.val[t].trim() ); if (void 0 != this.root.CookingTotalTimes) for ( t = 0; t < 4 && t < this.root.CookingTotalTimes.val.length; t++ ) $("#" + t + "CookingTotalTime0").val( this.root.CookingTotalTimes.val[t].trim() ); } else "jukebox" == e ? (void 0 != this.root.RecordItem && (showHide("RecordItem0Pane", "RecordItem0SH"), setupItemSlotForNBT( "RecordItem0", this.root.RecordItem.val, this )), void 0 != this.root.Record && $("#Record0").val(this.root.Record.val)) : "lectern" == e ? (void 0 != this.root.Book && (showHide("Book0Pane", "Book0SH"), setupItemSlotForNBT( "Book0", this.root.Book.val, this )), void 0 != this.root.Page && $("#Page0").val(this.root.Page.val)) : "spawner" == e ? (void 0 != this.root.SpawnData && loadSpawnPotentialFromNBT( this, "SpawnData", [this.root.SpawnData.val], 0 ), void 0 != this.root.SpawnPotentials && loadSpawnPotentialFromNBT( this, "SpawnPotentials", this.root.SpawnPotentials.val, 0 ), this.loadBlockDataCommand(this.root, e)) : "beehive" == e || "bee_nest" == e ? loadBeeHiveNestFromNBT(this, this.root, 0) : -1 != e.indexOf("sign") ? (loadSignFromNBT("blockSpec0SignPane", this.root), this.loadBlockDataCommand(this.root, e)) : this.loadBlockDataCommand(this.root, e); else $("#SkullOwner0").val( "Owner:" + compoundToNBTString(this.root.Owner.val) ); } loadPosition(e, t, a) { a && t.length > 1 ? $("#" + e).val(t.substr(1)) : a || $("#" + e).val(t); } padding() { return ""; } loadBlockDataCommand(e, t) { for (var a in e) { var o = e[a]; "raw" == o.type || "string" == o.type ? block.loadValue(this, a, o.val) : "compound" == o.type ? this.loadBlockDataCommand(o.val, t) : "arrayOfVals" == o.type || "arrayOfStrings" == o.type ? block.loadValue(this, a, o.val) : "arrayOfCompounds" == o.type && block.loadValue(this, a, o.val); } } loadSummonCommand(e, t) { for (var a in e) { var o = e[a]; if ("raw" == o.type || "string" == o.type) entityDescriptors["e" + t].loadValue(this, a, o.val, t); else if ("compound" == o.type) "Item" == a ? "potion" == entityDescriptors["e" + t].entityType ? entityDescriptors["e" + t].loadPotionNBT(o.val) : (showHide("Item" + t + "Pane", "Item" + t + "SH"), setupItemSlotForNBT("Item" + t, o.val, this)) : "Trident" == a ? (showHide("Trident" + t + "Pane", "Trident" + t + "SH"), setupItemSlotForNBT("Trident" + t, o.val, this)) : "SelectedItem" == a ? setupItemSlotForNBT("SelectedItem" + t, o.val, this) : "Pose" == a ? entityDescriptors["e" + t].loadPoseNBT(o.val) : "Offers" == a ? entityDescriptors["e" + t].loadVillagerTradesNBT( o.val, this ) : "VillagerData" == a ? loadVillagerData(o.val, t) : "Leash" == a ? entityDescriptors["e" + t].loadLeashNBT(o.val) : "SaddleItem" == a ? entityDescriptors["e" + t].loadSaddleItemNBT(o.val) : "ArmorItem" == a ? (showHide( "ArmorItem" + t + "Pane", "ArmorItem" + t + "SH" ), void 0 != o.val.id && -1 != o.val.id.val.indexOf("minecraft:") ? setupItemSlotForNBT("ArmorItem" + t, o.val, this) : $("#ArmorItem" + t).val("none")) : "DecorItem" == a ? entityDescriptors["e" + t].loadDecorItemNBT(o.val) : "Potion" == a ? entityDescriptors["e" + t].loadPotionNBT(o.val) : "BeamTarget" == a ? entityDescriptors["e" + t].loadBeamTargetNBT(o.val) : "PatrolTarget" == a ? entityDescriptors["e" + t].loadPatrolTargetNBT(o.val) : "WanderTarget" == a ? entityDescriptors["e" + t].loadWanderTargetNBT(o.val) : "FlowerPos" == a || "HivePos" == a ? entityDescriptors["e" + t].loadFlowerOrHovePost(o.val, a) : "Owner" == a || "owner" == a ? entityDescriptors["e" + t].loadOwnerNBT(o.val) : "Target" == a ? entityDescriptors["e" + t].loadTargetNBT(o.val) : "Brain" == a ? loadMemories(o.val, t) : "FireworksItem" == a ? void 0 != o.val.tag && void 0 != o.val.tag.val.Fireworks && loadFireworksItemNBT( "Explosion" + t + "Pane", o.val.tag.val.Fireworks.val ) : "BlockState" == a || "carriedBlockState" == a || "DisplayState" == a ? entityDescriptors["e" + t].loadBlockStateFallingBlock( o.val ) : "TileEntityData" == a ? entityDescriptors["e" + t].loadFallingBlockEntityData( o.val, this ) : "Properties" == a ? entityDescriptors["e" + t].loadFallingBlockBSProperties( o.val ) : "abilities" == a ? entityDescriptors["e" + t].loadAbilities(this, o.val) : "SpawnData" == a ? entityDescriptors["e" + t].loadValue(this, a, [o.val], t) : this.loadSummonCommand(o.val, t); else if ("arrayOfVals" == o.type || "arrayOfStrings" == o.type) entityDescriptors["e" + t].loadValue(this, a, o.val, t); else if ("arrayOfArrays" == o.type) { if ("Trusted" == a) for (let e = 0; e < o.val.length; e++) addFoxTrusts("Trusts", t), loadUUIDArrayNBT("Trusts" + t + "_" + e, o.val[e]); } else "arrayOfCompounds" == o.type && ("Gossips" == a ? loadGossips(o.val, t) : "Inventory" == a ? "player" == entityDescriptors["e" + t].entityType ? entityDescriptors["e" + t].loadPlayerInventory( this, o.val, t ) : "piglin" == entityDescriptors["e" + t].entityType ? entityDescriptors["e" + t].loadPiglinInventory( this, o.val, t ) : loadInventory(o.val, t, this) : entityDescriptors["e" + t].loadValue( this, a, o.val, t )); } } traverseObjectToNBT(e, t) { for (var a in e) { t += ","; var o = e[a]; if ("raw" == o.type) t += a + ":" + o.val; else if ("string" == o.type) t += a + ":'" + o.val + "'"; else if ("compound" == o.type) t += a + ":{" + this.traverseObjectToNBT(o.val, "") + "}"; else if ("arrayOfStrings" == o.type) { t += a + ":["; let e = ""; for (var n = 0; n < o.val.length; n++) e += ',"' + o.val[n] + '"'; t += e.substr(1) + "]"; } else if ("arrayOfVals" == o.type) { t += a + ":[I;"; let e = ""; for (n = 0; n < o.val.length; n++) e += "," + o.val[n]; t += e.substr(1) + "]"; } else if ("arrayOfCompounds" == o.type) { let e = ""; for (n = 0; n < o.val.length; n++) e += ",{" + this.traverseObjectToNBT(o.val[n], "") + "}"; t += a + ":[" + e.substr(1) + "]"; } else if ("arrayOfArrays" == o.type) { let e = ""; for (n = 0; n < o.val.length; n++) e += ",[I;" + o.val[n] + "]"; t += a + ":[" + e.substr(1) + "]"; } } return t.substr(1); } traverseObject(e, t) { for (var a in (this.level++, $("#" + t).append("{"), e)) { var o = e[a]; if ("raw" == o.type) $("#" + t).append( "
" + this.padding() + "" + a + ":" + o.val + "" ); else if ("string" == o.type) $("#" + t).append( "
" + this.padding() + "" + a + ":" + o.val + "" ); else if ("compound" == o.type) $("#" + t).append( "
" + this.padding() + "" + a + "" ), this.traverseObject(o.val, t); else if ("arrayOfVals" == o.type || "arrayOfStrings" == o.type) { $("#" + t).append( "
" + this.padding() + "" + a + ":[" ), this.level++; for (var n = 0; n < o.val.length; n++) $("#" + t).append( "
" + this.padding() + "" + o.val[n] + "" ); this.level--, $("#" + t).append("
" + this.padding() + "]"); } else if ("arrayOfCompounds" == o.type) { $("#" + t).append( "
" + this.padding() + "" + a + ":[" ), this.level++; for (n = 0; n < o.val.length; n++) this.traverseObject(o.val[n], t); this.level--, $("#" + t).append("
" + this.padding() + "]"); } } this.level--, $("#" + t).append("
" + this.padding() + "}"); } parseCompound(e) { var t = 0, a = {}; if (null == e) return {}; do { var o, n, s; if ( (t++, (t = this.skipSpaces(t, e)), '"' == e.charAt(t) ? (t++, (s = this.getStringToNextSymbol('"', e, t)), t++) : (s = this.getStringToNextSymbol(":}", e, t)), (t += s.length), s.length) ) if ( ((o = s.trim()), t++, (t = this.skipSpaces(t, e)), "{" == e.charAt(t)) ) (t += (l = extractSegment("{", "}", t, e)).length), (n = this.parseCompound(l)), this.getStringToNextSymbol(",", e, t), (a[o] = { type: "compound", val: n }); else if ("[" == e.charAt(t)) if ( ((n = []), (t += (s = extractSegment("[", "]", t, e)).length), "{" == s.charAt(1)) ) { var i = 1; let e; do { (i += (e = extractSegment("{", "}", i, s)).length), n.push(this.parseCompound(e)), "," == s.charAt(i) && i++; } while ("{" == s.charAt(i)); a[o] = { type: "arrayOfCompounds", val: n }; } else if ('"' == s.charAt(1)) { i = 1; for (var r = []; "]" != s.charAt(i); ) "," == s.charAt(i) && i++, (i += (n = this.getStringToNextSymbolInsideString( ",}", s, i )).length), r.push(n.substr(1, n.length - 2)); a[o] = { type: "arrayOfStrings", val: r }; } else if ("'" == s.charAt(1)) { var l; ((l = (l = replaceAll( "', '", "','", (l = extractSegment("[", "]", (i = 1), s)) )).split("','"))[0] = l[0].substr(1)), (l[l.length - 1] = replaceAll( "']", "", l[l.length - 1] )); for (var c = 0; c < l.length; c++) l[c] = l[c] .replace(/"/g, '\\"') .replace(/\\'/g, "'"); a[o] = { type: "arrayOfStrings", val: l }; } else if ("[" == s.charAt(1)) { i = 1; let e, t = []; do { i += (e = extractSegment("[", "]", i, s)).length; let a = e.substr(1, e.length - 2).trim(); "I" == a.charAt(0) && ";" == a.charAt(1) && (a = a.substr(2)), t.push(a.split(",")), "," == s.charAt(i) && i++; } while ("[" == s.charAt(i)); a[o] = { type: "arrayOfArrays", val: t }; } else "I" == (s = s.substr(1, s.length - 2).trim()).charAt(0) && ";" == s.charAt(1) && (s = s.substr(2)), (a[o] = { type: "arrayOfVals", val: s.split(",") }); else '"' == e.charAt(t) ? ((n = this.getStringToNextSymbolInsideString( ",}", e, t )), (a[o] = { type: "string", val: n.substr(1, n.length - 2), }), (t += n.length)) : "'" == e.charAt(t) ? ((n = this.getStringToNextSymbolInsideString_SingleQuoteSurounds( ",}", e, t )), (a[o] = { type: "string", val: n.substr(1, n.length - 2), }), (t += n.length)) : ((t += (n = this.getStringToNextSymbol(",}", e, t)) .length), (a[o] = { type: "raw", val: n })); } while ("}" != e.charAt(t) && t < e.length); return a; } skipSpaces(e, t) { for (; e < t.length && " " == t.charAt(e); ) e++; return e; } getStringToNextSymbolInsideString(e, t, a) { for (var o = !0, n = ""; a < t.length && o; ) (n += t.charAt(a)), a++, '"' == t.charAt(a) && "\\" != t.charAt(a - 1) && ((o = !1), (n += t.charAt(a))); return this.getStringToNextSymbol(e, t, a), n; } getStringToNextSymbolInsideString_SingleQuoteSurounds(e, t, a) { for (var o = !0, n = ""; a < t.length && o; ) (n += t.charAt(a)), a++, "'" == t.charAt(a) && "\\" != t.charAt(a - 1) && ((o = !1), (n += t.charAt(a))); return this.getStringToNextSymbol(e, t, a), n; } getStringToNextSymbol(e, t, a) { for (; "," == t.charAt(a) || "{" == t.charAt(a); ) a++; for (var o = ""; a < t.length && -1 == e.indexOf(t.charAt(a)); ) (o += t.charAt(a)), a++; return o; } } function extractSegment(e, t, a, o) { var n = 1, s = e; for (a += 1; 0 != n && a < o.length; a++) o.charAt(a) == e ? n++ : o.charAt(a) == t && n--, (s += o.charAt(a)); return s; } class Entity { constructor(e, t) { (this.stackPos = e), (this.entityType = t), (this.passengersAllowed = !0), (this.entityNBT = { MotionX: { type: "text", format: "special", tip: "entity.Motion", }, MotionY: { type: "text", format: "special", tip: "entity.Motion", }, MotionZ: { type: "text", format: "special", tip: "entity.Motion", }, Yaw: { type: "text", format: "special", tip: "entity" }, Pitch: { type: "text", format: "special", tip: "entity" }, Fire: { type: "ticks", tip: "entity" }, Air: { type: "ticks", tip: "entity" }, OnGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, NoGravity: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Silent: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Invulnerable: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Glowing: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, UUID: { type: "UUIDArray", format: "intArray", align: "R", tip: "entity", }, CustomNameVisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, CustomName: { type: "customNameJSON", format: "special", tip: "entity", }, Team: { type: "text", format: "string", tip: "mob" }, Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, }); } addSpawnPotentialFields() { (this.spNBT = { PosX: { type: "text", label: "Pos X", format: "special", tip: "entity.Pos", }, PosY: { type: "text", label: "Pos Y", format: "special" }, PosZ: { type: "text", label: "Pos Z", format: "special" }, Weight: { type: "text", format: "special", tip: "entity" }, }), Object.assign(this.entityNBT, this.spNBT); } getEntityNBT() { var e = ""; for (var t in this.entityNBT) e += getNBTforKey(t, this.entityNBT[t], this.stackPos); return ( (e += getMotion(this.stackPos, "Motion") + getRotation(this.stackPos)), (e += getTargetingTags(this.stackPos)), (e += getPassengersNBT(this.stackPos)), (e += getCustomNameAndColor("#CustomName", this.stackPos)) ); } loadBlockStateFallingBlock(e) { if ( (void 0 != e.Name && ($("#block" + this.stackPos).val( extractMinecraftID(e.Name.val) ), $("#block" + this.stackPos).trigger("change")), void 0 != e.Properties) ) for (var t in e.Properties.val) $("#" + t + "BS" + this.stackPos).val(e.Properties.val[t].val); } generateForm() { for (var e in ("entitydata" != currentCommand && "data merge entity" != currentCommand && this.passengersAllowed && (this.entityNBT.Passengers = { type: "passenger", format: "special", tip: "entity", cssClass: "dummy", align: "B", }), this.entityNBT)) createComponent( "entityPane" + this.stackPos, e, this.entityNBT[e], this.stackPos ); } loadOwnerNBT(e) { "evoker_fangs" == this.entityType || "llama_spit" == this.entityType ? convertLeastMostToArray( "Owner" + this.stackPos, parseInt(e.OwnerUUIDLeast.val), parseInt(e.OwnerUUIDMost.val) ) : void 0 != e.L && void 0 != e.M && convertLeastMostToArray( "Owner" + this.stackPos, parseInt(e.L.val), parseInt(e.M.val) ); } loadTargetNBT(e) { void 0 != e.L && void 0 != e.M && convertLeastMostToArray( "Target" + this.stackPos, parseInt(e.L.val), parseInt(e.M.val) ); } loadValue(e, t, a, o) { if (void 0 == this.entityNBT[t]) if ("HandItems" == t || "ArmorItems" == t) for ( var n = "HandItems" == t ? ["Holding", "Offhand"] : ["Boot", "Leg", "Body", "Head"], s = 0; s < a.length; s++ ) setupItemSlotForNBT(n[s] + o, a[s], e); else if ("HandDropChances" == t || "ArmorDropChances" == t) for ( n = "HandDropChances" == t ? ["Holding", "Offhand"] : ["Boot", "Leg", "Body", "Head"], s = 0; s < a.length; s++ ) (cachedNBT.dropChance[n[s] + o] = parseFloat(a[s])), $("#" + n[s] + o + "Pane").append( "
Drop Chance=" + cachedNBT.dropChance[n[s] + o] ), $("#" + n[s] + o + "DropChance").val(parseFloat(a[s])); else if ("Items" == t) for (s = 0; s < a.length; s++) { setupItemSlotForNBT( replaceAll("b", "", a[s].Slot.val) + "Slot" + o, a[s], e ); } else if ( "Motion" == t || "power" == t || "direction" == t || "Pos" == t ) $("#" + t + "X" + o).val(parseFloat(a[0])), $("#" + t + "Y" + o).val(parseFloat(a[1])), $("#" + t + "Z" + o).val(parseFloat(a[2])); else if ("Rotation" == t) $("#Yaw" + o).val(parseFloat(a[0])), $("#Pitch" + o).val(parseFloat(a[1])); else if ("DisabledSlots" == t) this.loadDisabledSlotsNBT(a); else if ("Attributes" == t) for (s = 0; s < a.length; s++) { var i = a[s].Name.val; (i = i.substr(i.indexOf(".") + 1)), -1 != mobAttributes116.indexOf(i) ? $("#" + i + o).val(parseFloat(a[s].Base.val)) : -1 != mobAttributes.indexOf(i) && $( "#" + mobAttributes116[ mobAttributes.indexOf(i) ] + o ).val(parseFloat(a[s].Base.val)); } else if ("SpawnData" == t || "SpawnPotentials" == t) loadSpawnPotentialFromNBT(e, t, a, o); else if ("OwnerUUID" == t) convertHexUUIDToArray("Owner" + o, a); else if ("UUIDMost" == t) convertMostToArray("UUID" + o, a); else if ("UUIDLeast" == t) convertLeastToArray("UUID" + o, a); else if ("OwnerUUIDMost" == t) convertMostToArray("Owner" + o, a); else if ("OwnerUUIDLeast" == t) convertLeastToArray("Owner" + o, a); else if ("ConversionPlayerMost" == t) convertMostToArray("ConversionPlayer" + o, a); else if ("ConversionPlayerLeast" == t) convertLeastToArray("ConversionPlayer" + o, a); else if ("LoveCauseMost" == t) convertMostToArray("LoveCause" + o, a); else { if ("LoveCauseLeast" != t) return; convertLeastToArray("LoveCause" + o, a); } else if ($("#" + t + o).length) if ( "text" == this.entityNBT[t].type || "choice" == this.entityNBT[t].type || "makeSelect" == this.entityNBT[t].type || "makeSelectWithIndexAndValues" == this.entityNBT[t].type || "makeSelectWithIndexes" == this.entityNBT[t].type ) { if ("string" == this.entityNBT[t].format) "Potion" == t ? $("#" + t + o).val(extractMinecraftID(a)) : $("#" + t + o).val(a); else if ( "b" == this.entityNBT[t].format || "short" == this.entityNBT[t].format || "long" == this.entityNBT[t].format || "int" == this.entityNBT[t].format ) { var r = parseInt(a); ("text" == this.entityNBT[t].type || $("#" + t + o + " option[value='" + r + "']").length) && $("#" + t + o).val(r); } else if ( "f" == this.entityNBT[t].format || "d" == this.entityNBT[t].format ) $("#" + t + o).val(parseFloat(a)); else if ("special" == this.entityNBT[t].format) if ("Tags" == t) { var l = ""; for (s = 0; s < a.length; s++) l += "," + a[s]; $("#Tags" + o).val(l.substr(1)); } else "Variant" == t ? this.loadVariantNBT(a) : "Dimension" == t ? $("#Dimension" + o).val(a) : "Motive" == t ? $("#Motive" + o).val(extractMinecraftID(a)) : "Particle" == t ? $("#Particle" + o).val(extractMinecraftID(a)) : "SoundEvent" == t && $("#SoundEvent" + o).val(a); } else "ticks" == this.entityNBT[t].type ? $("#" + t + o).val(a) : "blockSelect" == this.entityNBT[t].type && ($("#" + t + o).val(a), $("#" + t + o).trigger("change")); else if ("CustomName" == t) { var c; (deferJSONOutput = !0), (deferOutput = !0); try { c = JSON.parse(JSON.parse('"' + a + '"')); } catch (e) { c = JSON.parse( JSON.parse( '"' + a.replace(/"/g, '\\"').replace(/\\'/g, "'") + '"' ) ); } importTellrawJSON("CustomName" + o, c), showHide( "CustomName" + o + "EntityName", "CustomName" + o + "EntityNameSH" ), (deferJSONOutput = !1), (deferOutput = !1); } else if ("Passengers" == t) for (s = 0; s < a.length; s++) { addPassenger("Passengers" + o + "Pane"); var d = a[s], p = extractMinecraftID(d.id.val); $("#entity" + entityIndex).val(p), $("#entity" + entityIndex).trigger("change"), e.loadSummonCommand(d, entityIndex); } else "ActiveEffects" == t || "Effects" == t || "CustomPotionEffects" == t ? loadCustomEffectsNBT(t + o, a) : "Color" == t && "colorChooser" == this.entityNBT[t].type ? loadColorIntNBT(t + o, a) : "AngryAt" == t ? Array.isArray(a) ? loadUUIDArrayNBT(t + o, a) : convertHexUUIDToArray(t + o, a) : "UUIDArray" == this.entityNBT[t].type && loadUUIDArrayNBT(t + o, a); } } function loadUUIDArrayNBT(e, t) { for (let a = 0; a < 4; a++) $("#" + e + a).val(t[a]); } function loadCustomEffectsNBT(e, t) { showHide(e + "Pane", e + "SH"); for (var a = 0; a < t.length; a++) { var o = parseInt(t[a].Id.val); void 0 != t[a].Amplifier && $("#" + e + "Amp_" + o).val(parseInt(t[a].Amplifier.val)), void 0 != t[a].Duration && $("#" + e + "Ticks_" + o).val(parseInt(t[a].Duration.val)), void 0 != t[a].ShowParticles && $("#" + e + "ShowParticles_" + o).val(t[a].ShowParticles.val); } } function loadStewEffectsNBT(e, t) { showHide(e + "Pane", e + "SH"); for (var a = 0; a < t.length; a++) { var o = parseInt(t[a].EffectId.val); void 0 != t[a].EffectDuration && $("#" + e + "Ticks_" + o).val(parseInt(t[a].EffectDuration.val)); } } class Mob extends Entity { constructor(e, t, a) { super(e, t), (this.mobNBT = { FallDistance: { type: "text", format: "f", tip: "mob" }, PortalCooldown: { type: "ticks", tip: "mob" }, HurtTime: { type: "ticks", tip: "mob", align: "R" }, DeathTime: { type: "ticks", tip: "mob", align: "R" }, DeathLootTable: { type: "text", format: "string", tip: "mob", align: "R", }, LeftHanded: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, Leashed: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, Leash: { label: "Leashed To", type: "UUIDArray", format: "special", align: "R", tip: "mob", }, LeashedToPostX: { type: "text", format: "special", tip: "mob", align: "R", }, LeashedToPostY: { type: "text", format: "special", tip: "mob", align: "R", }, LeashedToPostZ: { type: "text", format: "special", tip: "mob", align: "R", }, FallFlying: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, ActiveEffects: { type: "statusEffects", format: "special", tip: "mob", align: "R", }, PersistenceRequired: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, NoAI: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, CanPickUpLoot: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, Holding: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, Offhand: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, Head: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, Body: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, Leg: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, Boot: { type: "itemselect", format: "special", doDropChance: !0, hide: !0, tip: "mob", align: "R", }, AbsorptionAmount: { type: "text", format: "f", tip: "mob", align: "R", }, Health: { type: "text", format: "f", tip: "mob", align: "R" }, SleepingX: { type: "text", format: "int", tip: "mob.sleeping", align: "R", }, SleepingY: { type: "text", format: "int", tip: "mob.sleeping", align: "R", }, SleepingZ: { type: "text", format: "int", tip: "mob.sleeping", align: "R", }, }); for (var o = 0; o < 8; o++) this.mobNBT[mobAttributes116[o]] = { type: "text", format: "special", tip: "mob." + mobAttributes116[o], align: "R", }; "zombie" == this.entityType || "husk" == this.entityType || "drowned" == this.entityType ? (this.mobNBT.spawn_reinforcements = { type: "text", format: "special", tip: "mob.spawn_reinforcements", align: "R", }) : -1 != $.inArray(this.entityType, [ "horse", "zombie_horse", "skeleton_horse", "donkey", "mule", ]) ? (this.mobNBT.jump_strength = { type: "text", format: "special", tip: "mob.jump_strength", align: "R", }) : "parrot" == this.entityType && (this.mobNBT.flying_speed = { type: "text", format: "special", tip: "mob.flying_speed", align: "R", }), void 0 != a && Object.assign(this.mobNBT, a); } loadLeashNBT(e) { void 0 != e.UUIDLeast && void 0 != e.UUIDMost ? convertLeastMostToArray( "Leash" + this.stackPos, parseInt(e.UUIDLeast.val), parseInt(e.UUIDMost.val) ) : void 0 != e.X && void 0 != e.Y && void 0 != e.Z && ($("#LeashedToPostX" + this.stackPos).val(parseInt(e.X.val)), $("#LeashedToPostY" + this.stackPos).val(parseInt(e.Y.val)), $("#LeashedToPostZ" + this.stackPos).val(parseInt(e.Z.val))); } getEntitySpecificCommand(e) { return this.getMobNBT(); } getMobNBT() { return ( super.getEntityNBT() + getHandAndArmorItmes(this.stackPos) + getStatusEffectsNBT( "ActiveEffects", "ActiveEffects" + this.stackPos ) + this.getMobAttributes() + this.getLeashedTo() ); } generateForm() { Object.assign(this.entityNBT, this.mobNBT), super.generateForm(); } getLeashedTo() { return $("#Leash" + this.stackPos + 0).val() && $("#Leash" + this.stackPos + 1).val() && $("#Leash" + this.stackPos + 2).val() && $("#Leash" + this.stackPos + 3).val() ? ",Leash:{UUID:[I;" + $("#Leash" + this.stackPos + 0).val() + "," + $("#Leash" + this.stackPos + 1).val() + "," + $("#Leash" + this.stackPos + 2).val() + "," + $("#Leash" + this.stackPos + 3).val() + "]}" : $("#LeashedToPostX" + this.stackPos).val().length && $("#LeashedToPostY" + this.stackPos).val().length && $("#LeashedToPostZ" + this.stackPos).val().length ? ",Leash:{X:" + $("#LeashedToPostX" + this.stackPos).val() + ",Y:" + $("#LeashedToPostY" + this.stackPos).val() + ",Z:" + $("#LeashedToPostZ" + this.stackPos).val() + "}" : ""; } getMobAttributes() { for (var e = "", t = 0; t < 8; t++) $("#" + mobAttributes116[t] + this.stackPos).val().length > 0 && (e += "{Name:generic." + mobAttributes116[t] + ",Base:" + $("#" + mobAttributes116[t] + this.stackPos).val() + "},"); return ( ("zombie" != this.entityType && "husk" != this.entityType && "drowned" != this.entityType) || !$("#spawn_reinforcements" + this.stackPos).val().length ? -1 != $.inArray(this.entityType, [ "horse", "zombie_horse", "skeleton_horse", "donkey", "mule", ]) && $("#jump_strength" + this.stackPos).val().length ? (e += "{Name:horse.jump_strength,Base:" + $("#jump_strength" + this.stackPos).val() + "},") : "parrot" == this.entityType && $("#flying_speed" + this.stackPos).val().length && (e += "{Name:generic.flying_speed,Base:" + $("#flying_speed" + this.stackPos).val() + "},") : (e += "{Name:zombie.spawn_reinforcements,Base:" + $("#spawn_reinforcements" + this.stackPos).val() + "},"), e.length ? ",Attributes:[" + e.substring(0, e.length - 1) + "]" : e ); } } class SimpleEntity extends Entity { constructor(e, t, a) { super(e, t), (this.entityNBT = { MotionX: { type: "text", format: "special", tip: "entity.Motion", }, MotionY: { type: "text", format: "special", tip: "entity.Motion", }, MotionZ: { type: "text", format: "special", tip: "entity.Motion", }, Yaw: { type: "text", format: "special", tip: "entity" }, Pitch: { type: "text", format: "special", tip: "entity" }, NoGravity: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Fire: { type: "ticks", tip: "entity" }, Glowing: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, UUID: { type: "UUIDArray", format: "intArray", align: "R", tip: "entity", }, CustomName: { type: "customNameJSON", format: "special", tip: "entity", }, CustomNameVisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Team: { type: "text", format: "string", tip: "mob" }, Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, }), void 0 != a && Object.assign(this.entityNBT, a); } getEntityNBT() { var e = ""; for (var t in this.entityNBT) e += getNBTforKey(t, this.entityNBT[t], this.stackPos); return ( (e += getMotion(this.stackPos, "Motion") + getRotation(this.stackPos)), (e += getTargetingTags(this.stackPos)), (e += getPassengersNBT(this.stackPos)), (e += getCustomNameAndColor("#CustomName", this.stackPos)) ); } getEntitySpecificCommand(e) { return this.getEntityNBT(); } generateForm() { super.generateForm(); } } class falling_block extends SimpleEntity { constructor(e, t) { super(e, t), delete this.entityNBT.CustomName, delete this.entityNBT.CustomNameVisible, Object.assign(this.entityNBT, { Time: { type: "ticks", value: "1", tip: t, align: "R" }, DropItem: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, HurtEntities: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, FallHurtMax: { type: "text", format: "int", tip: t, align: "R", }, FallDistance: { type: "text", format: "f", tip: "mob", align: "R", }, FallHurtAmount: { type: "text", format: "f", tip: t, align: "R", }, }); } generateForm() { var e = "
Block"; e += ""), super.generateForm(), $("#entityPane" + this.stackPos + "R").append(e); } getEntitySpecificCommand(e) { var t = ""; if (-1 != $("#block" + e).val()) { if ( ((t = ',BlockState:{Name:"minecraft:' + $("#block" + e).val() + '"'), $("#block" + e).val() in blockStates) ) { var a = blockStates[$("#block" + e).val()], o = ""; for (var n in a) "unset" != $("#" + n + "BS" + e).val() && (o += "," + n + ':"' + $("#" + n + "BS" + e).val() + '"'); 0 != o.length && (t += ",Properties:{" + o.substr(1) + "}"); } t += "}"; var s = blocks[e].getBlockNBT(e); s.length && (t += ",TileEntityData:" + s); } for (var n in this.entityNBT) t += getNBTforKey(n, this.entityNBT[n], e); return ( (t += getMotion(e, "Motion")), (t += getTargetingTags(e)), (t += getPassengersNBT(e)) ); } loadFallingBlockEntityData(e, t) { if (-1 != blocks[this.stackPos].bType.indexOf("_banner")) $("#BlockEntityTag" + this.stackPos).val(compoundToNBTString(e)); else if (-1 != blocks[this.stackPos].bType.indexOf("command_block")) { if (void 0 != e.CommandStats) { var a = e.CommandStats.val; for (var o in a) $("#" + o + this.stackPos).val(a[o].val); } } else "end_gateway" == blocks[this.stackPos].bType ? void 0 != e.ExitPortal && ($("#X" + this.stackPos).val(e.ExitPortal.val.X.val), $("#Y" + this.stackPos).val(e.ExitPortal.val.Y.val), $("#Z" + this.stackPos).val(e.ExitPortal.val.Z.val)) : -1 != blocks[this.stackPos].bType.indexOf("spawner") ? (void 0 != e.SpawnData && loadSpawnPotentialFromNBT( t, "SpawnData", [e.SpawnData.val], this.stackPos ), void 0 != e.SpawnPotentials && loadSpawnPotentialFromNBT( t, "SpawnPotentials", e.SpawnPotentials.val, this.stackPos )) : "sign" == blocks[this.stackPos].bType || "wall_sign" == blocks[this.stackPos].bType ? loadSignFromNBT("blockSpec" + this.stackPos, e) : ("player_head" != blocks[this.stackPos].bType && "player_wall_head" != blocks[this.stackPos].bType) || $("#SkullOwner" + this.stackPos).val(compoundToNBTString(e)); for (var n in e) blocks[this.stackPos].loadValue(t, n, e[n].val, this.stackPos); } } class lightning_bolt extends Entity { constructor(e, t) { super(e, t), (this.passengersAllowed = !1), (this.entityNBT = { Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, }); } getEntitySpecificCommand(e) { return getTargetingTags(this.stackPos); } } class fishing_bobber extends Entity { constructor(e, t) { super(e, t), (this.passengersAllowed = !1), (this.entityNBT = { OnGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, }, }); } getEntitySpecificCommand(e) { return -1 != $("#OnGround" + e).val() ? ",OnGround:" + $("#OnGround" + e).val() + "b" : ""; } } class pillager extends Mob { constructor(e, t, a) { super(e, t, a), (this.myNBT = { PatrolLeader: { type: "choice", values: unsetTrueFalse, format: "b", tip: "pillager.PatrolLeader", align: "R", }, Patrolling: { type: "choice", values: unsetTrueFalse, format: "b", tip: "pillager.Patrolling", align: "R", }, HasRaidGoal: { type: "choice", values: unsetTrueFalse, format: "b", tip: "pillager.HasRaidGoal", align: "R", }, PatrolTargetX: { type: "text", format: "special", tip: "pillager.PatrolTarget", align: "R", }, PatrolTargetY: { type: "text", format: "special", align: "R" }, PatrolTargetZ: { type: "text", format: "special", align: "R" }, Wave: { type: "text", format: "int", tip: "pillager.Wave", align: "R", }, RaidId: { type: "text", format: "int", tip: "pillager.RaidId", align: "R", }, }), void 0 != this.specificNBT && Object.assign(this.myNBT, this.specificNBT); } getEntitySpecificCommand(e) { return ( super.getEntityNBT() + getTargetCompound(this.stackPos, "PatrolTarget") + getHandAndArmorItmes(this.stackPos) + getStatusEffectsNBT( "ActiveEffects", "ActiveEffects" + this.stackPos ) + this.getMobAttributes() + this.getLeashedTo() ); } loadPatrolTargetNBT(e) { $("#PatrolTargetX" + this.stackPos).val(parseInt(e.X.val)), $("#PatrolTargetY" + this.stackPos).val(parseInt(e.Y.val)), $("#PatrolTargetZ" + this.stackPos).val(parseInt(e.Z.val)); } generateForm() { Object.assign(this.mobNBT, this.myNBT), super.generateForm(); } } class ender_crystal extends Entity { constructor(e, t) { super(e, t), (this.myNBT = { ShowBottom: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, BeamTargetX: { type: "text", format: "special", tip: "ender_crystal.BeamTarget", align: "R", }, BeamTargetY: { type: "text", format: "special", tip: "ender_crystal.BeamTarget", align: "R", }, BeamTargetZ: { type: "text", format: "special", tip: "ender_crystal.BeamTarget", align: "R", }, }); } getEntitySpecificCommand(e) { return ( super.getEntityNBT() + getTargetCompound(this.stackPos, "BeamTarget") ); } loadBeamTargetNBT(e) { $("#BeamTargetX" + this.stackPos).val(parseInt(e.X.val)), $("#BeamTargetY" + this.stackPos).val(parseInt(e.Y.val)), $("#BeamTargetZ" + this.stackPos).val(parseInt(e.Z.val)); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class evoker_fangs extends Entity { constructor(e, t) { super(e, t), (this.myNBT = { Warmup: { type: "ticks", tip: t, align: "R" }, Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: t, }, }); } getEntitySpecificCommand(e) { return super.getEntityNBT(); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class llama_spit extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: t, }, }); } getEntitySpecificCommand(e) { return super.getEntityNBT(); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class item extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { Item: { type: "itemselect", format: "special", hide: !1, tip: t, align: "R", forceConstruct: !0, }, Age: { type: "ticks", tip: t, align: "R" }, Health: { type: "text", format: "short", tip: t, align: "R" }, PickupDelay: { type: "ticks", tip: t, align: "R" }, Thrower: { type: "UUIDArray", format: "intArray", align: "R", tip: t, }, Fire: { type: "ticks", tip: "entity" }, }); } getEntitySpecificCommand(e) { return super.getEntityNBT() + ",Item:" + getItemNBT("Item" + e); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class painting extends SimpleEntity { getEntitySpecificCommand(e) { return ( super.getEntityNBT() + ',Motive:"minecraft:' + $("#Motive" + e).val() + '"' ); } } class item_frame extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { Item: { type: "itemselect", format: "special", hide: !1, tip: "item", align: "R", forceConstruct: !0, }, Facing: { type: "choice", values: [ [-1, "unset"], ["0", "Down"], ["1", "Up"], ["2", "North"], ["3", "South"], ["4", "West"], ["5", "East"], ], format: "b", tip: t, align: "R", }, ItemRotation: { type: "choice", values: [ [-1, "unset"], ["1", "45°"], ["2", "90°"], ["3", "135°"], ["4", "180°"], ["5", "225°"], ["6", "270°"], ["7", "315°"], ], format: "b", tip: t, align: "R", }, Invulnerable: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", align: "R", }, Invisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, Fixed: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, }); } getEntitySpecificCommand(e) { return super.getEntityNBT() + ",Item:" + getItemNBT("Item" + e); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class shulker_bullet extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "shlkrblt116", }, Target: { type: "UUIDArray", format: "intArray", align: "R", tip: "shlkrblt116", }, TXD: { type: "text", format: "d", tip: "shulker_bullet.offset", align: "R", }, TYD: { type: "text", format: "d", align: "R" }, TZD: { type: "text", format: "d", align: "R" }, Steps: { type: "text", format: "int", tip: t, align: "R" }, }); } getEntitySpecificCommand(e) { return super.getEntityNBT(); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class Player extends Entity { constructor(e, t) { super(e, t), (this.stackPos = e), (this.entityType = t), (this.entityNBT = { FallFlying: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", }, AbsorptionAmount: { type: "text", format: "f", tip: "mob" }, Health: { type: "text", format: "f", tip: "mob" }, FallDistance: { type: "text", format: "f", tip: "mob" }, PortalCooldown: { type: "ticks", tip: "mob" }, DataVersion: { type: "text", format: "int", tip: t }, Dimension: { type: "choice", values: [ [-2, "unset"], [-1, "The Nether"], [0, "The Overworld"], [1, "The End"], ], format: "special", tip: t, }, Score: { type: "text", format: "int", tip: t }, SelectedItemSlot: { type: "text", format: "int", tip: t }, SelectedItem: { type: "itemselect", format: "special", hide: !0, tip: t, }, Inventory: { type: "multiitem", hide: !0, slotNumbers: !0, tip: t, }, SpawnX: { type: "text", format: "int", tip: "player.spawn" }, SpawnY: { type: "text", format: "int" }, SpawnZ: { type: "text", format: "int" }, SpawnForced: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, }, Sleeping: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, }, foodLevel: { type: "text", format: "int", tip: t, align: "R" }, XpLevel: { type: "text", format: "int", tip: t, align: "R" }, XpP: { type: "text", format: "f", tip: t, align: "R" }, XpTotal: { type: "text", format: "int", tip: t, align: "R" }, walkSpeed: { type: "text", format: "special", tip: t, align: "R", }, flySpeed: { type: "text", format: "special", tip: t, align: "R", }, mayfly: { type: "choice", values: unsetTrueFalse, format: "special", tip: t, align: "R", }, flying: { type: "choice", values: unsetTrueFalse, format: "special", tip: t, align: "R", }, invulnerable: { type: "choice", values: unsetTrueFalse, format: "special", tip: t, align: "R", }, mayBuild: { type: "choice", values: unsetTrueFalse, format: "special", tip: t, align: "R", }, instaBuild: { type: "choice", values: unsetTrueFalse, format: "special", tip: t, align: "R", }, seenCredits: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, }); } loadAbilities(e, t) { for (var a in t) -1 != t[a].val.indexOf("b") ? $("#" + a + this.stackPos).val(parseInt(t[a].val)) : $("#" + a + this.stackPos).val(parseFloat(t[a].val)); } loadPlayerInventory(e, t, a) { let o = "Inventory" + a + "MultiItem"; showHide(o + "Pane", o + "PaneSH"); for (let a = 0; a < t.length; a++) addMultiItem(o + "Pane", !0), showHide(o + "Pane_" + a + "Pane", o + "Pane_" + a + "PaneSH"), setupItemSlotForNBT(o + "Pane_" + a, t[a], e), void 0 != t[a].Slot && $("#" + o + "Pane_" + a + "Slot").val( parseInt(t[a].Slot.val) ); } getAbilities(e) { var t = ""; return ( $("#walkSpeed" + e).val().length && (t += ",walkSpeed:" + $("#walkSpeed" + e).val() + "f"), $("#flySpeed" + e).val().length && (t += ",flySpeed:" + $("#flySpeed" + e).val() + "f"), -1 != $("#mayfly" + e).val() && (t += ",mayfly:" + $("#mayfly" + e).val() + "b"), -1 != $("#flying" + e).val() && (t += ",flying:" + $("#flying" + e).val() + "b"), -1 != $("#invulnerable" + e).val() && (t += ",invulnerable:" + $("#invulnerable" + e).val() + "b"), -1 != $("#mayBuild" + e).val() && (t += ",mayBuild:" + $("#mayBuild" + e).val() + "b"), -1 != $("#instaBuild" + e).val() && (t += ",instaBuild:" + $("#instaBuild" + e).val() + "b"), t.length ? ",abilities:{" + t.substr(1) + "}" : t ); } getEntitySpecificCommand(e) { var t = "", a = getItemNBT("SelectedItem" + e); "{}" != a && (t += ",SelectedItem:" + a), -2 != $("#Dimension" + e).val() && (t += ",Dimension:" + $("#Dimension" + e).val()); let o = ""; return ( $("#Inventory" + e + "MultiItemPane > .itemSelectControl").each( function (e) { var t = this.id.substr(0, this.id.lastIndexOf("Pane")); "-1" != $("#" + t).val() && (o += "," + getItemNBT(t, "CountOptional")); } ), o.length && (t += ",Inventory:[" + o.substr(1) + "]"), (t += this.getAbilities(e)) + this.getEntityNBT() ); } getEntityNBT() { var e = ""; for (var t in this.entityNBT) e += getNBTforKey(t, this.entityNBT[t], this.stackPos); return e; } generateForm() { for (var e in this.entityNBT) createComponent( "entityPane" + this.stackPos, e, this.entityNBT[e], this.stackPos ); } } var booksJson, quillsJson, tellrawJson, signJson, jsonColors = [ "unset", "Hex Code", "reset", "white", "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", ]; class Book { constructor() { (this.formats = [ "bold", "italic", "underlined", "strikethrough", "obfuscated", ]), (this.books = []), (this.context = "book"), (this.htmlColorMap = { reset: "#000000", unset: "#000000", black: "#000000", dark_blue: "#0000aa", dark_green: "#00aa00", dark_aqua: "#00aaaa", dark_red: "#aa0000", dark_purple: "#aa00aa", gold: "#ffaa00", gray: "#aaaaaa", dark_gray: "#555555", blue: "#5555ff", green: "#55ff55", aqua: "#55ffff", red: "#ff5555", light_purple: "#ff55ff", yellow: "#ffff55", white: "#ffffff", }); } makeNewBook(e) { (this.books[e] = { pages: [], cPage: 0, cSection: 0, cHoverEvent: 0 }), this.books[e].pages.push([]), this.books[e].pages[0].push(new Section()); } getLineSection(e, t, a) { var o = void 0 == a ? this.books[e].cSection : a; return this.books[e].pages[t][o].data; } flipSection(e, t) { t + this.books[e].cSection >= this.sectionsLength(e) ? (this.books[e].cSection = 0) : t + this.books[e].cSection < 0 ? (this.books[e].cSection = this.sectionsLength(e) - 1) : (this.books[e].cSection += t), (this.books[e].cHoverEvent = 0), displaySectionValues(e, this.getSection(e), this.context); } flipPage(e, t) { t + this.books[e].cPage >= this.books[e].pages.length ? (this.books[e].cPage = 0) : t + this.books[e].cPage < 0 ? (this.books[e].cPage = this.books[e].pages.length - 1) : (this.books[e].cPage += t), (this.books[e].cSection = 0), (this.books[e].cHoverEvent = 0), displaySectionValues(e, this.getSection(e), this.context); } getSection(e, t) { var a = void 0 == t ? this.books[e].cSection : t; return this.books[e].pages[this.books[e].cPage][a].data; } sectionsLength(e) { return this.books[e].pages[this.books[e].cPage].length; } hoverSectionsLength(e) { try { if ( null != this.books[e].pages[this.books[e].cPage][this.books[e].cSection] .data.hoverEvent.contents ) return this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents.length; } catch (e) {} return 0; } updateSection(e, t) { this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data = t; } getJsonForBook(e) { for (var t = "", a = 0; a < this.books[e].pages.length; a++) { var o = [this.books[e].pages[a][0].data], n = this.getFirstFormats(o[0]); if ( (this.removeUnrequiredFormatting(n, o[0]), this.books[e].pages[a].length > 1) ) { for (var s = 1; s < this.books[e].pages[a].length; s++) "" != this.books[e].pages[a][s].data.text && (o.push(this.books[e].pages[a][s].data), this.removeUnrequiredFormatting(n, o[o.length - 1])); t += "," + jsonConvert( JSON.stringify(removeUnsetFromJSON(JSON.stringify(o))) ); } else t += "," + jsonConvert( JSON.stringify( removeUnsetFromJSON(JSON.stringify(o[0])) ) ); } return t.length ? 1 == this.books[e].pages.length && 1 == this.books[e].pages[0].length && void 0 != this.books[e].pages[0][0].data.text && "" == this.books[e].pages[0][0].data.text ? "" : ",pages:[" + t.substr(1) + "]" : t; } removeUnrequiredFormatting(e, t) { for (var a = 0; a < this.formats.length; a++) this.formats[a] in e || t[this.formats[a]] || delete t[this.formats[a]]; } getFirstFormats(e) { for (var t = {}, a = 0; a < this.formats.length; a++) e[this.formats[a]] && (t[this.formats[a]] = !0); return t; } swapSection(e, t) { var a; if ( (a = t + this.books[e].cSection >= this.sectionsLength(e) ? 0 : t + this.books[e].cSection < 0 ? this.sectionsLength(e) - 1 : this.books[e].cSection + t) != this.books[e].cSection ) { var o = this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data; (this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data = this.books[e].pages[this.books[e].cPage][a].data), (this.books[e].pages[this.books[e].cPage][a].data = o), (this.books[e].cSection = a); } displaySectionValues(e, this.getSection(e), this.context); } swapPage(e, t) { var a; if ( (a = t + this.books[e].cPage >= this.books[e].pages.length ? 0 : t + this.books[e].cPage < 0 ? this.books[e].pages.length - 1 : this.books[e].cPage + t) != this.books[e].cPage ) { var o = this.books[e].pages[this.books[e].cPage]; (this.books[e].pages[this.books[e].cPage] = this.books[e].pages[a]), (this.books[e].pages[a] = o), (this.books[e].cPage = a); } (this.books[e].cSection = 0), displaySectionValues(e, this.getSection(e), this.context); } flipPage(e, t) { t + this.books[e].cPage >= this.books[e].pages.length ? (this.books[e].cPage = 0) : t + this.books[e].cPage < 0 ? (this.books[e].cPage = this.books[e].pages.length - 1) : (this.books[e].cPage += t), (this.books[e].cSection = 0), displaySectionValues(e, this.getSection(e), this.context); } addPage(e) { this.books[e].pages.push([]), (this.books[e].cPage = this.books[e].pages.length - 1), this.books[e].pages[this.books[e].cPage].push(new Section()), (this.books[e].cSection = 0), displaySectionValues(e, this.getSection(e), this.context); } deletePage(e) { return ( this.books[e].pages.splice(this.books[e].cPage, 1), this.books[e].cPage >= this.books[e].pages.length && (this.books[e].cPage = this.books[e].pages.length - 1), (this.books[e].cSection = 0), this.getSection(e) ); } deleteSection(e) { return ( this.books[e].pages[this.books[e].cPage].splice( this.books[e].cSection, 1 ), this.books[e].cSection >= this.sectionsLength(e) && (this.books[e].cSection = this.sectionsLength(e) - 1), this.getSection(e) ); } flipHoverSection(e, t) { t + this.books[e].cHoverEvent >= this.hoverSectionsLength(e) ? (this.books[e].cHoverEvent = 0) : t + this.books[e].cHoverEvent < 0 ? (this.books[e].cHoverEvent = this.hoverSectionsLength(e) - 1) : (this.books[e].cHoverEvent += t), displaySectionValues(e, this.getSection(e), this.context); } swapHoverSection(e, t) { let a; if ( (a = t + this.books[e].cHoverEvent >= this.hoverSectionsLength(e) ? 0 : t + this.books[e].cHoverEvent < 0 ? this.hoverSectionsLength(e) - 1 : this.books[e].cHoverEvent + t) != this.books[e].cHoverEvent ) { var o = this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents[this.books[e].cHoverEvent]; (this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents[this.books[e].cHoverEvent] = this.books[ e ].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents[a]), (this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents[a] = o), (this.books[e].cHoverEvent = a); } displaySectionValues(e, this.getSection(e), this.context); } deleteHoverSection(e) { this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents.splice(this.books[e].cHoverEvent, 1), this.books[e].cHoverEvent >= this.hoverSectionsLength(e) && ((this.books[e].cHoverEvent = this.hoverSectionsLength(e) - 1), this.books[e].cHoverEvent < 0 && (this.books[e].cHoverEvent = 0)), displaySectionValues(e, this.getSection(e), this.context); } addHoverSection(e) { if ( Array.isArray( this.books[e].pages[this.books[e].cPage][this.books[e].cSection] .data.hoverEvent.contents ) ) this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents.push({ text: "" }); else { let t = this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents; this.books[e].pages[this.books[e].cPage][ this.books[e].cSection ].data.hoverEvent.contents = [{ text: t }]; } this.books[e].cHoverEvent++, $("#" + e + "hoverColor_colsettings").hide(), displaySectionValues(e, this.getSection(e), this.context); } addSection(e) { this.books[e].pages[this.books[e].cPage].push(new Section()), (this.books[e].cSection = this.sectionsLength(e) - 1), displaySectionValues(e, this.getSection(e), this.context); } addSectionFromObject(e, t) { this.books[e].pages[this.books[e].cPage].push(t), (this.books[e].cSection = this.sectionsLength(e) - 1), displaySectionValues(e, this.getSection(e), this.context); } } class Section { constructor(e) { this.data = void 0 == e ? { text: "", font: "", color: "unset", bold: "unset", italic: "unset", underlined: "unset", strikethrough: "unset", obfuscated: "unset", } : e; } } class WritableBook { constructor() { this.books = []; } makeNewBook(e) { (this.books[e] = { pages: [], cPage: 0 }), this.books[e].pages.push(""); } addPage(e) { this.books[e].pages.push(""), (this.books[e].cPage = this.books[e].pages.length - 1), displayWriteablePage(e); } flipPage(e, t) { t + this.books[e].cPage >= this.books[e].pages.length ? (this.books[e].cPage = 0) : t + this.books[e].cPage < 0 ? (this.books[e].cPage = this.books[e].pages.length - 1) : (this.books[e].cPage += t), displayWriteablePage(e); } deletePage(e) { this.books[e].pages.splice(this.books[e].cPage, 1), this.books[e].cPage >= this.books[e].pages.length && (this.books[e].cPage = this.books[e].pages.length - 1), displayWriteablePage(e); } swapPage(e, t) { var a; if ( (a = t + this.books[e].cPage >= this.books[e].pages.length ? 0 : t + this.books[e].cPage < 0 ? this.books[e].pages.length - 1 : this.books[e].cPage + t) != this.books[e].cPage ) { var o = this.books[e].pages[this.books[e].cPage]; (this.books[e].pages[this.books[e].cPage] = this.books[e].pages[a]), (this.books[e].pages[a] = o), (this.books[e].cPage = a); } displayWriteablePage(e); } updatePage(e, t) { this.books[e].pages[this.books[e].cPage] = t; } } function deletePage(e) { 1 == booksJson.books[e].pages.length ? alertify.alert( "MCStacker requires books to have at least one page. So it aint gonna let you delete this page." ) : displaySectionValues(e, booksJson.deletePage(e), this.context); } function deleteLoreLine(e) { 1 == tellrawJson.books[e].pages.length ? alertify.alert( "MCStacker requires Lore to have at least one line. So you can't delete this line." ) : displaySectionValues(e, tellrawJson.deletePage(e), "lore"); } function deleteWritablePage(e) { if (1 == quillsJson.books[e].pages.length) alertify.alert( "MCStacker requires writable books to have at least one page. So it aint gonna let you delete this page." ); else { quillsJson.deletePage(e); displayWriteablePage(e); } } function deleteSection(e) { 1 == booksJson.sectionsLength(e) ? alertify.alert( "MCStacker requires pages to have at least one section. So it aint gonna let you delete this section." ) : displaySectionValues( e, booksJson.deleteSection(e), booksJson.context ); } function deleteHoverSection(e, t) { "book" == t ? booksJson.deleteHoverSection(e) : tellrawJson.deleteHoverSection(e); } function deleteTellrawSection(e) { 1 == tellrawJson.sectionsLength(e) ? alertify.alert( "MCStacker requires Json elements to have at least one section. So it aint gonna let you delete this section." ) : displaySectionValues( e, tellrawJson.deleteSection(e), tellrawJson.context ); } function clearSectionUI(e) { $("#" + e + "bookText_choice").val("text"), $("#" + e + "bookText_txt").val(""), $("#" + e + "objective").val(""), $("#" + e + "font").val(""), $("#" + e + "color").val("unset"), $("#" + e + "boldunset").prop("checked", !0), $("#" + e + "italicunset").prop("checked", !0), $("#" + e + "underlinedunset").prop("checked", !0), $("#" + e + "strikethroughunset").prop("checked", !0), $("#" + e + "obfuscatedunset").prop("checked", !0), $("#" + e + "hoverEvent_txt").val(""), $("#" + e + "clickEvent_txt").val(""); } function bookPreview(e) { $("#" + e + "Preview").html(""); for ( var t = booksJson.books[e].cPage, a = booksJson.getSection(e, 0), o = 0; o < booksJson.sectionsLength(e); o++ ) { var n = booksJson.getSection(e, o); $("#" + e + "Preview").append( sectionJSONPreview(e, o, t, n, a, booksJson) ); } } function displayWriteablePage(e) { $("#" + e + "bookText").val( quillsJson.books[e].pages[quillsJson.books[e].cPage] ), $("#" + e + "pageNo").html( "Page " + (quillsJson.books[e].cPage + 1) + " of " + quillsJson.books[e].pages.length ), generateCommand(); } function getFormatUIValueFromData(e) { return void 0 == e ? "unset" : e; } function displaySectionValues(e, t, a) { clearSectionUI(e); var o = ""; ("text" in t ? ($("#" + e + "bookText_choice").val("text"), (o = t.text)) : "translate" in t ? ($("#" + e + "bookText_choice").val("translate"), (o = t.translate)) : "score" in t ? ($("#" + e + "bookText_choice").val("score"), $("#" + e + "bookText_choice").trigger("change"), (o = t.score.name), $("#" + e + "objective").val(t.score.objective)) : "selector" in t ? ($("#" + e + "bookText_choice").val("selector"), (o = t.selector)) : "selector" in t ? ($("#" + e + "bookText_choice").val("selector"), (o = t.selector)) : "nbt" in t && ($("#" + e + "bookText_choice").val("nbt"), $("#" + e + "bookText_choice").trigger("change"), (o = t.nbt), "entity" in t ? ($("#" + e + "targetType").val("entity"), $("#" + e + "targetType").trigger("change"), $("#" + e + "nbtEntityTarget").val(t.entity)) : "storage" in t ? ($("#" + e + "targetType").val("storage"), $("#" + e + "targetType").trigger("change"), $("#" + e + "nbtStorageTarget").val(t.storage)) : "block" in t && ($("#" + e + "targetType").val("block"), $("#" + e + "targetType").trigger("change"), $("#" + e + "BlockNBT").val(t.block)), "interpret" in t && $("#" + e + "interpret").val(t.interpret ? 1 : 0)), "font" in t && $("#" + e + "font").val(t.font), (o = replaceAll("\n", "\\n", o)), $("#" + e + "bookText_txt").val(o), "color" in t) ? "#" == t.color.charAt(0) ? ($("#" + e + "color").val("Hex Code"), $("#" + e + "_color").val(t.color.substr(1)), new jscolor.color( document.getElementById(e + "_color"), {} ).fromString(t.color.substr(1)), $("#" + e + "_colsettings").show()) : ($("#" + e + "color").val(t.color), $("#" + e + "_colsettings").hide()) : ($("#" + e + "color").val("unset"), $("#" + e + "_colsettings").hide()); if ( ($("#" + e + "bold" + getFormatUIValueFromData(t.bold)).prop( "checked", !0 ), $("#" + e + "italic" + getFormatUIValueFromData(t.italic)).prop( "checked", !0 ), $("#" + e + "underlined" + getFormatUIValueFromData(t.underlined)).prop( "checked", !0 ), $( "#" + e + "strikethrough" + getFormatUIValueFromData(t.strikethrough) ).prop("checked", !0), $("#" + e + "obfuscated" + getFormatUIValueFromData(t.obfuscated)).prop( "checked", !0 ), "hoverEvent" in t) ) { $("#" + e + "hoverEvent_choice").val(t.hoverEvent.action); try { if (Array.isArray(t.hoverEvent.contents)) { let o; if ( ((o = "book" == a ? booksJson : tellrawJson).books[e] .cHoverEvent >= t.hoverEvent.contents.length && (o.books[e].cHoverEvent = 0), $("#" + e + "hoverEvent_txt").val( replaceAll( "\n", "\\n", t.hoverEvent.contents[o.books[e].cHoverEvent].text ) ), $("#" + e + "hoverfont").val( t.hoverEvent.contents[o.books[e].cHoverEvent].font ), "color" in t.hoverEvent.contents[o.books[e].cHoverEvent]) ) { let a = t.hoverEvent.contents[o.books[e].cHoverEvent].color; if ("#" == a.charAt(0)) $("#" + e + "hoverColor").val("Hex Code"), $("#" + e + "hover_color").val(a.substr(1)), new jscolor.color( document.getElementById(e + "hover_color"), {} ).fromString(a.substr(1)), $("#" + e + "hoverColor_colsettings").show(); else $("#" + e + "hoverColor").val(a), $("#" + e + "hoverColor_colsettings").hide(); } else $("#" + e + "hoverColor").val("unset"); $( "#" + e + "hoverbold" + getFormatUIValueFromData( t.hoverEvent.contents[o.books[e].cHoverEvent].bold ) ).prop("checked", !0), $( "#" + e + "hoveritalic" + getFormatUIValueFromData( t.hoverEvent.contents[o.books[e].cHoverEvent] .italic ) ).prop("checked", !0), $( "#" + e + "hoverunderlined" + getFormatUIValueFromData( t.hoverEvent.contents[o.books[e].cHoverEvent] .underlined ) ).prop("checked", !0), $( "#" + e + "hoverstrikethrough" + getFormatUIValueFromData( t.hoverEvent.contents[o.books[e].cHoverEvent] .strikethrough ) ).prop("checked", !0), $( "#" + e + "hoverobfuscated" + getFormatUIValueFromData( t.hoverEvent.contents[o.books[e].cHoverEvent] .obfuscated ) ).prop("checked", !0); } else null != t.hoverEvent.contents ? ($("#" + e + "hoverEvent_txt").val( replaceAll("\n", "\\n", t.hoverEvent.contents) ), (t.hoverEvent.contents = [t.hoverEvent.contents])) : $("#" + e + "hoverEvent_txt").val(""); } catch (t) { $("#" + e + "hoverEvent_txt").val(""); } } else $("#" + e + "hoverEvent_txt").val(""); "clickEvent" in t ? ($("#" + e + "clickEvent_choice").val(t.clickEvent.action), "boolean" == typeof t.clickEvent.value ? $("#" + e + "clickEvent_txt").val(t.clickEvent.value) : $("#" + e + "clickEvent_txt").val( replaceAll("\n", "\\n", t.clickEvent.value) )) : $("#" + e + "clickEvent_txt").val(""), "book" == a ? ($("#" + e + "sectionNo").html( "Section " + (booksJson.books[e].cSection + 1) + " of " + booksJson.sectionsLength(e) ), $("#" + e + "pageNo").html( "Page " + (booksJson.books[e].cPage + 1) + " of " + booksJson.books[e].pages.length ), bookPreview(e)) : "tellraw" == a ? ($("#" + e + "sectionNo").html( "Section " + (tellrawJson.books[e].cSection + 1) + " of " + tellrawJson.sectionsLength(e) ), $("#" + e + "pageNo").html( "Line " + (tellrawJson.books[e].cPage + 1) + " of " + tellrawJson.books[e].pages.length ), tellrawPreview(e)) : "lore" == a ? ($("#" + e + "sectionNo").html( "Section " + (tellrawJson.books[e].cSection + 1) + " of " + tellrawJson.sectionsLength(e) ), $("#" + e + "pageNo").html( "Line " + (tellrawJson.books[e].cPage + 1) + " of " + tellrawJson.books[e].pages.length ), tellrawPreview(e)) : ($("#" + e + "sectionNo").html( "Section " + (signJson.books[e].cSection + 1) + " of " + signJson.sectionsLength(e) ), $("#" + e + "pageNo").html( "Line " + (signJson.books[e].cPage + 1) + " of " + signJson.books[e].pages.length ), $("#" + e + "clickEvent_txt").prop( "disabled", 0 != signJson.books[e].cSection ), $("#" + e + "clickEvent_choice").prop( "disabled", 0 != signJson.books[e].cSection ), signPreview(e)), $("#" + e + "bookText_txt").trigger("keyup"), "book" == a ? bookUpdate(e) : "sign" == a ? signUpdate(e) : tellrawUpdate(e); } function bookUpdate(e) { var t = {}, a = replaceAll("\\n", "\n", $("#" + e + "bookText_txt").val()); if ("score" == $("#" + e + "bookText_choice").val()) t.score = { name: a, objective: $("#" + e + "objective").val() }; else if ("nbt" == $("#" + e + "bookText_choice").val()) { if (((t.nbt = a), "entity" == $("#" + e + "targetType").val())) t.entity = $("#" + e + "nbtEntityTarget").val(); else if ("storage" == $("#" + e + "targetType").val()) t.storage = $("#" + e + "nbtStorageTarget").val(); else { var o = getCoordsString(e + "BlockNBT"); t.block = o[0] + " " + o[1] + " " + o[2]; } 1 == $("#" + e + "interpret").val() ? (t.interpret = !0) : 0 == $("#" + e + "interpret").val() && (t.interpret = !1); } else t[$("#" + e + "bookText_choice").val()] = a; (t.font = $("#" + e + "font").val()), "Hex Code" == $("#" + e + "color").val() ? (t.color = "#" + $("#" + e + "_color").val()) : (t.color = $("#" + e + "color").val()), (t.bold = $("input[name='" + e + "bold']:checked").val()), (t.italic = $("input[name='" + e + "italic']:checked").val()), (t.underlined = $("input[name='" + e + "underlined']:checked").val()), (t.strikethrough = $( "input[name='" + e + "strikethrough']:checked" ).val()), (t.obfuscated = $("input[name='" + e + "obfuscated']:checked").val()), "hoverEvent" in booksJson.books[e].pages[booksJson.books[e].cPage][ booksJson.books[e].cSection ].data && (t.hoverEvent = booksJson.books[e].pages[booksJson.books[e].cPage][ booksJson.books[e].cSection ].data.hoverEvent), "show_text" == $("#" + e + "hoverEvent_choice").val() ? "hoverEvent" in t ? ((t.hoverEvent.action = "show_text"), (t.hoverEvent.contents[booksJson.books[e].cHoverEvent] = { text: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), }), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].font = $("#" + e + "hoverfont").val()), "Hex Code" == $("#" + e + "hoverColor").val() ? (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].color = "#" + $("#" + e + "hover_color").val()) : (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].color = $("#" + e + "hoverColor").val()), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].bold = $("input[name='" + e + "hoverbold']:checked").val()), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].italic = $( "input[name='" + e + "hoveritalic']:checked" ).val()), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].underlined = $( "input[name='" + e + "hoverunderlined']:checked" ).val()), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].strikethrough = $( "input[name='" + e + "hoverstrikethrough']:checked" ).val()), (t.hoverEvent.contents[ booksJson.books[e].cHoverEvent ].obfuscated = $( "input[name='" + e + "hoverobfuscated']:checked" ).val())) : ((booksJson.books[e].cHoverEvent = 0), (t.hoverEvent = { action: "show_text", contents: [ { text: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), }, ], })) : (t.hoverEvent = { action: $("#" + e + "hoverEvent_choice").val(), contents: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), }), showHideHoverEventFormatting(e, booksJson), $("#" + e + "clickEvent_txt").val().length && (t.clickEvent = { action: $("#" + e + "clickEvent_choice").val(), value: $("#" + e + "clickEvent_txt").val(), }), booksJson.updateSection(e, t), deferJSONOutput || (bookPreview(e), hoverEventPreview(e, booksJson), generateCommand()); } function getWrittenBookNBT(e) { var t = ""; return ( (t += ',title:"' + $("#" + e + "title").val() + '"'), (t += ',author:"' + $("#" + e + "author").val() + '"'), -1 != $("#" + e + "generation").val() && (t += ",generation:" + $("#" + e + "generation").val()), -1 != $("#" + e + "resolved").val() && (t += ",resolved:" + $("#" + e + "resolved").val() + "b"), (t += booksJson.getJsonForBook(e)) ); } function loadWritableBookFromNBT(e, t) { for (var a = 0; a < t.length; a++) 0 != a && quillsJson.addPage(e), quillsJson.updatePage(e, replaceAll('\\"', '"', t[a])); quillsJson.flipPage(e, 1); } function loadSignFromNBT(e, t) { for (var a = 0; a < 4; a++) { if (void 0 != t["Text" + (a + 1)]) { var o; try { o = JSON.parse( JSON.parse( '"' + t["Text" + (a + 1)].val + '"'.replace(/\\[1]/g, "") ) ); } catch (e) { o = JSON.parse( JSON.parse( '"' + t["Text" + (a + 1)].val .replace(/"/g, '\\"') .replace(/\\'/g, "'") + '"' ) ); } if (void 0 != o.extra) { var n = o.extra; delete o.extra, signJson.updateSection(e, o); for (var s = 0; s < n.length; s++) signJson.addSectionFromObject(e, new Section(n[s])); } else if (Array.isArray(o)) { for (var i = 0; i < o.length; i++) signJson.addSectionFromObject(e, new Section(o[i])); signJson.flipSection(e, 1), signJson.deleteSection(e); } else signJson.addSectionFromObject(e, new Section(o)), signJson.flipSection(e, 1), signJson.deleteSection(e); } else signJson.updateSection( e, JSON.parse('{"text":"","color":"black"}') ); signJson.flipPage(e, 1); } } function createWrittenBookForm(e, t) { void 0 == booksJson && (booksJson = new Book()), $("#" + e + "ItemPane").append("
"); var a = { title: { type: "text", id: (e += "BookPane") + "title", format: "string", cssClass: "fLabel100", tip: "written_book", }, author: { type: "text", id: e + "author", format: "string", cssClass: "fLabel100", tip: "written_book", }, generation: { type: "choice", id: e + "generation", cssClass: "fLabel100", values: [ [-1, "unset"], ["0", "Original"], ["1", "Copy of Original"], ["2", "Copy of Copy"], ["3", "Tattered"], ], format: "int", tip: "written_book", }, resolved: { type: "choice", id: e + "resolved", cssClass: "fLabel100", values: unsetTrueFalse, format: "b", tip: "written_book", }, Pages: { type: "panel", cssClass: "fLabel100", panelID: e + "Pages", format: "special", tip: "written_book", }, }; for (var o in a) createComponent(e, o, a[o], t); $("#" + e + "Pages").html( "
+X


+X
" ), $("#" + e + "Setup").append( "
component type" ), $("#" + e + "Setup").append( "
value" + makeTip("json.value") ), $("#" + e + "Setup").append( "
" ), createComponent( e + "Setup", "color", { type: "makeSelect", id: e + "color", values: jsonColors, format: "special", cssClass: "fLabel100", tip: "written_book", eventClass: "jsonHexColorUpdate", }, t ), $("#" + e + "Setup").append( "" ), new jscolor.color(document.getElementById(e + "_color"), {}).fromString( "FF0000" ), $("#" + e + "_colsettings").hide(), $(".jsonHexColorUpdate").on("change", function () { jsonHexColorUpdate(e, booksJson.context); }), createComponent( e + "Setup", "font", { type: "text", id: e + "font", cssClass: "fLabel100", format: "string", tip: "written_book", eventClass: "bookUpdate", }, t ), createComponent( e + "Setup", "jsonFormats", { label: " ", type: "jsonFormats", id: e, cssClass: "fLabel100", format: "special", eventClass: "bookUpdate", }, t ), createComponent( e + "Setup", "clickEvent", { type: "choicetext", id: e + "clickEvent", values: [ "run_command", "copy_to_clipboard", "suggest_command", "open_url", "change_page", ], format: "special", fwClass: "bigTF", cssClass: "fLabel100", tip: "written_book", eventClass: "bookUpdate", }, t ), createComponent( e + "Setup", "hoverEvent", { type: "choicetext", id: e + "hoverEvent", values: ["show_text", "show_item", "show_entity"], format: "special", cssClass: "fLabel100", fwClass: "bigTF", tip: "written_book", eventClass: "bookUpdate", }, t ), createComponent( e + "Setup", "hoverEventFormat", { type: "panel", panelID: e + "hoverEventFormat", cssClass: "fLabel100", fwClass: "bigTF", eventClass: "bookUpdate", }, t ), makeHoverEventUI(e, "booksJson", "bookUpdate"), $("#" + e + "bookText_choice").bind("change", function () { "score" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "objective" ), $(".bookUpdate").on("change keyup", function () { bookUpdate(e); })) : "nbt" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "target type
" ), changeNBTTargetTypeBook(e, t), bindTargetTypeChangeBook(e, t)) : $("#" + e + "extraComponents").html(""), $("#" + e + "bookText_txt").trigger("keyup"); }), booksJson.makeNewBook(e), $(".bookUpdate").on("change keyup", function () { bookUpdate(e); }), displaySectionValues(e, booksJson.getSection(e), booksJson.context); } function bindTargetTypeChangeBook(e, t) { $("#" + e + "targetType").bind("change", function () { changeNBTTargetTypeBook(e, t); }); } function changeNBTTargetTypeBook(e, t) { "entity" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "entity " ) : "storage" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "storage " ) : ($("#" + e + "nbtTarget").html( makeCoords(e + "BlockNBT", "Block", !0, !0) ), $("#" + e + "nbtTarget span") .removeClass("fLabel200") .addClass("fLabel100"), $("#" + e + "BlockNBT").addClass("bookUpdate")), createComponent( e + "nbtTarget", "interpret", { id: e + "interpret", type: "choice", values: unsetTrueFalse, cssClass: "fLabel100", eventClass: "bookUpdate", }, t ), $(".bookUpdate").on("change keyup", function () { bookUpdate(e); }), bookUpdate(e); } function loadWrittenBookFromNBT(e, t) { if ( (void 0 != t.title && $("#" + e + "title").val(t.title.val), void 0 != t.author && $("#" + e + "author").val(t.author.val), void 0 != t.generation && $("#" + e + "generation").val(parseInt(t.generation.val)), void 0 != t.resolved && $("#" + e + "resolved").val(parseInt(t.resolved.val)), void 0 != t.pages) ) { for (var a = t.pages.val, o = 0; o < a.length; o++) { 0 != o && booksJson.addPage(e); var n = JSON.parse( JSON.parse('"' + a[o] + '"'.replace(/\\[1]/g, "")) ); if (void 0 != n.extra) { var s = n.extra; delete n.extra, booksJson.updateSection(e, n); for (var i = 0; i < s.length; i++) booksJson.addSectionFromObject(e, new Section(s[i])); } else if (Array.isArray(n)) { for (var r = 0; r < n.length; r++) booksJson.addSectionFromObject(e, new Section(n[r])); booksJson.flipSection(e, 1), booksJson.deleteSection(e); } else booksJson.addSectionFromObject(e, new Section(n)), booksJson.flipSection(e, 1), booksJson.deleteSection(e); } booksJson.flipPage(e, 1); } } function getWritableBookNBT(e) { return ",pages:" + JSON.stringify(quillsJson.books[e].pages); } function createWritableBookForm(e, t) { void 0 == quillsJson && (quillsJson = new WritableBook()), $("#" + e + "ItemPane").append("
"), createComponent( (e += "BookPane"), "Pages", { type: "panel", cssClass: "fLabel100", panelID: e + "Pages", format: "special", tip: "written_book", }, t ), $("#" + e + "Pages").html( "+X\t\t
" ), quillsJson.makeNewBook(e), $("#" + e + "bookText").on("keyup", function () { writableBookUpdate(e); }), $("#" + e + "pageNo").html( "Page " + (quillsJson.books[e].cPage + 1) + " of " + quillsJson.books[e].pages.length ); } function writableBookUpdate(e) { quillsJson.updatePage(e, $("#" + e + "bookText").val()), generateCommand(); } function createTellrawForm(e, t, a, o, n) { (a = a || "ItemPane"), void 0 == tellrawJson && (tellrawJson = new TellRawJson()), createComponent( void 0 != n ? (e += n) : e + (a = a || "ItemPane"), "Pages", { type: "panel", cssClass: "fLabel100", panelID: e + "Pages", format: "special", tip: "written_book", }, t ); var s = ""; "Lore" == n && (s = "+X
"), $("#" + e + "Pages").html( "
" + s + "+X

" ), $("#" + e + "Setup").append( "
component type" ), void 0 != o ? $("#" + e + "bookText_choice").append( "" ) : $("#" + e + "bookText_choice").append( "" ), $("#" + e + "Setup").append( "
value" + makeTip("json.value") ), $("#" + e + "Setup").append( "
" ), createComponent( e + "Setup", "color", { type: "makeSelect", id: e + "color", values: jsonColors, format: "special", cssClass: "fLabel100", tip: "written_book", eventClass: "jsonHexColorUpdate", }, t ), $("#" + e + "Setup").append( "" ), new jscolor.color(document.getElementById(e + "_color"), {}).fromString( "FF0000" ), $("#" + e + "_colsettings").hide(), $(".jsonHexColorUpdate").on("change", function () { jsonHexColorUpdate(e, tellrawJson.context); }), createComponent( e + "Setup", "font", { type: "text", id: e + "font", cssClass: "fLabel100", format: "string", tip: "written_book", eventClass: "tellrawUpdate", }, t ), createComponent( e + "Setup", "jsonFormats", { label: " ", type: "jsonFormats", id: e, cssClass: "fLabel100", format: "special", eventClass: "tellrawUpdate", }, t ), "tellraw" == currentCommand && (createComponent( e + "Setup", "clickEvent", { type: "choicetext", id: e + "clickEvent", values: [ "run_command", "copy_to_clipboard", "suggest_command", "open_url", ], format: "special", fwClass: "bigTF", cssClass: "fLabel100", tip: "written_book", eventClass: "tellrawUpdate", }, t ), createComponent( e + "Setup", "hoverEvent", { type: "choicetext", id: e + "hoverEvent", values: ["show_text", "show_item", "show_entity"], format: "special", cssClass: "fLabel100", fwClass: "bigTF", tip: "written_book", eventClass: "tellrawUpdate", }, t ), createComponent( e + "Setup", "hoverEventFormat", { type: "panel", panelID: e + "hoverEventFormat", cssClass: "fLabel100", fwClass: "bigTF", eventClass: "tellrawUpdate", }, t ), makeHoverEventUI(e, "tellrawJson", "tellrawUpdate")), $("#" + e + "bookText_choice").bind("change", function () { "score" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "objective" ), $(".tellrawUpdate").on("change keyup", function () { tellrawUpdate(e); })) : "nbt" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "target type
" ), changeNBTTargetType(e, t), bindTargetTypeChange(e, t)) : $("#" + e + "extraComponents").html(""), $("#" + e + "bookText_txt").trigger("keyup"); }), tellrawJson.makeNewTellraw(e), $(".tellrawUpdate").on("change keyup", function () { tellrawUpdate(e); }), displaySectionValues(e, tellrawJson.getSection(e), tellrawJson.context); } function bindTargetTypeChange(e, t) { $("#" + e + "targetType").bind("change", function () { changeNBTTargetType(e, t); }); } function changeNBTTargetType(e, t) { "entity" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "entity " ) : "storage" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "storage " ) : ($("#" + e + "nbtTarget").html( makeCoords(e + "BlockNBT", "Block", !0, !0) ), $("#" + e + "nbtTarget span") .removeClass("fLabel200") .addClass("fLabel100"), $("#" + e + "BlockNBT").addClass("tellrawUpdate")), createComponent( e + "nbtTarget", "interpret", { id: e + "interpret", type: "choice", values: unsetTrueFalse, cssClass: "fLabel100", eventClass: "tellrawUpdate", }, t ), $(".tellrawUpdate").on("change keyup", function () { tellrawUpdate(e); }), tellrawUpdate(e); } class TellRawJson extends Book { constructor() { super(), (this.context = "tellraw"); } sectionsLengthForLine(e, t) { return this.books[e].pages[t].length; } makeNewTellraw(e) { (this.books[e] = { pages: [], cPage: 0, cSection: 0, cHoverEvent: 0 }), this.books[e].pages.push([]), this.books[e].pages[0].push(new Section()), (this.books[e].pages[0][0].data.color = "unset"); } getJsonForTellrawExtraStyle(e) { var t = $.extend({}, this.books[e].pages[0][0].data), a = this.getFirstFormats(t); if ( (this.removeUnrequiredFormatting(a, t), this.books[e].pages[0].length > 1) ) { t.extra = []; for (var o = 1; o < this.books[e].pages[0].length; o++) t.extra.push($.extend({}, this.books[e].pages[0][o].data)), this.removeUnrequiredFormatting(a, t.extra[o - 1]); } return JSON.stringify(t); } getJsonForTellraw(e) { try { if ("" == this.books[e].pages[0][0].data.text) return ""; var t = [this.books[e].pages[0][0].data], a = this.getFirstFormats(t[0]); if ( (this.removeUnrequiredFormatting(a, t[0]), this.books[e].pages[0].length > 1) ) { for (var o = 1; o < this.books[e].pages[0].length; o++) "" != this.books[e].pages[0][o].data.text && (t.push(this.books[e].pages[0][o].data), this.removeUnrequiredFormatting(a, t[t.length - 1])); return removeUnsetFromJSON(JSON.stringify(t)); } return removeUnsetFromJSON(JSON.stringify(t[0])); } catch (e) { return ""; } } getJsonForLore(e) { try { for (var t = "", a = 0; a < this.books[e].pages.length; a++) { var o = [this.books[e].pages[a][0].data], n = this.getFirstFormats(o[0]); if ( (this.removeUnrequiredFormatting(n, o[0]), this.books[e].pages[a].length > 1) ) { o.extra = []; for (var s = 1; s < this.books[e].pages[a].length; s++) "" != this.books[e].pages[a][s].data.text && (o.push(this.books[e].pages[a][s].data), this.removeUnrequiredFormatting( n, o[o.length - 1] )); t += "," + jsonConvert( JSON.stringify( removeUnsetFromJSON(JSON.stringify(o)) ) ); } else "" != this.books[e].pages[a][0].data.text && (t += "," + jsonConvert( JSON.stringify( removeUnsetFromJSON(JSON.stringify(o[0])) ) )); } return t; } catch (e) { return ""; } } getJsonForLootTableItemName(e) { try { if ( !this.books[e].pages[0][0].data.text && !this.books[e].pages[0][0].data.translate ) return []; var t = [removeUnsetFromObject(this.books[e].pages[0][0].data)], a = this.getFirstFormats(t[0]); if ( (this.removeUnrequiredFormatting(a, t[0]), this.books[e].pages[0].length > 0) ) { for (var o = 1; o < this.books[e].pages[0].length; o++) ("" == this.books[e].pages[0][o].data.text && "" == this.books[e].pages[0][o].data.translate) || (t.push( removeUnsetFromObject( this.books[e].pages[0][o].data ) ), this.removeUnrequiredFormatting(a, t[t.length - 1])); return t; } return removeUnsetFromObject(t[0]); } catch (e) { return []; } } getJsonLoreForLootTables(e) { try { let s = []; for (var t = 0; t < this.books[e].pages.length; t++) { var a = [this.books[e].pages[t][0].data], o = this.getFirstFormats(a[0]); if ( (this.removeUnrequiredFormatting(o, a[0]), this.books[e].pages[t].length > 1) ) { a.extra = []; for (var n = 1; n < this.books[e].pages[t].length; n++) "" != this.books[e].pages[t][n].data.text && "" != this.books[e].pages[t][n].data.translate && (a.push( removeUnsetFromObject( this.books[e].pages[t][n].data ) ), this.removeUnrequiredFormatting( o, a[a.length - 1] )); s.push(a); } else "" != this.books[e].pages[t][0].data.text && "" != this.books[e].pages[t][0].data.translate && s.push(removeUnsetFromObject(a[0])); } return s; } catch (e) { return []; } } } function loadLoreFromNBT(e, t, a) { for (var o = t, n = 0; n < o.length; n++) { let t; if ( (0 != n && tellrawJson.addPage(e), void 0 != (t = a ? o[n] : JSON.parse( JSON.parse('"' + o[n] + '"'.replace(/\\[1]/g, "")) )).extra) ) { var s = t.extra; delete t.extra, tellrawJson.updateSection(e, t); for (var i = 0; i < s.length; i++) tellrawJson.addSectionFromObject(e, new Section(s[i])); } else if (Array.isArray(t)) { for (var r = 0; r < t.length; r++) tellrawJson.addSectionFromObject(e, new Section(t[r])); tellrawJson.flipSection(e, 1), tellrawJson.deleteSection(e); } else tellrawJson.addSectionFromObject(e, new Section(t)), tellrawJson.flipSection(e, 1), tellrawJson.deleteSection(e); } tellrawJson.flipPage(e, 1); } function tellrawUpdate(e) { var t = {}, a = replaceAll("\\n", "\n", $("#" + e + "bookText_txt").val()); if ("score" == $("#" + e + "bookText_choice").val()) t.score = { name: a, objective: $("#" + e + "objective").val() }; else if ("nbt" == $("#" + e + "bookText_choice").val()) { if (((t.nbt = a), "entity" == $("#" + e + "targetType").val())) t.entity = $("#" + e + "nbtEntityTarget").val(); else if ("storage" == $("#" + e + "targetType").val()) t.storage = $("#" + e + "nbtStorageTarget").val(); else { var o = getCoordsString(e + "BlockNBT"); t.block = o[0] + " " + o[1] + " " + o[2]; } 1 == $("#" + e + "interpret").val() ? (t.interpret = !0) : 0 == $("#" + e + "interpret").val() && (t.interpret = !1); } else t[$("#" + e + "bookText_choice").val()] = a; (t.font = $("#" + e + "font").val()), "Hex Code" == $("#" + e + "color").val() ? (t.color = "#" + $("#" + e + "_color").val()) : (t.color = $("#" + e + "color").val()), (t.bold = $("input[name='" + e + "bold']:checked").val()), (t.italic = $("input[name='" + e + "italic']:checked").val()), (t.underlined = $("input[name='" + e + "underlined']:checked").val()), (t.strikethrough = $( "input[name='" + e + "strikethrough']:checked" ).val()), (t.obfuscated = $("input[name='" + e + "obfuscated']:checked").val()), "hoverEvent" in tellrawJson.books[e].pages[tellrawJson.books[e].cPage][ tellrawJson.books[e].cSection ].data && (t.hoverEvent = tellrawJson.books[e].pages[tellrawJson.books[e].cPage][ tellrawJson.books[e].cSection ].data.hoverEvent), "tellraw" == currentCommand && ("show_text" == $("#" + e + "hoverEvent_choice").val() ? "hoverEvent" in t ? ((t.hoverEvent.action = "show_text"), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ] = { text: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), }), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].font = $("#" + e + "hoverfont").val()), "Hex Code" == $("#" + e + "hoverColor").val() ? (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].color = "#" + $("#" + e + "hover_color").val()) : (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].color = $("#" + e + "hoverColor").val()), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].bold = $( "input[name='" + e + "hoverbold']:checked" ).val()), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].italic = $( "input[name='" + e + "hoveritalic']:checked" ).val()), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].underlined = $( "input[name='" + e + "hoverunderlined']:checked" ).val()), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].strikethrough = $( "input[name='" + e + "hoverstrikethrough']:checked" ).val()), (t.hoverEvent.contents[ tellrawJson.books[e].cHoverEvent ].obfuscated = $( "input[name='" + e + "hoverobfuscated']:checked" ).val())) : ((tellrawJson.books[e].cHoverEvent = 0), (t.hoverEvent = { action: "show_text", contents: [ { text: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), }, ], })) : (t.hoverEvent = { action: $("#" + e + "hoverEvent_choice").val(), contents: replaceAll( "\\n", "\n", $("#" + e + "hoverEvent_txt").val() ), })), showHideHoverEventFormatting(e, tellrawJson), "tellraw" == currentCommand && $("#" + e + "clickEvent_txt").val().length && (t.clickEvent = { action: $("#" + e + "clickEvent_choice").val(), value: $("#" + e + "clickEvent_txt").val(), }), tellrawJson.updateSection(e, t), deferJSONOutput || (tellrawPreview(e), hoverEventPreview(e, tellrawJson), generateCommand()); } function sectionJSONPreview(e, t, a, o, n, s) { function i(e, t) { return ( "true" == e || 1 == e || ((void 0 == e || "unset" == e) && ("true" == t || 1 == t)) ); } var r = "", (l = o.text || o.translate || o.selector || o.nbt || o.score.name || "") ); } catch (e) { l = ""; } return ( i(o.obfuscated, n.obfuscated) ? (r += (function (e) { for (var t = "", a = 0; a < e.length; a++) t += "\n" == e.charAt(a) ? "\n" : "*"; return t; })(l)) : (r += l), i(o.underlined, n.underlined) && (r += ""), (r += "") ); } function loadJSONPartFromPreview(e, t, a, o) { "book" == o ? ((booksJson.books[e].cPage = a), (booksJson.books[e].cSection = t), (booksJson.books[e].cHoverEvent = 0), displaySectionValues(e, booksJson.getSection(e), o)) : "tellraw" == o ? ((tellrawJson.books[e].cPage = a), (tellrawJson.books[e].cSection = t), (tellrawJson.books[e].cHoverEvent = 0), displaySectionValues(e, tellrawJson.getSection(e), o)) : "sign" == o && ((signJson.books[e].cPage = a), (signJson.books[e].cSection = t), displaySectionValues(e, signJson.getSection(e), o)); } function makeHoverEventUI(e, t, a) { let o = "booksJson" == t ? "book" : "tellraw"; $("#" + e + "hoverEventFormat").html( 'Hover Text Formatting
+X
" ), $("#" + e + "hoverEventFormat").addClass("roundedDiv"), createComponent( e + "hoverEventFormat", "color", { type: "makeSelect", id: e + "hoverColor", values: jsonColors, format: "special", cssClass: "fLabel100", tip: "written_book", eventClass: "jsonHoverHexColorUpdate", }, 0 ), $("#" + e + "hoverEventFormat").append( "" ), new jscolor.color( document.getElementById(e + "hover_color"), {} ).fromString("FF0000"), $("#" + e + "hoverColor_colsettings").hide(), $(".jsonHoverHexColorUpdate").on("change", function () { "Hex Code" == $("#" + e + "hoverColor").val() ? $("#" + e + "hoverColor_colsettings").show() : $("#" + e + "hoverColor_colsettings").hide(), "book" == o ? bookUpdate(e) : "sign" == o ? signUpdate(e) : tellrawUpdate(e); }), createComponent( e + "hoverEventFormat", "font", { type: "text", id: e + "hoverfont", cssClass: "fLabel100", format: "string", tip: "written_book", eventClass: a, }, 0 ), createComponent( e + "hoverEventFormat", "jsonFormats", { label: " ", type: "jsonFormats", id: e + "hover", cssClass: "fLabel100", format: "special", eventClass: a, }, 0 ); } function showHideHoverEventFormatting(e, t) { $("#" + e + "hoverEvent_txt") && ("show_text" == $("#" + e + "hoverEvent_choice").val() ? $("#" + e + "hoverEventFormat").show() : $("#" + e + "hoverEventFormat").hide()); } function tellrawPreview(e) { $("#" + e + "Preview").html(""); for (var t = 0; t < tellrawJson.books[e].pages.length; t++) { for ( var a = tellrawJson.getLineSection(e, t, 0), o = 0; o < tellrawJson.sectionsLengthForLine(e, t); o++ ) { var n = tellrawJson.getLineSection(e, t, o); $("#" + e + "Preview").append( sectionJSONPreview(e, o, t, n, a, tellrawJson) ); } $("#" + e + "Preview").append("
"); } } function hoverEventPreview(e, t) { $("#" + e + "hoverSectionNo").html( t.books[e].cHoverEvent + 1 + " of " + t.hoverSectionsLength(e) ), $("#" + e + "HoverEventPreview").html(""); let a = t.getLineSection(e, t.books[e].cPage, t.books[e].cSection); if ("hoverEvent" in a && "contents" in a.hoverEvent) for (let o = 0; o < a.hoverEvent.contents.length; o++) $("#" + e + "HoverEventPreview").append( hoverEventJSONPreview( e, o, a.hoverEvent.contents[o], a.hoverEvent.contents[0], t ) ); } function loadJSONHoverPartFromPreview(e, t, a) { "book" == a ? ((booksJson.books[e].cHoverEvent = t), displaySectionValues(e, booksJson.getSection(e), a)) : "tellraw" == a && ((tellrawJson.books[e].cHoverEvent = t), displaySectionValues(e, tellrawJson.getSection(e), a)); } function hoverEventJSONPreview(e, t, a, o, n) { function s(e, t) { return ( "true" == e || 1 == e || ((void 0 == e || "unset" == e) && ("true" == t || 1 == t)) ); } var i, r = "", (i = a.text || a.translate || a.selector || a.nbt || a.score.name || "") ); } catch (e) { i = ""; } return ( s(a.obfuscated, o.obfuscated) ? (r += (function (e) { for (var t = "", a = 0; a < e.length; a++) t += "\n" == e.charAt(a) ? "\n" : "*"; return t; })(i)) : (r += i), s(a.underlined, o.underlined) && (r += ""), (r += "") ); } class Block { constructor(e, t) { (this.blockNBT = t || {}), (this.bType = e); } getBlockNBT(e) { e = e || 0; var t = ""; for (var a in this.blockNBT) t += getNBTforKey(a, this.blockNBT[a], e); return ( "CustomName" in this.blockNBT && (t += getCustomNameAndColor("#CustomName", e)), t.length ? "{" + t.substr(1) + "}" : t ); } generateForm(e) { for (var t in ((e = e || 0), this.blockNBT)) createComponent("blockSpec" + e, t, this.blockNBT[t], e); } generateFormForFalling(e) { for (var t in this.blockNBT) createComponent("blockSpec" + e, t, this.blockNBT[t], e); } loadValue(e, t, a, o) { var n = o || 0; if ($("#" + t + n).length && void 0 != this.blockNBT[t]) if ( "text" == this.blockNBT[t].type || "choice" == this.blockNBT[t].type || "makeSelect" == this.blockNBT[t].type || "makeSelectWithIndexAndValues" == this.blockNBT[t].type || "makeSelectWithIndexes" == this.blockNBT[t].type ) { if ("string" == this.blockNBT[t].format) "Potion" == t ? $("#" + t + n).val(extractMinecraftID(a)) : $("#" + t + n).val(a); else if ( "b" == this.blockNBT[t].format || "short" == this.blockNBT[t].format || "long" == this.blockNBT[t].format || "int" == this.blockNBT[t].format ) $("#" + t + n).val(parseInt(a)); else if ( "f" == this.blockNBT[t].format || "d" == this.blockNBT[t].format ) $("#" + t + n).val(parseFloat(a)); else if ("special" == this.blockNBT[t].format) if ("Tags" == t) { for (var s = "", i = 0; i < a.length; i++) s += "," + a[i]; $("#Tags" + n).val(s.substr(1)); } else if ("CustomName" == t) { var r = JSON.parse(JSON.parse('"' + a + '"')); r.text && $("#CustomName0").val(r.text); } } else "ticks" == this.blockNBT[t].type ? $("#" + t + n).val(a) : "blockSelect" == this.blockNBT[t].type ? ($("#" + t + n).val(a), $("#" + t + n).trigger("change")) : "RecordItem" == t && (showHide(t + n + "Pane", t + n + "SH"), setupItemSlotForNBT(t + n, a, e)); else if ("Items" == t) for (i = 0; i < a.length; i++) { setupItemSlotForNBT( replaceAll("b", "", a[i].Slot.val) + "Slot" + n, a[i], e ); } else if ("CustomName" == t) { var l; try { l = JSON.parse(JSON.parse('"' + a + '"')); } catch (e) { l = JSON.parse( JSON.parse( '"' + a.replace(/"/g, '\\"').replace(/\\'/g, "'") + '"' ) ); } importTellrawJSON("CustomName" + n, l), showHide( "CustomName" + n + "EntityName", "CustomName" + n + "EntityNameSH" ); } else void 0 != this.blockNBT[t] && "UUIDArray" == this.blockNBT[t].type && loadUUIDArrayNBT(t + n, a); } } class Banner extends Block { getBlockNBT(e) { e = e || 0; var t = $("#BlockEntityTag" + e).val(); return ( t.length && (-1 != t.indexOf("BlockEntityTag:") && (t = (t = (t = t.substr( t.indexOf("BlockEntityTag:{") )).replace("BlockEntityTag:{", "")).replace("}}", "")), (t = "," + t)), (t += getCustomNameAndColor("#CustomName", e)).length ? "{" + t.substr(1) + "}" : t ); } } class Beacon extends Block { constructor(e) { var t = statusEffects.slice(); t.splice(0, 1, [0, "None"]), super(e, { Lock: { type: "text", format: "string", tip: "block.Lock" }, Levels: { type: "text", format: "int", tip: e }, Primary: { type: "choice", values: t, format: "int", tip: e }, Secondary: { type: "choice", values: t, format: "int", tip: e }, }); } } class BlockWithSlots extends Block { constructor(e, t, a) { var o = { CustomName: { type: "customNameJSON", format: "special", tip: "block.CustomName", }, Lock: { type: "text", format: "string", tip: "block.Lock" }, }; Object.assign(o, t); for (var n = 0; n < a; n++) o[n + "Slot"] = { type: "itemselect", format: "special", hide: !0, label: "Slot " + n, }; super(e, o), (this.slots = a); } getBlockNBT(e) { e = e || 0; var t = ""; for (var a in this.blockNBT) t += getNBTforKey(a, this.blockNBT[a], e); for (var o = "", n = 0; n < this.slots; n++) { var s = getItemNBT(n + "Slot" + e); "{}" != s && (o += ",{Slot:" + n + "b," + s.substr(1)); } return ( o.length && (t += ",Items:[" + o.substr(1) + "]"), (t += getCustomNameAndColor("#CustomName", e)).length ? "{" + t.substr(1) + "}" : t ); } } class BeeHiveNest extends Block { constructor(e) { initBeeHiveNestNBT(), super(e, beeHiveNestNBT); } setFlowerCoords(e, t, a) {} getBlockNBT(e) { let t = getFlowerCoords("FlowerPos", (e = e || 0)); return (t += getBeesForHiveNBT(e)).length ? "{" + t.substr(1) + "}" : t; } } class campfire extends BlockWithSlots { constructor(e, t, a) { for (var o = {}, n = 0; n < a; n++) (o[n + "Slot"] = { type: "itemselect", format: "special", hide: !0, label: "Slot " + n, }), (o[n + "CookingTime"] = { type: "ticks", format: "special", tip: "campfire.CookingTime", label: "CookingTime " + n, }), (o[n + "CookingTotalTime"] = { type: "ticks", format: "special", tip: "campfire.CookingTotalTime", label: "CookingTotalTime " + n, }); super(e, o), delete this.blockNBT.CustomName, delete this.blockNBT.Lock, (this.slots = a); } getBlockNBT(e) { e = e || 0; var t = ""; for (var a in this.blockNBT) t += getNBTforKey(a, this.blockNBT[a], e); for (var o = "", n = "", s = "", i = 0; i < this.slots; i++) { var r = getItemNBT(i + "Slot" + e); "{}" != r && (s += ",{Slot:" + i + "b," + r.substr(1)); } for (i = 0; i < this.slots; i++) $("#" + i + "CookingTime" + e).val().length ? (o += "," + $("#" + i + "CookingTime" + e).val()) : (o += ",0"), $("#" + i + "CookingTotalTime" + e).val().length ? (n += "," + $("#" + i + "CookingTotalTime" + e).val()) : (n += ",0"); return ( ",0,0,0,0" != o && (t += ",CookingTimes:[I;" + o.substr(1) + "]"), ",0,0,0,0" != n && (t += ",CookingTotalTimes:[I;" + n.substr(1) + "]"), s.length && (t += ",Items:[" + s.substr(1) + "]"), t.length ? "{" + t.substr(1) + "}" : t ); } } class BrewingStand extends Block { constructor(e) { for ( var t = { CustomName: { type: "customNameJSON", format: "special", tip: "block.CustomName", }, Lock: { type: "text", format: "string", tip: "block.Lock" }, BrewTime: { type: "ticks", tip: e }, Fuel: { type: "text", format: "b", tip: e }, }, a = 0; a < 5; a++ ) t[a + "Slot"] = { type: "itemselect", format: "special", hide: !0, label: "Slot " + a, }; super(e, t), (this.slots = 5); } } function getCommandStatsFormNBT() { return { SuccessCountName: { type: "text", format: "string", tip: "commandStats", }, SuccessCountObjective: { type: "text", format: "string", tip: "commandStats", }, AffectedBlocksName: { type: "text", format: "string", tip: "commandStats", }, AffectedBlocksObjective: { type: "text", format: "string", tip: "commandStats", }, AffectedEntitiesName: { type: "text", format: "string", tip: "commandStats", }, AffectedEntitiesObjective: { type: "text", format: "string", tip: "commandStats", }, AffectedItemsName: { type: "text", format: "string", tip: "commandStats", }, AffectedItemsObjective: { type: "text", format: "string", tip: "commandStats", }, QueryResultName: { type: "text", format: "string", tip: "commandStats", }, QueryResultObjective: { type: "text", format: "string", tip: "commandStats", }, }; } function getCommandBlockFieldsFormNBT() { return { CustomName: { type: "customNameJSON", format: "special", tip: "block.CustomName", }, Command: { type: "text", format: "string", tip: "command_block" }, SuccessCount: { type: "text", format: "int", tip: "command_block" }, TrackOutput: { type: "choice", values: unsetTrueFalse, format: "b", tip: "command_block", }, powered: { type: "choice", values: unsetTrueFalse, format: "b", tip: "command_block", }, auto: { type: "choice", values: unsetTrueFalse, format: "b", tip: "command_block", }, conditionMet: { type: "choice", values: unsetTrueFalse, format: "b", tip: "command_block", }, UpdateLastExecution: { type: "choice", values: unsetTrueFalse, format: "b", tip: "command_block", }, LastExecution: { type: "text", format: "long", tip: "command_block" }, }; } class CommandBlock extends Block { constructor(e) { super(e, {}), (this.cbNBT = getCommandBlockFieldsFormNBT()), (this.csNBT = getCommandStatsFormNBT()), Object.assign(this.blockNBT, this.cbNBT), Object.assign(this.blockNBT, this.csNBT); } getBlockNBT(e) { e = e || 0; var t = ""; for (var a in this.cbNBT) t += getNBTforKey(a, this.cbNBT[a], e); var o = ""; for (var a in this.csNBT) o += getNBTforKey(a, this.csNBT[a], e); return ( o.length && (t += ",CommandStats:{" + o.substr(1) + "}"), (t += getCustomNameAndColor("#CustomName", e)).length ? "{" + t.substr(1) + "}" : t ); } } class EndGateway extends Block { getBlockNBT(e) { e = e || 0; var t = "", a = getNBTforKey("Age", this.blockNBT.Age, e); a.length && (t += a), (a = getNBTforKey("ExactTeleport", this.blockNBT.ExactTeleport, e)) .length && (t += a); var o = getNBTforKey("X", this.blockNBT.X, e), n = getNBTforKey("Y", this.blockNBT.Y, e), s = getNBTforKey("Z", this.blockNBT.Z, e); return ( 0 != o.length && 0 != n.length && 0 != s.length && (t += ",ExitPortal:{" + o.substr(1) + n + s + "}"), t.length ? "{" + t.substr(1) + "}" : t ); } } class FlowerPot extends Block { getBlockNBT(e) { e = e || 0; var t = "", a = $("#Item" + e).val(); return ( -1 != a && ((t = '{Item:"minecraft:'), -1 == a.indexOf(":") ? (t += a + '"}') : (t += a.split(":")[0] + '",Data:' + a.split(":")[1] + "}")), t ); } } class JukeBox extends Block { getBlockNBT(e) { var t = "", a = getItemNBT("RecordItem" + (e = e || 0)); return ( "{}" != a && (t += ",RecordItem:" + a), (t += getNBTforKey("Record", this.blockNBT.Record, e)).length ? "{" + t.substr(1) + "}" : t ); } } class Lectern extends Block { getBlockNBT(e) { var t = "", a = getItemNBT("Book" + (e = e || 0)); return ( "{}" != a && (t += ",Book:" + a), (t += getNBTforKey("Page", this.blockNBT.Page, e)).length ? "{" + t.substr(1) + "}" : t ); } } class MobSpawner extends Block { constructor(e) { super(e), initMobSpawnerNBT(), (this.blockNBT = mobSpawnerNBT); } getBlockNBT(e) { e = e || 0; var t = ""; for (var a in this.blockNBT) t += getNBTforKey(a, this.blockNBT[a], e); return (t += getSpawnPotentailsNBT(e, !1)).length ? "{" + t.substr(1) + "}" : t; } } class HeadBlock extends Block { getBlockNBT(e) { e = e || 0; var t = $("#SkullOwner" + e).val(); for (var a in (t.length && (t = -1 != t.indexOf("SkullOwner:{Id:") ? "," + (t = (t = (t = (t = (t = t.substr( t.indexOf("SkullOwner:{Id:") )).replace("SkullOwner:{Id:", "Owner:{Id:")).replace( "}]}}}}]}", "}]}}" )).replace("}]}}}", "}]}}")).replace(" 1", "")) : -1 != t.indexOf("Owner:{Id:") ? ",Owner:" + extractSegment("{", "}", t.indexOf("Owner:") + 6, t) : ',Owner:{Name:"' + t + '"}'), this.blockNBT)) t += getNBTforKey(a, this.blockNBT[a], e); return t.length ? "{" + t.substr(1) + "}" : t; } } class Sign extends Block { constructor(e) { super(e, {}), (this.csNBT = getCommandStatsFormNBT()), Object.assign(this.blockNBT, this.csNBT); } getBlockNBT(e) { e = e || 0; var t = "", a = ""; for (var o in this.csNBT) a += getNBTforKey(o, this.csNBT[o], e); return ( a.length && (t += ",CommandStats:{" + a.substr(1) + "}"), (t += signJson.getJsonForSign("blockSpec" + e + "SignPane")).length ? "{" + t.substr(1) + "}" : t ); } generateForm(e) { (e = e || 0), $("#blockSpec" + e).append( "
" ), createSignForm("blockSpec" + e, e); } generateFormForFalling(e) { this.generateForm(e); } } class SignJson extends Book { constructor() { super(), (this.context = "sign"); } sectionsLengthForLine(e, t) { return this.books[e].pages[t].length; } makeNewSign(e) { this.books[e] = { pages: [], cPage: 0, cSection: 0 }; for (var t = 0; t < 4; t++) this.books[e].pages.push([]), this.books[e].pages[t].push(new Section()); } getJsonForSign(e) { for (var t = "", a = 0, o = 0; o < this.books[e].pages.length; o++) { var n = [this.books[e].pages[o][0].data], s = this.getFirstFormats(n[0]); if ( (this.removeUnrequiredFormatting(s, n[0]), 1 == this.books[e].pages[o].length && void 0 != this.books[e].pages[o][0].data.text && "" == this.books[e].pages[o][0].data.text && a++, this.books[e].pages[o].length > 1) ) { n.extra = []; for (var i = 1; i < this.books[e].pages[o].length; i++) "" != this.books[e].pages[o][i].data.text && (n.push(this.books[e].pages[o][i].data), this.removeUnrequiredFormatting(s, n[n.length - 1])); "" != this.books[e].pages[o][0].data.text && (t += ",Text" + (o + 1) + ":" + jsonConvert( JSON.stringify( removeUnsetFromJSON(JSON.stringify(n)) ) )); } else "" != this.books[e].pages[o][0].data.text && (t += ",Text" + (o + 1) + ":" + jsonConvert( JSON.stringify( removeUnsetFromJSON(JSON.stringify(n[0])) ) )); } return 4 == a ? "" : t; } } function removeUnsetFromJSON(e) { var t = replaceAll(',"color":"unset"', "", e); return (t = replaceAll( ',"hoverEvent":{"action":"show_text","contents":[{"text":""}]}', "", (t = replaceAll( ':"false"', ":false", (t = replaceAll( ':"true"', ":true", (t = replaceAll( ',"obfuscated":"unset"', "", (t = replaceAll( ',"strikethrough":"unset"', "", (t = replaceAll( ',"underlined":"unset"', "", (t = replaceAll( ',"italic":"unset"', "", (t = replaceAll( ',"bold":"unset"', "", (t = replaceAll(',"font":""', "", t)) )) )) )) )) )) )) )) )); } function convert_contents_to_value(e) { let t = replaceAll( 'hoverEvent":{"action":"show_text","contents', 'hoverEvent":{"action":"show_text","value', e ); return (t = replaceAll( 'hoverEvent":{"action":"show_entity","contents', 'hoverEvent":{"action":"show_entity","value', (t = replaceAll( 'hoverEvent":{"action":"show_item","contents', 'hoverEvent":{"action":"show_item","value', t )) )); } function convert_value_to_contents(e) { if (null == e) return e; let t = replaceAll( 'hoverEvent":{"action":"show_text","value', 'hoverEvent":{"action":"show_text","contents', e ); return (t = replaceAll( 'hoverEvent":{"action":"show_entity","value', 'hoverEvent":{"action":"show_entity","contents', (t = replaceAll( 'hoverEvent":{"action":"show_item","value', 'hoverEvent":{"action":"show_item","contents', t )) )); } function removeUnsetFromObject(e) { for (key in e) "unset" == e[key] && delete e[key]; return e; } function createSignForm(e, t) { void 0 == signJson && (signJson = new SignJson()), $("#" + e + "ItemPane").append("
"), createComponent( (e += "SignPane"), "Pages", { type: "panel", cssClass: "fLabel100", panelID: e + "Pages", format: "special", tip: "written_book", }, t ), $("#" + e + "Pages").append( "


+X
" ), $("#" + e + "Setup").append( "
component type" ), $("#" + e + "Setup").append( "
value" ), $("#" + e + "Setup").append( "
" ), createComponent( e + "Setup", "color", { type: "makeSelect", id: e + "color", values: jsonColors, format: "special", cssClass: "fLabel100", tip: "written_book", eventClass: "jsonHexColorUpdate", }, t ), $("#" + e + "Setup").append( "" ), new jscolor.color(document.getElementById(e + "_color"), {}).fromString( "FF0000" ), $("#" + e + "_colsettings").hide(), $(".jsonHexColorUpdate").on("change", function () { jsonHexColorUpdate(e, signJson.context); }), createComponent( e + "Setup", "font", { type: "text", id: e + "font", cssClass: "fLabel100", format: "string", tip: "written_book", eventClass: "signUpdate", }, t ), createComponent( e + "Setup", "jsonFormats", { label: " ", type: "jsonFormats", id: e, cssClass: "fLabel100", format: "special", eventClass: "signUpdate", }, t ), createComponent( e + "Setup", "clickEvent", { type: "choicetext", id: e + "clickEvent", values: ["run_command"], format: "special", fwClass: "bigTF", cssClass: "fLabel100", tip: "written_book", eventClass: "signUpdate", }, t ), $("#" + e + "bookText_choice").bind("change", function () { "score" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "objective" ), $(".signUpdate").on("change keyup", function () { signUpdate(e); })) : "nbt" == $("#" + e + "bookText_choice").val() ? ($("#" + e + "extraComponents").html( "target type
" ), changeNBTTargetTypeSign(e, t), bindTargetTypeChangeSign(e, t)) : $("#" + e + "extraComponents").html(""), $("#" + e + "bookText_txt").trigger("keyup"); }), signJson.makeNewSign(e), $(".signUpdate").on("change keyup", function () { signUpdate(e); }), displaySectionValues(e, signJson.getSection(e), signJson.context); } function bindTargetTypeChangeSign(e, t) { $("#" + e + "targetType").bind("change", function () { changeNBTTargetTypeSign(e, t); }); } function changeNBTTargetTypeSign(e, t) { "entity" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "entity " ) : "storage" == $("#" + e + "targetType").val() ? $("#" + e + "nbtTarget").html( "storage " ) : ($("#" + e + "nbtTarget").html( "block XYZ" ), $("#" + e + "nbtTarget").html( makeCoords(e + "BlockNBT", "Block", !0, !0) ), $("#" + e + "nbtTarget span") .removeClass("fLabel200") .addClass("fLabel100"), $("#" + e + "BlockNBT").addClass("signUpdate")), createComponent( e + "nbtTarget", "interpret", { id: e + "interpret", type: "choice", values: unsetTrueFalse, cssClass: "fLabel100", eventClass: "signUpdate", }, t ), $(".signUpdate").on("change keyup", function () { signUpdate(e); }), signUpdate(e); } function signUpdate(e) { var t = {}, a = replaceAll("\\n", "\n", $("#" + e + "bookText_txt").val()); if ("score" == $("#" + e + "bookText_choice").val()) t.score = { name: a, objective: $("#" + e + "objective").val() }; else if ("nbt" == $("#" + e + "bookText_choice").val()) { if (((t.nbt = a), "entity" == $("#" + e + "targetType").val())) t.entity = $("#" + e + "nbtEntityTarget").val(); else if ("storage" == $("#" + e + "targetType").val()) t.storage = $("#" + e + "nbtStorageTarget").val(); else { var o = getCoordsString(e + "BlockNBT"); t.block = o[0] + " " + o[1] + " " + o[2]; } 1 == $("#" + e + "interpret").val() ? (t.interpret = !0) : 0 == $("#" + e + "interpret").val() && (t.interpret = !1); } else t[$("#" + e + "bookText_choice").val()] = a; (t.font = $("#" + e + "font").val()), "Hex Code" == $("#" + e + "color").val() ? (t.color = "#" + $("#" + e + "_color").val()) : (t.color = $("#" + e + "color").val()), (t.bold = $("input[name='" + e + "bold']:checked").val()), (t.italic = $("input[name='" + e + "italic']:checked").val()), (t.underlined = $("input[name='" + e + "underlined']:checked").val()), (t.strikethrough = $( "input[name='" + e + "strikethrough']:checked" ).val()), (t.obfuscated = $("input[name='" + e + "obfuscated']:checked").val()), $("#" + e + "clickEvent_txt").val().length && (t.clickEvent = { action: $("#" + e + "clickEvent_choice").val(), value: $("#" + e + "clickEvent_txt").val(), }), signJson.updateSection(e, t), deferJSONOutput || (signPreview(e), generateCommand()); } function signPreview(e) { $("#" + e + "Preview").html(""); for (var t = 0; t < 4; t++) { for ( var a = signJson.getLineSection(e, t, 0), o = 0; o < signJson.sectionsLengthForLine(e, t); o++ ) { var n = signJson.getLineSection(e, t, o); $("#" + e + "Preview").append( sectionJSONPreview(e, o, t, n, a, signJson) ); } $("#" + e + "Preview").append("
"); } } function deleteSignSection(e) { 1 == signJson.sectionsLength(e) ? alertify.alert( "MCStacker requires each line in a sign to have at least one section. So it aint gonna let you delete this section. Just leave it blank." ) : displaySectionValues(e, signJson.deleteSection(e), signJson.context); } class area_effect_cloud extends Entity { constructor(e, t) { super(e, t); var a = particles.slice(); a.unshift("unset"), (this.entityNBT = { MotionX: { type: "text", format: "special", tip: "entity.Motion", }, MotionY: { type: "text", format: "special", tip: "entity.Motion", }, MotionZ: { type: "text", format: "special", tip: "entity.Motion", }, Yaw: { type: "text", format: "special", tip: "entity" }, Pitch: { type: "text", format: "special", tip: "entity" }, NoGravity: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, UUID: { type: "UUIDArray", format: "intArray", align: "R", tip: "entity", }, CustomName: { type: "customNameJSON", format: "special", tip: "entity", }, CustomNameVisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Team: { type: "text", format: "string", tip: "mob" }, Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, Particle: { type: "makeSelect", values: a, format: "special", tip: "area_effect_cloud", align: "R", }, ReapplicationDelay: { type: "ticks", tip: "area_effect_cloud", align: "R", }, Radius: { type: "text", format: "f", tip: "area_effect_cloud", align: "R", }, RadiusPerTick: { type: "text", format: "f", tip: "area_effect_cloud", align: "R", }, RadiusOnUse: { type: "text", format: "f", tip: "area_effect_cloud", align: "R", }, Duration: { type: "ticks", tip: "area_effect_cloud", align: "R", }, DurationOnUse: { type: "text", format: "f", tip: "area_effect_cloud", align: "R", }, Age: { type: "ticks", tip: "area_effect_cloud", align: "R" }, WaitTime: { type: "ticks", tip: "area_effect_cloud", align: "R", }, Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: t, }, Color: { type: "colorChooser", format: "long", tip: "area_effect_cloud", align: "R", }, Potion: { type: "makeSelectWithIndexAndValues", values: potions, format: "string", tip: "area_effect_cloud", align: "R", }, Effects: { type: "statusEffects", format: "special", tip: "area_effect_cloud", align: "R", }, }); } getEntitySpecificCommand(e) { var t = ""; for (var a in ("unset" != $("#Particle" + this.stackPos).val() && (t += ',Particle:"' + $("#Particle" + this.stackPos).val() + '"'), this.entityNBT)) t += getNBTforKey(a, this.entityNBT[a], e); return ( (t += getMotion(this.stackPos, "Motion") + getRotation(this.stackPos) + getTargetingTags(this.stackPos) + getPassengersNBT(this.stackPos) + getPotion("Potion", "Potion" + this.stackPos) + getStatusEffectsNBT("Effects", "Effects" + this.stackPos)), (t += getCustomNameAndColor("#CustomName", this.stackPos)) ); } generateForm() { super.generateForm(); } } class armor_stand extends Entity { constructor(e, t) { super(e, t), (this.entityNBT = { MotionX: { type: "text", format: "special", tip: "entity.Motion", }, MotionY: { type: "text", format: "special", tip: "entity.Motion", }, MotionZ: { type: "text", format: "special", tip: "entity.Motion", }, Yaw: { type: "text", format: "special", tip: "entity" }, Pitch: { type: "text", format: "special", tip: "entity" }, UUID: { type: "UUIDArray", format: "intArray", align: "R", tip: "entity", }, CustomName: { type: "customNameJSON", format: "special", tip: "entity", }, CustomNameVisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Team: { type: "text", format: "string", tip: "mob" }, Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, NoGravity: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Invulnerable: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Fire: { type: "ticks", tip: "entity" }, Air: { type: "ticks", tip: "entity" }, Glowing: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, ShowArms: { type: "choice", values: unsetTrueFalse, format: "b", tip: "armor_stand", align: "R", }, Small: { type: "choice", values: unsetTrueFalse, format: "b", tip: "armor_stand", align: "R", }, Marker: { type: "choice", values: unsetTrueFalse, format: "b", tip: "armor_stand", align: "R", }, Invisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "armor_stand", align: "R", }, NoBasePlate: { type: "choice", values: unsetTrueFalse, format: "b", tip: "armor_stand", align: "R", }, PersistenceRequired: { type: "choice", values: unsetTrueFalse, format: "b", tip: "mob", align: "R", }, Health: { type: "text", format: "f", tip: "mob", align: "R" }, Holding: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, Offhand: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, Head: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, Body: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, Leg: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, Boot: { type: "itemselect", format: "special", hide: !0, tip: "mob", align: "R", }, }), (this.poseparts = new Array( "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "Head" )); } getEntitySpecificCommand(e) { var t = ""; for (var a in this.entityNBT) t += getNBTforKey(a, this.entityNBT[a], e); return ( (t += getMotion(this.stackPos, "Motion") + getTargetingTags(this.stackPos) + this.armorStandPose() + this.armorStandDisabledSlotBitField() + getPassengersNBT(this.stackPos) + getRotation(this.stackPos) + getHandAndArmorItmes(this.stackPos)), (t += getCustomNameAndColor("#CustomName", this.stackPos)) ); } loadPoseNBT(e) { showHide("Pose" + this.stackPos, "Pose" + this.stackPos + "SH"); for (var t = 0; t < this.poseparts.length; t++) void 0 != e[this.poseparts[t]] && ($("#Pose" + this.stackPos + "_" + t + "_x").val( parseFloat(e[this.poseparts[t]].val[0]) ), $("#Pose" + this.stackPos + "_" + t + "_y").val( parseFloat(e[this.poseparts[t]].val[1]) ), $("#Pose" + this.stackPos + "_" + t + "_z").val( parseFloat(e[this.poseparts[t]].val[2]) )); } armorStandPose() { for ( var e = "", t = new Array("x", "y", "z"), a = 0; a < this.poseparts.length; a++ ) { var o = ""; let s = !1; for (var n = 0; n < t.length; n++) "f" == o.charAt(o.length - 1) && (o += ","), $("#Pose" + this.stackPos + "_" + a + "_" + t[n]).val() .length > 0 ? ((s = !0), (o += $( "#Pose" + this.stackPos + "_" + a + "_" + t[n] ).val() + "f")) : (o += "0f"); s && (e += "," + this.poseparts[a] + ":[" + o + "]"); } return e.length ? ",Pose:{" + e.substr(1) + "}" : e; } loadDisabledSlotsNBT(e) { showHide( "DisabledSlots" + this.stackPos, "DisabledSlots" + this.stackPos + "SH" ); var t = [], a = 1, o = [1, 256, 65536]; t.push(0); for (var n = 0; n < 3; n++) { a = o[n]; for (var s = 0; s < 6; s++) t.push(a), (a *= 2); } n = 2; var i = 5; for (s = t.length - 2; s >= 0; s--) e >= t[s + 1] && ((e -= t[s + 1]), $( "#DisabledSlot" + this.stackPos + "_" + i + "_" + dsOperation[n] ).prop("checked", !0)), --i < 0 && (n--, (i = 5)); } armorStandDisabledSlotBitField() { for (var e = 0, t = 0; t < 6; t++) $("#DisabledSlot" + this.stackPos + "_" + t + "_remove").is( ":checked" ) && (e += 1 << (t + 0)), $("#DisabledSlot" + this.stackPos + "_" + t + "_replace").is( ":checked" ) && (e += 1 << (t + 8)), $("#DisabledSlot" + this.stackPos + "_" + t + "_place").is( ":checked" ) && (e += 1 << (t + 16)); return 0 != e ? ",DisabledSlots:" + e : ""; } generateForm() { super.generateForm(), $("#entityPane" + this.stackPos + "R").append( "
Pose" + mkShowHide( "Pose" + this.stackPos, "Pose" + this.stackPos + "SH" ) + "
" + makeTip("armor_stand", "Pose") ); for ( var e = new Array( "Body", "Left Arm", "Right Arm", "Left Leg", "Right Leg", "Head" ), t = new Array("x", "y", "z"), a = "", o = 0; o < e.length; o++ ) { a += ""; for (var n = 0; n < t.length; n++) a += ""; a += ""; } (a += "
X RotationY RotationZ Rotation
" + e[o] + "
Import Pose " + makeButton( "Import", "importPose(" + this.stackPos + ")", "Import Generated Pose" ) + makeTip("armor_stand", "ImportPose")), showHide("Pose" + this.stackPos, "Pose" + this.stackPos + "SH"), $("#Pose" + this.stackPos).html(a); for (o = 0; o < e.length; o++) for (n = 0; n < t.length; n++) bindGenCom( "Pose" + this.stackPos + "_" + o + "_" + t[n], "keyup" ); $("#entityPane" + this.stackPos + "R").append( "
Disabled Slots" + mkShowHide( "DisabledSlots" + this.stackPos, "DisabledSlots" + this.stackPos + "SH" ) + "
" + makeTip("armor_stand", "DisabledSlots") ); var s = ""; for (o = 0; o < disabledSlots.length; o++) { s += ""; for (n = 0; n < dsOperation.length; n++) s += ""; s += ""; } (s += "
AllRemovePlace
" + disabledSlots[o] + "
"), showHide( "DisabledSlots" + this.stackPos, "DisabledSlots" + this.stackPos + "SH" ), $("#DisabledSlots" + this.stackPos).html(s); for (o = 0; o < disabledSlots.length; o++) for (n = 0; n < dsOperation.length; n++) bindGenCom( "DisabledSlot" + this.stackPos + "_" + o + "_" + dsOperation[n], "change" ); } } function importPose(e) { let t = new Array( "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg", "Head" ), a = $("#importPose" + e).val(); a = (a = extractSegment("{", "}", a.indexOf("Pose:") + 5, a)).substr( 1, a.length - 2 ); for (var o = 0; o < t.length; o++) { let n = a.indexOf(t[o]); if (-1 != n) { (part = extractSegment("[", "]", n + t[o].length + 1, a)), (part = part.substr(1, part.length - 2)); let s = part.split(","); $("#Pose" + e + "_" + o + "_x").val(parseFloat(s[0])), $("#Pose" + e + "_" + o + "_y").val(parseFloat(s[1])), $("#Pose" + e + "_" + o + "_z").val(parseFloat(s[2])); } else $("#Pose" + e + "_" + o + "_x").val(""), $("#Pose" + e + "_" + o + "_y").val(""), $("#Pose" + e + "_" + o + "_z").val(""); } generateCommand(); } function allDisabledSlots(e) { $("#disableOutput").prop("checked", !0); for (var t = 0; t < disabledSlots.length; t++) for (var a = 0; a < dsOperation.length; a++) $("#DisabledSlot" + e + "_" + t + "_" + dsOperation[a]).prop( "checked", $("#DisabledSlotAll" + e).is(":checked") ); $("#disableOutput").prop("checked", !1), generateCommand(); } class BreedableMob extends Mob { constructor(e, t, a) { super(e, t), (this.breedNBT = { InLove: { type: "ticks", tip: "breedable", align: "R" }, Age: { type: "ticks", tip: "breedable", align: "R" }, ForcedAge: { type: "ticks", tip: "breedable", align: "R" }, AgeLocked: { type: "choice", values: unsetTrueFalse, format: "b", tip: "breedable", align: "R", }, LoveCause: { type: "UUIDArray", format: "intArray", align: "R", tip: "breedable", }, }), void 0 != a && Object.assign(this.breedNBT, a); } generateForm() { Object.assign(this.mobNBT, this.breedNBT), super.generateForm(); } } class tropical_fish extends Mob { constructor(e, t, a) { super(e, t), (this.myNBT = { Variant: { type: "choice", values: [ [0, "Random"], [1, "Specified Below"], ], format: "special", tip: t, align: "R", }, Size: { type: "choice", values: [ [0, "Small"], [1, "Big"], ], format: "special", align: "R", }, Pattern: { type: "makeSelect", values: [0, 1, 2, 3, 4, 5], format: "special", align: "R", }, BaseColor: { type: "choice", values: colours1, format: "special", align: "R", }, PatternColor: { type: "choice", values: colours1, format: "special", align: "R", }, FromBucket: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, }), void 0 != a && Object.assign(this.myNBT, a); } generateForm() { Object.assign(this.mobNBT, this.myNBT), super.generateForm(); } getEntitySpecificCommand(e) { if (0 == $("#Variant" + this.stackPos).val()) return super.getMobNBT(); var t = parseInt($("#Size" + this.stackPos).val()); return ( (t += 256 * parseInt($("#Pattern" + this.stackPos).val())), (t += 65536 * parseInt($("#BaseColor" + this.stackPos).val())), (t += 16777216 * parseInt($("#PatternColor" + this.stackPos).val())), super.getMobNBT() + ",Variant:" + t ); } loadVariantNBT(e) { $("#Variant" + this.stackPos).val(1); var t = Math.floor(e / 16777216), a = e % 16777216; $("#PatternColor" + this.stackPos).val(t), (t = Math.floor(a / 65536)), (a %= 65536), $("#BaseColor" + this.stackPos).val(t), (t = Math.floor(a / 256)), (a %= 256), $("#Pattern" + this.stackPos).val(t), $("#Size" + this.stackPos).val(a); } } class enderman extends Mob { constructor(e, t, a) { super(e, t); } generateForm() { var e = "
Carry"; e += ""), super.generateForm(), $("#entityPane" + this.stackPos + "R").append(e); } getEntitySpecificCommand(e) { var t = ""; if (-1 != $("#block" + e).val()) { if ( ((t = ',carriedBlockState:{Name:"minecraft:' + $("#block" + e).val() + '"'), $("#block" + e).val() in blockStates) ) { var a = blockStates[$("#block" + e).val()], o = ""; for (var n in a) "unset" != $("#" + n + "BS" + e).val() && (o += "," + n + ':"' + $("#" + n + "BS" + e).val() + '"'); 0 != o.length && (t += ",Properties:{" + o.substr(1) + "}"); } t += "}"; } return super.getEntitySpecificCommand() + t; } loadCarriedBlock(e) { void 0 != e.Name && $("#Carry" + this.stackPos).val(extractMinecraftID(e.Name.val)); } } class zombie extends Mob { constructor(e, t, a) { super(e, t), (this.myNBT = { IsBaby: { type: "choice", values: unsetTrueFalse, format: "b", tip: "zombie", align: "R", }, CanBreakDoors: { type: "choice", values: unsetTrueFalse, format: "b", tip: "zombie", align: "R", }, }), void 0 != a && Object.assign(this.myNBT, a); } generateForm() { Object.assign(this.mobNBT, this.myNBT), super.generateForm(); } getEntitySpecificCommand(e) { var t = ""; if ("zombie_villager" == this.entityType) { for ( var a = "", o = ["meeting_point", "home", "job_site"], n = 0; n < o.length; n++ ) $("#Memories" + this.stackPos + o[n] + "X").val().length && $("#Memories" + this.stackPos + o[n] + "Y").val().length && $("#Memories" + this.stackPos + o[n] + "Z").val().length && (a += ',"minecraft:' + o[n] + '":{value:{pos:[I;' + $("#Memories" + this.stackPos + o[n] + "X").val() + "," + $("#Memories" + this.stackPos + o[n] + "Y").val() + "," + $("#Memories" + this.stackPos + o[n] + "Z").val() + '],dimension:"minecraft:' + $("#Memories" + this.stackPos + o[n] + "Dim").val() + '"}}'); a.length && (a = ",Brain:{memories:{" + a.substr(1) + "}}"); var s = ""; $("#Gossips" + this.stackPos + "Pane > .gossip").each(function (e) { var t = this.id, a = 'Type:"' + $("#" + t + "Type").val() + '"'; $("#" + t + "Value").val().length && (a += ",Value:" + $("#" + t + "Value").val()); let o = getUUIDArray(t + "Target"); o.length && (a += ",Target:" + o), a.length && (s += ",{" + a + "}"); }), s.length && (s = ",Gossips:[" + s.substr(1) + "]"); var i = ""; $("#Trades" + this.stackPos + "Pane > .trade").each(function (e) { var t = this.id, a = ""; -1 != $("#" + t + "rewardExp").val() && (a += ",rewardExp:" + $("#" + t + "rewardExp").val() + "b"), $("#" + t + "maxUses").val().length && (a += ",maxUses:" + $("#" + t + "maxUses").val()), $("#" + t + "uses").val().length && (a += ",uses:" + $("#" + t + "uses").val()), $("#" + t + "xp").val().length && (a += ",xp:" + $("#" + t + "xp").val()), $("#" + t + "priceMultiplier").val().length && (a += ",priceMultiplier:" + $("#" + t + "priceMultiplier").val() + "f"), $("#" + t + "specialPrice").val().length && (a += ",specialPrice:" + $("#" + t + "specialPrice").val()), $("#" + t + "demand").val().length && (a += ",demand:" + $("#" + t + "demand").val()); var o = getItemNBT(t + "buy"); "{}" != o && (a += ",buy:" + o), "{}" != (o = getItemNBT(t + "buyB")) && (a += ",buyB:" + o), "{}" != (o = getItemNBT(t + "sell")) && (a += ",sell:" + o), a.length && (i += ",{" + a.substr(1) + "}"); }), $("#NoTrades" + e).is(":checked") ? (i = ",Offers:{}") : i.length && (i = ",Offers:{Recipes:[" + i.substr(1) + "]}"), (t = getVillagerData(e) + i + a + s); } else "zombified_piglin" == this.entityType && (t = getAngryAt(e)); return super.getMobNBT() + t; } loadVillagerTradesNBT(e, t) { if (void 0 != e.Recipes) for (var a = e.Recipes.val, o = 0; o < a.length; o++) { let e = "Trades" + this.stackPos + "Pane_Trade_" + o; var n = a[o]; addTrade("Trades" + this.stackPos + "Pane"), addTradeFromNBT(n, e, t); } else $("#NoTrades" + this.stackPos).prop("checked", !0); } } class HorseMob extends BreedableMob { constructor(e, t) { if ( (super(e, t), (this.myNBT = { Bred: { type: "choice", values: unsetTrueFalse, format: "b", tip: "horse", align: "R", }, EatingHaystack: { type: "choice", values: unsetTrueFalse, format: "b", tip: "horse", align: "R", }, Tame: { type: "choice", values: unsetTrueFalse, format: "b", tip: "horse", align: "R", }, Temper: { type: "text", format: "int", tip: "horse", align: "R", }, Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "mob.Owner", }, }), "llama" == this.entityType || "trader_llama" == this.entityType ? ((this.myNBT.Variant = { type: "choice", values: [ [-1, "unset"], [0, "Creamy"], [1, "White"], [2, "Brown"], [3, "Gray"], ], format: "int", tip: "llama", align: "R", }), (this.myNBT.Strength = { type: "choice", values: [ [-1, "unset"], [0, "0"], [1, "1"], [2, "2"], [3, "3"], [4, "4"], [5, "5"], ], format: "int", tip: "llama", align: "R", }), (this.myNBT.DecorItem = { type: "makeSelect", values: [ "unset", "white_carpet", "orange_carpet", "magenta_carpet", "light_blue_carpet", "yellow_carpet", "lime_carpet", "pink_carpet", "gray_carpet", "light_gray_carpet", "cyan_carpet", "purple_carpet", "blue_carpet", "brown_carpet", "green_carpet", "red_carpet", "black_carpet", ], format: "special", hasUnset: !0, tip: "llama", align: "R", })) : (this.myNBT.SaddleItem = { type: "makeSelect", values: ["unset", "none", "saddle"], format: "special", tip: "horse", align: "R", }), "horse" == this.entityType) ) (this.myNBT.Variant = { type: "choice", values: this.getVariantArray(), format: "int", tip: "horse", align: "R", }), (this.myNBT.ArmorItem = { type: "itemselect", format: "special", tip: "horse", hide: !0, addNoneAfterUnset: !0, align: "R", }); else if ( "mule" == this.entityType || "donkey" == this.entityType || "llama" == this.entityType || "trader_llama" == this.entityType ) { "trader_llama" == this.entityType && (this.myNBT.DespawnDelay = { type: "ticks", tip: "trader_llama", align: "R", }), (this.myNBT.ChestedHorse = { type: "choice", values: unsetTrueFalse, format: "b", tip: "chested_horse", align: "R", }); for (var a = 2; a <= 16; a++) this.myNBT[a + "Slot"] = { type: "itemselect", format: "special", hide: !0, label: "Slot " + a, align: "R", }; } else "skeleton_horse" == this.entityType && ((this.myNBT.SkeletonTrap = { type: "choice", values: unsetTrueFalse, format: "b", tip: "skeleton_horse", align: "R", }), (this.myNBT.SkeletonTrapTime = { type: "ticks", tip: "skeleton_horse", align: "R", })); } loadSaddleItemNBT(e) { void 0 != e.id && "minecraft:saddle" == e.id.val ? $("#SaddleItem" + this.stackPos).val("saddle") : $("#SaddleItem" + this.stackPos).val("none"); } loadDecorItemNBT(e) { void 0 != e.id && $("#DecorItem" + this.stackPos).val(extractMinecraftID(e.id.val)); } getVariantArray() { var e = new Array( "White", "Creamy", "Chestnut", "Brown", "Black", "Gray", "Dark Brown" ), t = new Array( "None", "White", "White Field", "White Dots", "Black Dots" ), a = []; a.push([-1, "unset"]); for (var o = 0; o < e.length; o++) for (var n = 0; n < t.length; n++) a.push([o + 256 * n, e[o] + " / " + t[n]]); return a; } getEntitySpecificCommand(e) { var t = ""; if ( "mule" == this.entityType || "donkey" == this.entityType || "llama" == this.entityType || "trader_llama" == this.entityType ) { for (var a = 2; a <= 16; a++) { var o = getItemNBT(a + "Slot" + e); "{}" != o && (t += ",{Slot:" + a + "b," + o.substr(1)); } t.length && (t = ",Items:[" + t.substr(1) + "]"); } return ( "llama" == this.entityType || "trader_llama" == this.entityType ? "unset" != $("#DecorItem" + this.stackPos).val() && (t += ',DecorItem:{id:"minecraft:' + $("#DecorItem" + this.stackPos).val() + '",Count:1b}') : "unset" != $("#SaddleItem" + this.stackPos).val() && ("none" == $("#SaddleItem" + this.stackPos).val() ? (t += ",SaddleItem:{}") : (t += ',SaddleItem:{id:"minecraft:' + $("#SaddleItem" + this.stackPos).val() + '",Count:1b}')), "horse" == this.entityType && "-1" != $("#ArmorItem" + this.stackPos).val() && ("none" == $("#ArmorItem" + this.stackPos).val() ? (t += ",ArmorItem:{}") : (t += ",ArmorItem:" + getItemNBT("ArmorItem" + this.stackPos))), super.getMobNBT() + t ); } generateForm() { Object.assign(this.breedNBT, this.myNBT), super.generateForm(); } } class Fox extends BreedableMob { constructor(e, t) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "mob.Owner", }, Sitting: { type: "choice", values: unsetTrueFalse, format: "b", tip: "tameable", align: "R", }, Sleeping: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, Crouching: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, Type: { type: "choice", values: [ [-1, "unset"], ["red", "Red"], ["snow", "Snow"], ], format: "string", tip: t, align: "R", }, Trusted: { type: "panel", label: "Trusted", panelID: "trusted" + e, tip: t, align: "R", }, }); } generateForm() { Object.assign(this.breedNBT, this.myNBT), super.generateForm(), $("#trusted" + this.stackPos).html( "+" + makeTip("fox.Trusted") ); } getEntitySpecificCommand(e) { var t = ""; return ( $("#trusted" + e + " > .foxTrust").each(function (e) { var a = this.id; let o = getUUIDArray(a); o.length && (t += "," + o); }), t.length && (t = ",Trusted:[" + t.substr(1) + "]"), super.getMobNBT() + t ); } } function addFoxTrusts(e, t) { let a = 0; for (; $("#" + e + t + "_" + a).length; ) a++; $("#trusted" + t).append( "" ), createComponent( e + t + "_" + a, "Trusts UUID", { id: "Trusts" + t + "_" + a, type: "UUIDArray", format: "intArray", align: "R", }, t ), $("#" + e + t + "_" + a).append( "x" ); } class Bee extends BreedableMob { constructor(e, t) { super(e, t), (this.myNBT = { HivePosX: { type: "text", format: "special", align: "R", tip: t, }, HivePosY: { type: "text", format: "special", align: "R" }, HivePosZ: { type: "text", format: "special", align: "R" }, FlowerPosX: { type: "text", format: "special", align: "R", tip: t, }, FlowerPosY: { type: "text", format: "special", align: "R" }, FlowerPosZ: { type: "text", format: "special", align: "R" }, HasNectar: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, HasStung: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, TicksSincePollination: { type: "ticks", format: "int", tip: t, align: "R", }, CannotEnterHiveTicks: { type: "ticks", format: "int", tip: t, align: "R", }, CropsGrownSincePollination: { type: "text", format: "int", tip: t, align: "R", }, AngerTime: { type: "ticks", format: "int", tip: t, align: "R" }, AngryAt: { type: "UUIDArray", format: "special", align: "R", tip: t, }, }); } loadFlowerOrHovePost(e, t) { $("#" + t + "X" + this.stackPos).val(e.X.val), $("#" + t + "Y" + this.stackPos).val(e.Y.val), $("#" + t + "Z" + this.stackPos).val(e.Z.val); } generateForm() { Object.assign(this.breedNBT, this.myNBT), super.generateForm(); } getCoords(e) { return $("#" + e + "X" + this.stackPos).val().length && $("#" + e + "Y" + this.stackPos).val().length && $("#" + e + "Z" + this.stackPos).val().length ? "," + e + ":{X:" + $("#" + e + "X" + this.stackPos).val() + ",Y:" + $("#" + e + "Y" + this.stackPos).val() + ",Z:" + $("#" + e + "Z" + this.stackPos).val() + "}" : ""; } getEntitySpecificCommand(e) { return ( super.getMobNBT() + getAngryAt(e) + this.getCoords("HivePos") + this.getCoords("FlowerPos") ); } } class Piglin extends Mob { constructor(e, t, a) { super(e, t, a); } getEntitySpecificCommand(e) { let t = "", a = ""; return ( $("#Inventory" + e + "MultiItemPane > .itemSelectControl").each( function (e) { var t = this.id.substr(0, this.id.lastIndexOf("Pane")); "-1" != $("#" + t).val() && (a += "," + getItemNBT(t)); } ), a.length && (t += ",Inventory:[" + a.substr(1) + "]"), t + super.getMobNBT() ); } loadPiglinInventory(e, t, a) { let o = "Inventory" + a + "MultiItem"; showHide(o + "Pane", o + "PaneSH"); for (let a = 0; a < t.length; a++) addMultiItem(o + "Pane", !1), showHide(o + "Pane_" + a + "Pane", o + "Pane_" + a + "PaneSH"), setupItemSlotForNBT(o + "Pane_" + a, t[a], e); } } class villager extends BreedableMob { constructor(e, t) { super(e, t), (this.tradeCounter = 0), (this.myNBT = { profession: { type: "makeSelect", values: [ "unset", "none", "armorer", "butcher", "cartographer", "cleric", "farmer", "fisherman", "fletcher", "leatherworker", "librarian", "mason", "nitwit", "shepherd", "toolsmith", "weaponsmith", ], format: "special", tip: "villager", align: "R", }, type: { type: "makeSelect", values: [ "unset", "desert", "jungle", "plains", "savanna", "snow", "swamp", "taiga", ], format: "special", tip: "villager", align: "R", }, level: { type: "makeSelect", values: ["unset", 1, 2, 3, 4, 5, 99], format: "special", tip: "villager", align: "R", }, Willing: { type: "choice", values: unsetTrueFalse, format: "b", tip: "villager", align: "R", }, LastRestock: { type: "text", format: "int", tip: "villager", align: "R", }, Xp: { type: "text", format: "int", tip: "villager", align: "R", }, Trades: { type: "villTrade", format: "special", tip: "villager", align: "R", }, Memories: { type: "memories", format: "special", tip: "villager.memories", align: "R", }, Gossips: { type: "gossips", format: "special", tip: "villager.gossips", align: "R", }, NoTrades: { label: "Untradable", type: "cb", format: "special", tip: "villager", align: "R", }, }); for (var a = 0; a < 8; a++) this.myNBT[a + "Inv"] = { type: "itemselect", format: "special", hide: !0, label: "Inventory " + a, align: "R", tip: "villager.Inventory", }; "wandering_trader" == t && (delete this.myNBT.type, delete this.myNBT.profession, (this.myNBT.DespawnDelay = { type: "ticks", tip: "wandering_trader", align: "R", }), (this.myNBT.WanderTargetX = { type: "text", format: "special", tip: "wandering_trader.WanderTarget", align: "R", }), (this.myNBT.WanderTargetY = { type: "text", format: "special", align: "R", }), (this.myNBT.WanderTargetZ = { type: "text", format: "special", align: "R", })); } loadVillagerTradesNBT(e, t) { if (void 0 != e.Recipes) for (var a = e.Recipes.val, o = 0; o < a.length; o++) { let e = "Trades" + this.stackPos + "Pane_Trade_" + o; var n = a[o]; addTrade("Trades" + this.stackPos + "Pane"), addTradeFromNBT(n, e, t); } else $("#NoTrades" + this.stackPos).prop("checked", !0); } loadWanderTargetNBT(e) { $("#WanderTargetX" + this.stackPos).val(parseInt(e.X.val)), $("#WanderTargetY" + this.stackPos).val(parseInt(e.Y.val)), $("#WanderTargetZ" + this.stackPos).val(parseInt(e.Z.val)); } getEntitySpecificCommand(e) { for (var t = "", a = 0; a < 8; a++) { var o = getItemNBT(a + "Inv" + e); "{}" != o && (t += ",{" + o.substr(1)); } t.length && (t = ",Inventory:[" + t.substr(1) + "]"); var n = "", s = ""; if ("villager" == this.entityType) { var i = ["meeting_point", "home", "job_site"]; for (a = 0; a < i.length; a++) $("#Memories" + this.stackPos + i[a] + "X").val().length && $("#Memories" + this.stackPos + i[a] + "Y").val().length && $("#Memories" + this.stackPos + i[a] + "Z").val().length && (n += ',"minecraft:' + i[a] + '":{value:{pos:[I;' + $("#Memories" + this.stackPos + i[a] + "X").val() + "," + $("#Memories" + this.stackPos + i[a] + "Y").val() + "," + $("#Memories" + this.stackPos + i[a] + "Z").val() + '],dimension:"minecraft:' + $("#Memories" + this.stackPos + i[a] + "Dim").val() + '"}}'); n.length && (n = ",Brain:{memories:{" + n.substr(1) + "}}"), $("#Gossips" + this.stackPos + "Pane > .gossip").each(function ( e ) { var t = this.id, a = 'Type:"' + $("#" + t + "Type").val() + '"'; $("#" + t + "Value").val().length && (a += ",Value:" + $("#" + t + "Value").val()); let o = getUUIDArray(t + "Target"); o.length && (a += ",Target:" + o), a.length && (s += ",{" + a + "}"); }), s.length && (s = ",Gossips:[" + s.substr(1) + "]"); } var r = ""; $("#Trades" + this.stackPos + "Pane > .trade").each(function (e) { let t = getTradeNBT(this.id); t.length && (r += ",{" + t.substr(1) + "}"); }), $("#NoTrades" + e).is(":checked") ? (r = ",Offers:{}") : r.length && (r = ",Offers:{Recipes:[" + r.substr(1) + "]}"); var l = ""; return ( "wandering_trader" == this.entityType && (l = getTargetCompound(this.stackPos, "WanderTarget")), super.getMobNBT() + l + getVillagerData(e) + r + n + s + t ); } generateForm() { Object.assign(this.mobNBT, this.myNBT), super.generateForm(); } } function getVillagerData(e) { let t = ""; return ( "unset" != $("#level" + e).val() && (t += ",level:" + $("#level" + e).val()), $("#profession" + e).length && "unset" != $("#profession" + e).val() && (t += ',profession:"minecraft:' + $("#profession" + e).val() + '"'), $("#type" + e).length && "unset" != $("#type" + e).val() && (t += ',type:"minecraft:' + $("#type" + e).val() + '"'), t.length > 0 ? ",VillagerData:{" + t.substr(1) + "}" : t ); } function loadVillagerData(e, t) { void 0 != e.type && $("#type" + t).val(extractMinecraftID(e.type.val)), void 0 != e.profession && $("#profession" + t).val(extractMinecraftID(e.profession.val)), void 0 != e.level && $("#level" + t).val(e.level.val); } class small_fireball extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { directionX: { type: "text", format: "special", tip: "projectile.direction", align: "R", }, directionY: { type: "text", format: "special", tip: "projectile.direction", align: "R", }, directionZ: { type: "text", format: "special", tip: "projectile.direction", align: "R", }, powerX: { type: "text", format: "special", tip: "projectile.power", align: "R", }, powerY: { type: "text", format: "special", tip: "projectile.power", align: "R", }, powerZ: { type: "text", format: "special", tip: "projectile.power", align: "R", }, life: { type: "ticks", tip: "projectile.life", align: "R" }, }), ("small_fireball" != t && "fireball" != t) || Object.assign(this.myNBT, { Item: { type: "itemselect", format: "special", hide: !1, tip: "projectile", align: "R", }, }), delete this.entityNBT.MotionX, delete this.entityNBT.MotionY, delete this.entityNBT.MotionZ; } getEntitySpecificCommand(e) { var t = getItemNBT("Item" + e), a = "{}" != t ? ",Item:" + t : ""; return this.getEntityNBT() + a; } getEntityNBT() { var e = ""; for (var t in this.entityNBT) e += getNBTforKey(t, this.entityNBT[t], this.stackPos); return ( (e += getMotion(this.stackPos, "direction")), (e += getMotion(this.stackPos, "power")), (e += getTargetingTags(this.stackPos)), (e += getPassengersNBT(this.stackPos)), (e += getCustomNameAndColor("#CustomName", this.stackPos)) ); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class fireball extends small_fireball { constructor(e, t) { super(e, t), (this.fbNBT = { ExplosionPower: { type: "text", format: "int", align: "R" }, }); } generateForm() { Object.assign(this.entityNBT, this.fbNBT), super.generateForm(); } } class ThrownThings extends SimpleEntity { constructor(e, t, a) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "projectile.Owner", }, }), void 0 != a && Object.assign(this.myNBT, a); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } getEntitySpecificCommand(e) { var t = getItemNBT("Item" + e), a = "{}" != t ? ",Item:" + t : ""; return super.getEntityNBT() + a; } } class potion extends ThrownThings { constructor(e, t) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "projectile.Owner", }, Potion: { type: "makeSelectWithIndexAndValues", values: potions, format: "special", tip: t, align: "R", }, Type: { type: "choice", values: [ ["splash_potion", "Splash"], ["lingering_potion", "Lingering"], ], format: "special", tip: t, align: "R", }, CustomPotionEffects: { type: "statusEffects", format: "special", tip: t, align: "R", }, CustomPotionColor: { type: "colorChooser", format: "special", tip: t, align: "R", }, }); } getEntitySpecificCommand(e) { var t = getPotion("Potion", "Potion" + this.stackPos) + getColorInteger( "CustomPotionColor" + this.stackPos, "CustomPotionColor" ) + getStatusEffectsNBT( "CustomPotionEffects", "CustomPotionEffects" + this.stackPos ); return ( t.length && (t = ',Item:{id:"minecraft:' + $("#Type" + this.stackPos).val() + '",Count:1b,tag:{' + t.substr(1) + "}}"), this.getEntityNBT() + t ); } loadPotionNBT(e) { if ( (void 0 != e.id && $("#Type" + this.stackPos).val(extractMinecraftID(e.id.val)), void 0 != e.tag && void 0 != e.tag) ) { var t = e.tag.val; void 0 != t.Potion && $("#Potion" + this.stackPos).val( extractMinecraftID(t.Potion.val) ), void 0 != t.CustomPotionColor && loadColorIntNBT( "CustomPotionColor" + this.stackPos, t.CustomPotionColor.val ), void 0 != t.CustomPotionEffects && loadCustomEffectsNBT( "CustomPotionEffects" + this.stackPos, t.CustomPotionEffects.val ); } } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class arrow extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { pickup: { type: "choice", values: [ [-1, "unset"], ["0", "can't be picked up by players"], [ "1", "can be picked up by players in survival or creative", ], ["2", "can only be picked up by players in creative"], ], format: "b", tip: "arrow", align: "R", }, player: { type: "choice", values: unsetTrueFalse, format: "b", tip: "arrow", align: "R", }, Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "projectile.Owner", }, life: { type: "ticks", tip: "arrow", align: "R" }, damage: { type: "text", format: "d", tip: "arrow", align: "R" }, shake: { type: "choice", values: unsetTrueFalse, format: "b", tip: "arrow", align: "R", }, inGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: "arrow", align: "R", }, crit: { type: "choice", values: unsetTrueFalse, format: "b", tip: "arrow", align: "R", }, ShotFromCrossbow: { type: "choice", values: unsetTrueFalse, format: "b", tip: "arrow", align: "R", }, PierceLevel: { type: "text", format: "b", tip: "arrow", align: "R", }, SoundEvent: { type: "makeSelect", values: ["unset"].concat(soundList), format: "special", tip: "arrow", align: "R", }, }), "arrow" == t ? Object.assign(this.myNBT, { Color: { type: "colorChooser", format: "long", tip: "arrow", align: "R", }, Potion: { type: "makeSelectWithIndexAndValues", values: potions, format: "string", tip: "arrow", align: "R", }, CustomPotionEffects: { type: "statusEffects", format: "special", tip: "arrow", align: "R", }, }) : "spectral_arrow" == t && Object.assign(this.myNBT, { Duration: { type: "ticks", tip: "spectral_arrow", align: "R", }, }); } getEntitySpecificCommand(e) { let t = ""; "arrow" == this.entityType && (t += getStatusEffectsNBT( "CustomPotionEffects", "CustomPotionEffects" + this.stackPos ) + getPotion("Potion", "Potion" + this.stackPos)); let a = $("#SoundEvent" + this.stackPos).val(); return ( (a = "unset" == a ? "" : ',SoundEvent:"' + a + '"'), this.getEntityNBT() + a + t ); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class trident extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { pickup: { type: "choice", values: [ [-1, "unset"], ["0", "can't be picked up by players"], [ "1", "can be picked up by players in survival or creative", ], ["2", "can only be picked up by players in creative"], ], format: "b", tip: t, align: "R", }, Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "projectile.Owner", }, player: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, life: { type: "ticks", tip: t, align: "R" }, damage: { type: "text", format: "d", tip: t, align: "R" }, shake: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, inGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, crit: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, align: "R", }, Trident: { type: "itemselect", format: "special", hide: !1, tip: "item", align: "R", }, }); } getEntitySpecificCommand(e) { var t = getItemNBT("Trident" + e); return "{}" != t ? this.getEntityNBT() + ",Trident:" + t : this.getEntityNBT(); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class firework_rocket extends SimpleEntity { constructor(e, t) { super(e, t), (this.myNBT = { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "projectile.Owner", }, Life: { type: "ticks", tip: t, align: "R" }, LifeTime: { type: "ticks", tip: t, align: "R" }, Explosion: { type: "fwExplosion", format: "special", tip: t, align: "R", }, }); } getEntitySpecificCommand(e) { var t = ""; return ( $("#Explosion" + this.stackPos + "Pane > .explosion").each( function (e) { var a = this.id; t += getExplosionNBT(a); } ), t.length ? super.getEntityNBT() + ",FireworksItem:{id:firework_rocket,Count:1,tag:{Fireworks:{Explosions:[" + t.substr(1) + "]}}}" : super.getEntityNBT() ); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class Vehicle extends Entity { constructor(e, t, a) { super(e, t), (this.entityNBT = { MotionX: { type: "text", format: "special", tip: "entity.Motion", }, MotionY: { type: "text", format: "special", tip: "entity.Motion", }, MotionZ: { type: "text", format: "special", tip: "entity.Motion", }, Yaw: { type: "text", format: "special", tip: "entity" }, Pitch: { type: "text", format: "special", tip: "entity" }, NoGravity: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Glowing: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Invulnerable: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, UUID: { type: "UUIDArray", format: "intArray", align: "R", tip: "entity", }, CustomName: { type: "customNameJSON", format: "special", tip: "entity", }, CustomNameVisible: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, Team: { type: "text", format: "string", tip: "mob" }, Tags: { type: "text", format: "special", tip: "entity", fwClass: "bigTF", }, }), void 0 != a && Object.assign(this.entityNBT, a); } getEntitySpecificCommand(e) { return this.getEntityNBT(); } generateForm() { super.generateForm(); } } class minecart extends Vehicle { constructor(e, t, a) { super(e, t), (this.minecartNBT = { CustomDisplayTile: { type: "choice", values: unsetTrueFalse, format: "b", tip: "minecart", align: "R", }, DisplayOffset: { type: "text", format: "short", tip: "minecart", align: "R", }, }), void 0 != a && Object.assign(this.minecartNBT, a), Object.assign(this.entityNBT, this.minecartNBT); } loadDisplayStateMinecart(e) { void 0 != e.Name && $("#DisplayTile" + this.stackPos).val( extractMinecraftID(e.Name.val) ); } getEntitySpecificCommand(e) { var t = ""; if (-1 != $("#block" + e).val()) { if ( ((t = ',DisplayState:{Name:"minecraft:' + $("#block" + e).val() + '"'), $("#block" + e).val() in blockStates) ) { var a = blockStates[$("#block" + e).val()], o = ""; for (var n in a) "unset" != $("#" + n + "BS" + e).val() && (o += "," + n + ':"' + $("#" + n + "BS" + e).val() + '"'); 0 != o.length && (t += ",Properties:{" + o.substr(1) + "}"); } t += "}"; } return super.getEntitySpecificCommand() + t; } generateForm() { var e = "
DisplayState"; e += ""), $("#entityPane" + this.stackPos + "R").append(e), super.generateForm(); } } class chest_minecart extends minecart { constructor(e, t, a) { super(e, t), (this.slots = a), (this.myNBT = { LootTable: { type: "text", format: "string", tip: t, align: "R", }, }); for (var o = 0; o < this.slots; o++) this.myNBT[o + "Slot"] = { type: "itemselect", format: "special", hide: !0, label: "Slot " + o, align: "R", }; } getEntitySpecificCommand(e) { for (var t = "", a = 0; a < this.slots; a++) { var o = getItemNBT(a + "Slot" + e); "{}" != o && (t += ",{Slot:" + a + "b," + o.substr(1)); } return ( t.length && (t = ",Items:[" + t.substr(1) + "]"), super.getEntitySpecificCommand(e) + t ); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } class hopper_minecart extends chest_minecart { constructor(e, t, a) { super(e, t, a), (this.hopperNBT = { Enabled: { type: "choice", values: unsetTrueFalse, format: "b", tip: t, }, TransferCooldown: { type: "text", format: "int", tip: t }, }); } generateForm() { Object.assign(this.entityNBT, this.hopperNBT), super.generateForm(); } } class spawner_minecart extends minecart { constructor(e, t) { for (var a in (super(e, t, 0), initMobSpawnerNBT(), (this.myNBT = mobSpawnerNBT), this.myNBT)) this.myNBT[a].align = "R"; } getEntitySpecificCommand(e) { return ( super.getEntitySpecificCommand(e) + getSpawnPotentailsNBT(this.stackPos) ); } generateForm() { Object.assign(this.entityNBT, this.myNBT), super.generateForm(); } } var items = [ ["acacia_wood", "Acacia Wood"], ["acacia_door", "Acacia Door"], ["acacia_fence", "Acacia Fence"], ["acacia_fence_gate", "Acacia Fence Gate"], ["acacia_leaves", "Acacia Leaves"], ["acacia_log", "Acacia Log"], ["acacia_planks", "Acacia Planks"], ["acacia_sapling", "Acacia Sapling"], ["acacia_slab", "Acacia Slab"], ["acacia_stairs", "Wooden Stairs (Acacia)"], ["activator_rail", "Activator Rail"], ["allium", "Allium"], ["andesite", "Andesite"], ["anvil", "Anvil"], ["apple", "Apple"], ["armor_stand", "Armor Stand"], ["arrow", "Arrow"], ["azure_bluet", "Azure Bluet"], ["baked_potato", "Baked Potato"], ["barrier", "Barrier"], ["bat_spawn_egg", "Spawn Bat"], ["beacon", "Beacon Block"], ["bedrock", "Bedrock"], ["beef", "Raw Beef"], ["beetroot", "Beetroot"], ["beetroot_seeds", "Beetroot Seeds"], ["beetroot_soup", "Beetroot Soup"], ["birch_wood", "Birch Wood"], ["birch_door", "Birch Door"], ["birch_fence", "Birch Fence"], ["birch_fence_gate", "Birch Fence Gate"], ["birch_leaves", "Birch Leaves"], ["birch_log", "Birch Log"], ["birch_planks", "Birch Planks"], ["birch_sapling", "Birch Sapling"], ["birch_slab", "Birch Slab"], ["birch_stairs", "Birch Wood Stairs"], ["black_banner", "Black Banner"], ["black_bed", "Black Bed"], ["black_carpet", "Black Carpet"], ["black_concrete", "Black Concrete"], ["black_concrete_powder", "Black Concrete Powder"], ["black_glazed_terracotta", "Black Glazed Terracotta"], ["black_shulker_box", "Black Shulker Box"], ["black_stained_glass", "Black Stained Glass"], ["black_stained_glass_pane", "Black Stained Glass Pane"], ["black_terracotta", "Black Terracotta"], ["black_wool", "Black Wool"], ["blaze_powder", "Blaze Powder"], ["blaze_rod", "Blaze Rod"], ["blaze_spawn_egg", "Spawn Blaze"], ["blue_banner", "Blue Banner"], ["blue_bed", "Blue Bed"], ["blue_carpet", "Blue Carpet"], ["blue_concrete", "Blue Concrete"], ["blue_concrete_powder", "Blue Concrete Powder"], ["blue_glazed_terracotta", "Blue Glazed Terracotta"], ["blue_orchid", "Blue Orchid"], ["blue_shulker_box", "Blue Shulker Box"], ["blue_stained_glass", "Blue Stained Glass"], ["blue_stained_glass_pane", "Blue Stained Glass Pane"], ["blue_terracotta", "Blue Terracotta"], ["blue_wool", "Blue Wool"], ["bone", "Bone"], ["bone_block", "Bone Block"], ["bone_meal", "Bone Meal"], ["book", "Book"], ["bookshelf", "Bookshelf"], ["bow", "Bow"], ["bowl", "Bowl"], ["bread", "Bread"], ["brewing_stand", "Brewing Stand"], ["brick", "Brick"], ["bricks", "Bricks"], ["brick_slab", "Bricks Slab"], ["brick_stairs", "Brick Stairs"], ["brown_banner", "Brown Banner"], ["brown_bed", "Brown Bed"], ["brown_carpet", "Brown Carpet"], ["brown_concrete", "Brown Concrete"], ["brown_concrete_powder", "Brown Concrete Powder"], ["brown_glazed_terracotta", "Brown Glazed Terracotta"], ["brown_mushroom", "Brown Mushroom"], ["brown_mushroom_block", "Brown Mushroom Block"], ["brown_shulker_box", "Brown Shulker Box"], ["brown_stained_glass", "Brown Stained Glass"], ["brown_stained_glass_pane", "Brown Stained Glass Pane"], ["brown_terracotta", "Brown Terracotta"], ["brown_wool", "Brown Wool"], ["bucket", "Bucket"], ["cactus", "Cactus"], ["cake", "Cake"], ["carrot", "Carrot"], ["carrot_on_a_stick", "Carrot on a Stick"], ["carved_pumpkin", "Carved Pumpkin"], ["cauldron", "Cauldron"], ["cave_spider_spawn_egg", "Spawn Cave Spider"], ["chain_command_block", "Chain Command Block"], ["chainmail_boots", "Chainmail Boots"], ["chainmail_chestplate", "Chainmail Chestplate"], ["chainmail_helmet", "Chainmail Helmet"], ["chainmail_leggings", "Chainmail Leggings"], ["charcoal", "Charcoal"], ["chest", "Chest"], ["chest_minecart", "Minecart with Chest"], ["chicken", "Raw Chicken"], ["chicken_spawn_egg", "Spawn Chicken"], ["chipped_anvil", "Chipped Anvil"], ["chiseled_quartz_block", "Chiseled Quartz Block"], ["chiseled_red_sandstone", "Chiseled Red Sandstone"], ["chiseled_sandstone", "Chiseled Sandstone"], ["chiseled_stone_bricks", "Chiseled Stone Bricks"], ["chorus_fruit", "Chorus Fruit"], ["popped_chorus_fruit", "Popped Chorus Fruit"], ["chorus_flower", "Chorus Flower"], ["chorus_plant", "Chorus Plant"], ["clay", "Clay"], ["clay_ball", "Clay Ball"], ["clock", "Clock"], ["tropical_fish", "Tropical Fish"], ["coal", "Coal"], ["coal_block", "Block of Coal"], ["coal_ore", "Coal Ore"], ["coarse_dirt", "Coarse Dirt"], ["cobblestone", "Cobblestone"], ["cobblestone_slab", "Cobblestone Slab"], ["cobblestone_stairs", "Cobblestone Stairs"], ["cobweb", "Cobweb"], ["cocoa_beans", "Cocoa Beans"], ["cod", "Raw Cod"], ["command_block", "Command Block"], ["command_block_minecart", "Minecart with Command Block"], ["comparator", "Redstone Comparator"], ["compass", "Compass"], ["cooked_beef", "Steak"], ["cooked_chicken", "Cooked Chicken"], ["cooked_cod", "Cooked Cod"], ["cooked_mutton", "Cooked Mutton"], ["cooked_porkchop", "Cooked Porkchop"], ["cooked_rabbit", "Cooked Rabbit"], ["cooked_salmon", "Cooked Salmon"], ["cookie", "Cookie"], ["cow_spawn_egg", "Spawn Cow"], ["cracked_stone_bricks", "Cracked Stone Bricks"], ["crafting_table", "Crafting Table"], ["creeper_head", "Creeper Head"], ["creeper_spawn_egg", "Spawn Creeper"], ["cut_red_sandstone", "Cut Red Sandstone"], ["cut_sandstone", "Cut Sandstone"], ["cyan_banner", "Cyan Banner"], ["cyan_bed", "Cyan Bed"], ["cyan_carpet", "Cyan Carpet"], ["cyan_concrete", "Cyan Concrete"], ["cyan_concrete_powder", "Cyan Concrete Powder"], ["cyan_glazed_terracotta", "Cyan Glazed Terracotta"], ["cyan_shulker_box", "Cyan Shulker Box"], ["cyan_stained_glass", "Cyan Stained Glass"], ["cyan_stained_glass_pane", "Cyan Stained Glass Pane"], ["cyan_terracotta", "Cyan Terracotta"], ["cyan_wool", "Cyan Wool"], ["damaged_anvil", "Damaged Anvil"], ["dandelion", "Dandelion"], ["dark_oak_wood", "Dark Oak Wood"], ["dark_oak_door", "Dark Oak Door"], ["dark_oak_fence", "Dark Oak Fence"], ["dark_oak_fence_gate", "Dark Oak Fence Gate"], ["dark_oak_leaves", "Dark Oak Leaves"], ["dark_oak_log", "Dark Oak Log"], ["dark_oak_planks", "Dark Oak Planks"], ["dark_oak_sapling", "Dark Oak Sapling"], ["dark_oak_slab", "Dark Oak Slab"], ["dark_oak_stairs", "Wooden Stairs (Dark Oak)"], ["dark_prismarine", "Dark Prismarine"], ["daylight_detector", "Daylight Detector"], ["dead_bush", "Dead Bush"], ["debug_stick", "Debug Stick"], ["detector_rail", "Detector Rail"], ["diamond", "Diamond"], ["diamond_axe", "Diamond Axe"], ["diamond_block", "Diamond Block"], ["diamond_boots", "Diamond Boots"], ["diamond_chestplate", "Diamond Chestplate"], ["diamond_helmet", "Diamond Helmet"], ["diamond_hoe", "Diamond Hoe"], ["diamond_horse_armor", "Diamond Horse Armor"], ["diamond_leggings", "Diamond Leggings"], ["diamond_ore", "Diamond Ore"], ["diamond_pickaxe", "Diamond Pickaxe"], ["diamond_shovel", "Diamond Shovel"], ["diamond_sword", "Diamond Sword"], ["diorite", "Diorite"], ["dirt", "Dirt"], ["dispenser", "Dispenser"], ["donkey_spawn_egg", "Spawn Donkey"], ["dragon_breath", "Dragon's Breath"], ["dragon_egg", "Dragon Egg"], ["dragon_head", "Dragon Head"], ["dropper", "Dropper"], ["dried_kelp", "Dried Kelp"], ["dried_kelp_block", "Dried Kelp Block"], ["egg", "Egg"], ["elder_guardian_spawn_egg", "Spawn Elder Guardian"], ["elytra", "Elytra"], ["emerald", "Emerald"], ["emerald_block", "Emerald Block"], ["emerald_ore", "Emerald Ore"], ["enchanted_book", "Enchanted Book"], ["enchanted_golden_apple", "Enchanted Golden Apple"], ["enchanting_table", "Enchantment Table"], ["end_crystal", "End Crystal"], ["end_rod", "End Rod"], ["end_stone", "End Stone"], ["end_stone_bricks", "End Stone Bricks"], ["ender_chest", "Ender Chest"], ["ender_eye", "Eye of Ender"], ["ender_pearl", "Ender Pearl"], ["enderman_spawn_egg", "Spawn Enderman"], ["endermite_spawn_egg", "Spawn Endermite"], ["evoker_spawn_egg", "Spawn Evoker"], ["experience_bottle", "Bottle o' Enchanting"], ["farmland", "Farmland"], ["feather", "Feather"], ["fermented_spider_eye", "Fermented Spider Eye"], ["fern", "Fern"], ["filled_map", "Filled Map"], ["fire_charge", "Fire Charge"], ["firework_rocket", "Firework Rocket"], ["firework_star", "Firework Star"], ["fishing_rod", "Fishing Rod"], ["flint", "Flint"], ["flint_and_steel", "Flint and Steel"], ["flower_pot", "Flower Pot"], ["furnace", "Furnace"], ["furnace_minecart", "Minecart with Furnace"], ["ghast_spawn_egg", "Spawn Ghast"], ["ghast_tear", "Ghast Tear"], ["glass", "Glass"], ["glass_bottle", "Glass Bottle"], ["glass_pane", "Glass Pane"], ["glowstone", "Glowstone"], ["glowstone_dust", "Glowstone Dust"], ["gold_block", "Gold Block"], ["gold_ingot", "Gold Ingot"], ["gold_nugget", "Gold Nugget"], ["gold_ore", "Gold Ore"], ["golden_apple", "Golden Apple"], ["golden_axe", "Golden Axe"], ["golden_boots", "Golden Boots"], ["golden_carrot", "Golden Carrot"], ["golden_chestplate", "Golden Chestplate"], ["golden_helmet", "Golden Helmet"], ["golden_hoe", "Golden Hoe"], ["golden_horse_armor", "Golden Horse Armor"], ["golden_leggings", "Golden Leggings"], ["golden_pickaxe", "Golden Pickaxe"], ["golden_shovel", "Golden Shovel"], ["golden_sword", "Golden Sword"], ["granite", "Granite"], ["grass", "Grass"], ["grass_block", "Grass Block"], ["grass_path", "Grass Path"], ["gravel", "Gravel"], ["gray_banner", "Gray Banner"], ["gray_bed", "Gray Bed"], ["gray_carpet", "Gray Carpet"], ["gray_concrete", "Gray Concrete"], ["gray_concrete_powder", "Gray Concrete Powder"], ["gray_glazed_terracotta", "Gray Glazed Terracotta"], ["gray_shulker_box", "Gray Shulker Box"], ["gray_stained_glass", "Gray Stained Glass"], ["gray_stained_glass_pane", "Gray Stained Glass Pane"], ["gray_terracotta", "Gray Terracotta"], ["gray_wool", "Gray Wool"], ["green_banner", "Green Banner"], ["green_bed", "Green Bed"], ["green_carpet", "Green Carpet"], ["green_concrete", "Green Concrete"], ["green_concrete_powder", "Green Concrete Powder"], ["green_glazed_terracotta", "Green Glazed Terracotta"], ["green_shulker_box", "Green Shulker Box"], ["green_stained_glass", "Green Stained Glass"], ["green_stained_glass_pane", "Green Stained Glass Pane"], ["green_terracotta", "Green Terracotta"], ["green_wool", "Green Wool"], ["guardian_spawn_egg", "Spawn Guardian"], ["gunpowder", "Gunpowder"], ["hay_block", "Hay Bale"], ["heavy_weighted_pressure_plate", "Weighted Pressure Plate (heavy)"], ["hopper", "Hopper"], ["hopper_minecart", "Minecart with Hopper"], ["horse_spawn_egg", "Spawn Horse"], ["husk_spawn_egg", "Spawn Husk"], ["ice", "Ice"], ["infested_stone", "Infested Stone"], ["infested_cobblestone", "Infested Cobblestone"], ["infested_stone_bricks", "Infested Stone Bricks"], ["infested_cracked_stone_bricks", "Infested Cracked Stone Bricks"], ["infested_mossy_stone_bricks", "Infested Mossy Stone Bricks"], ["infested_chiseled_stone_bricks", "Infested Chiseled Stone Bricks"], ["ink_sac", "Ink Sac"], ["iron_axe", "Iron Axe"], ["iron_bars", "Iron Bars"], ["iron_block", "Iron Block"], ["iron_boots", "Iron Boots"], ["iron_chestplate", "Iron Chestplate"], ["iron_door", "Iron Door"], ["iron_helmet", "Iron Helmet"], ["iron_hoe", "Iron Hoe"], ["iron_horse_armor", "Iron Horse Armor"], ["iron_ingot", "Iron Ingot"], ["iron_leggings", "Iron Leggings"], ["iron_nugget", "Iron Nugget"], ["iron_ore", "Iron Ore"], ["iron_pickaxe", "Iron Pickaxe"], ["iron_shovel", "Iron Shovel"], ["iron_sword", "Iron Sword"], ["iron_trapdoor", "Iron Trap Door"], ["item_frame", "Item Frame"], ["jack_o_lantern", "Jack o'Lantern"], ["jukebox", "Jukebox"], ["jungle_wood", "Jungle Wood"], ["jungle_door", "Jungle Door"], ["jungle_fence", "Jungle Fence"], ["jungle_fence_gate", "Jungle Fence Gate"], ["jungle_leaves", "Jungle Leaves"], ["jungle_log", "Jungle Log"], ["jungle_planks", "Jungle Planks"], ["jungle_sapling", "Jungle Sapling"], ["jungle_slab", "Jungle Slab"], ["jungle_stairs", "Jungle Wood Stairs"], ["kelp", "Kelp"], ["knowledge_book", "Knowledge Book"], ["ladder", "Ladder"], ["lapis_block", "Lapis Lazuli Block"], ["lapis_lazuli", "Lapis Lazuli"], ["lapis_ore", "Lapis Lazuli Ore"], ["large_fern", "Large Fern"], ["lava_bucket", "Lava Bucket"], ["lead", "Lead"], ["leather", "Leather"], ["leather_boots", "Leather Boots"], ["leather_chestplate", "Leather Tunic"], ["leather_helmet", "Leather Cap"], ["leather_leggings", "Leather Pants"], ["lever", "Lever"], ["light_blue_banner", "Light Blue Banner"], ["light_blue_bed", "Light Blue Bed"], ["light_blue_carpet", "Light Blue Carpet"], ["light_blue_concrete", "Light Blue Concrete"], ["light_blue_concrete_powder", "Light Blue Concrete Powder"], ["light_blue_glazed_terracotta", "Light Blue Glazed Terracotta"], ["light_blue_shulker_box", "Light Blue Shulker Box"], ["light_blue_stained_glass", "Light Blue Stained Glass"], ["light_blue_stained_glass_pane", "Light Blue Stained Glass Pane"], ["light_blue_terracotta", "Light Blue Terracotta"], ["light_blue_wool", "Light Blue Wool"], ["light_gray_banner", "Light Gray Banner"], ["light_gray_bed", "Light Gray Bed"], ["light_gray_carpet", "Light Gray Carpet"], ["light_gray_concrete", "Light Gray Concrete"], ["light_gray_concrete_powder", "Light Gray Concrete Powder"], ["light_gray_glazed_terracotta", "Light Gray Glazed Terracotta"], ["light_gray_shulker_box", "Light Gray Shulker Box"], ["light_gray_stained_glass", "Light Gray Stained Glass"], ["light_gray_stained_glass_pane", "Light Gray Stained Glass Pane"], ["light_gray_terracotta", "Light Gray Terracotta"], ["light_gray_wool", "Light Gray Wool"], ["light_weighted_pressure_plate", "Weighted Pressure Plate (light)"], ["lilac", "Lilac"], ["lily_pad", "Lily Pad"], ["lime_banner", "Lime Banner"], ["lime_bed", "Lime Bed"], ["lime_carpet", "Lime Carpet"], ["lime_concrete", "Lime Concrete"], ["lime_concrete_powder", "Lime Concrete Powder"], ["lime_glazed_terracotta", "Lime Glazed Terracotta"], ["lime_shulker_box", "Lime Shulker Box"], ["lime_stained_glass", "Lime Stained Glass"], ["lime_stained_glass_pane", "Lime Stained Glass Pane"], ["lime_terracotta", "Lime Terracotta"], ["lime_wool", "Lime Wool"], ["lingering_potion", "Lingering Potion"], ["llama_spawn_egg", "Spawn Llama"], ["magenta_banner", "Magenta Banner"], ["magenta_bed", "Magenta Bed"], ["magenta_carpet", "Magenta Carpet"], ["magenta_concrete", "Magenta Concrete"], ["magenta_concrete_powder", "Magenta Concrete Powder"], ["magenta_glazed_terracotta", "Magenta Glazed Terracotta"], ["magenta_shulker_box", "Magenta Shulker Box"], ["magenta_stained_glass", "Magenta Stained Glass"], ["magenta_stained_glass_pane", "Magenta Stained Glass Pane"], ["magenta_terracotta", "Magenta Terracotta"], ["magenta_wool", "Magenta Wool"], ["magma_block", "Magma Block"], ["magma_cream", "Magma Cream"], ["magma_cube_spawn_egg", "Spawn Magma Cube"], ["map", "Map"], ["melon", "Melon"], ["melon_slice", "Melon Slice"], ["melon_seeds", "Melon Seeds"], ["milk_bucket", "Milk Bucket"], ["minecart", "Minecart"], ["spawner", "Spawner"], ["mooshroom_spawn_egg", "Spawn Mooshroom"], ["mossy_cobblestone", "Mossy Cobblestone"], ["mossy_stone_bricks", "Mossy Stone Bricks"], ["mule_spawn_egg", "Spawn Mule"], ["mushroom_stem", "Mushroom Stem"], ["mushroom_stem", "Mushroom Stem"], ["mushroom_stew", "Mushroom Stew"], ["music_disc_11", "Music Disc 11"], ["music_disc_13", "Music Disc 13"], ["music_disc_blocks", "Music Disc Blocks"], ["music_disc_cat", "Music Disc Cat"], ["music_disc_chirp", "Music Disc Chirp"], ["music_disc_far", "Music Disc Far"], ["music_disc_mall", "Music Disc Mall"], ["music_disc_mellohi", "Music Disc Mellohi"], ["music_disc_stal", "Music Disc Stal"], ["music_disc_strad", "Music Disc Strad"], ["music_disc_wait", "Music Disc Wait"], ["music_disc_ward", "Music Disc Ward"], ["mutton", "Raw Mutton"], ["mycelium", "Mycelium"], ["name_tag", "Name Tag"], ["nether_brick", "Nether Brick"], ["nether_brick_fence", "Nether Brick Fence"], ["nether_brick_slab", "Nether Bricks Slab"], ["nether_brick_stairs", "Nether Brick Stairs"], ["nether_quartz_ore", "Nether Quartz Ore"], ["nether_star", "Nether Star"], ["nether_wart", "Nether Wart"], ["nether_wart_block", "Nether Wart Block"], ["nether_bricks", "Nether Bricks"], ["netherrack", "Netherrack"], ["note_block", "Note Block"], ["oak_wood", "Oak Wood"], ["oak_button", "Oak Button"], ["spruce_button", "Spruce Button"], ["birch_button", "Birch Button"], ["jungle_button", "Jungle Button"], ["acacia_button", "Acacia Button"], ["dark_oak_button", "Dark Oak Button"], ["oak_door", "Oak Door"], ["oak_fence", "Oak Fence"], ["oak_fence_gate", "Oak Fence Gate"], ["oak_leaves", "Oak Leaves"], ["oak_log", "Oak Log"], ["oak_planks", "Oak Planks"], ["oak_pressure_plate", "Oak Pressure Plate"], ["spruce_pressure_plate", "Spruce Pressure Plate"], ["birch_pressure_plate", "Birch Pressure Plate"], ["jungle_pressure_plate", "Jungle Pressure Plate"], ["acacia_pressure_plate", "Acacia Pressure Plate"], ["dark_oak_pressure_plate", "Dark Oak Pressure Plate"], ["oak_boat", "Oak Boat"], ["spruce_boat", "Spruce Boat"], ["birch_boat", "Birch Boat"], ["jungle_boat", "Jungle Boat"], ["acacia_boat", "Acacia Boat"], ["dark_oak_boat", "Dark Oak Boat"], ["oak_sapling", "Oak Sapling"], ["oak_slab", "Oak Slab"], ["oak_stairs", "Oak Wood Stairs"], ["observer", "Observer"], ["obsidian", "Obsidian"], ["ocelot_spawn_egg", "Spawn Ocelot"], ["orange_banner", "Orange Banner"], ["orange_bed", "Orange Bed"], ["orange_carpet", "Orange Carpet"], ["orange_concrete", "Orange Concrete"], ["orange_concrete_powder", "Orange Concrete Powder"], ["orange_glazed_terracotta", "Orange Glazed Terracotta"], ["orange_shulker_box", "Orange Shulker Box"], ["orange_stained_glass", "Orange Stained Glass"], ["orange_stained_glass_pane", "Orange Stained Glass Pane"], ["orange_terracotta", "Orange Terracotta"], ["orange_tulip", "Orange Tulip"], ["orange_wool", "Orange Wool"], ["oxeye_daisy", "Oxeye Daisy"], ["packed_ice", "Packed Ice"], ["painting", "Painting"], ["paper", "Paper"], ["parrot_spawn_egg", "Spawn Parrot"], ["peony", "Peony"], ["petrified_oak_slab", "Petrified Oak Slab"], ["phantom_spawn_egg", "Spawn Phantom"], ["pig_spawn_egg", "Spawn Pig"], ["pink_banner", "Pink Banner"], ["pink_bed", "Pink Bed"], ["pink_carpet", "Pink Carpet"], ["pink_concrete", "Pink Concrete"], ["pink_concrete_powder", "Pink Concrete Powder"], ["pink_glazed_terracotta", "Pink Glazed Terracotta"], ["pink_shulker_box", "Pink Shulker Box"], ["pink_stained_glass", "Pink Stained Glass"], ["pink_stained_glass_pane", "Pink Stained Glass Pane"], ["pink_terracotta", "Pink Terracotta"], ["pink_tulip", "Pink Tulip"], ["pink_wool", "Pink Wool"], ["piston", "Piston"], ["player_head", "Player Head"], ["podzol", "Podzol"], ["poisonous_potato", "Poisonous Potato"], ["polar_bear_spawn_egg", "Spawn Polar Bear"], ["polished_andesite", "Polished Andesite"], ["polished_diorite", "Polished Diorite"], ["polished_granite", "Polished Granite"], ["poppy", "Poppy"], ["porkchop", "Raw Porkchop"], ["end_portal_frame", "End Portal Frame"], ["potato", "Potato"], ["potion", "Water Bottle"], ["powered_rail", "Powered Rail"], ["prismarine", "Prismarine"], ["prismarine_bricks", "Prismarine Bricks"], ["prismarine_crystals", "Prismarine Crystals"], ["prismarine_shard", "Prismarine Shard"], ["prismarine_stairs", "Prismarine Stairs"], ["prismarine_brick_stairs", "Prismarine Brick Stairs"], ["dark_prismarine_stairs", "Dark Prismarine Stairs"], ["pufferfish", "Pufferfish"], ["pumpkin", "Pumpkin"], ["pumpkin_pie", "Pumpkin Pie"], ["pumpkin_seeds", "Pumpkin Seeds"], ["purple_banner", "Purple Banner"], ["purple_bed", "Purple Bed"], ["purple_carpet", "Purple Carpet"], ["purple_concrete", "Purple Concrete"], ["purple_concrete_powder", "Purple Concrete Powder"], ["purple_glazed_terracotta", "Purple Glazed Terracotta"], ["purple_shulker_box", "Purple Shulker Box"], ["purple_stained_glass", "Purple Stained Glass"], ["purple_stained_glass_pane", "Purple Stained Glass Pane"], ["purple_terracotta", "Purple Terracotta"], ["purple_wool", "Purple Wool"], ["purpur_block", "Purpur Block"], ["purpur_pillar", "Purpur Pillar"], ["purpur_slab", "Purpur Slab"], ["purpur_stairs", "Purpur Stairs"], ["quartz", "Nether Quartz"], ["quartz_block", "Block of Quartz"], ["quartz_pillar", "Quartz Pillar"], ["quartz_slab", "Quartz Slab"], ["quartz_stairs", "Quartz Stairs"], ["rabbit", "Raw Rabbit"], ["rabbit_foot", "Rabbit's Foot"], ["rabbit_hide", "Rabbit Hide"], ["rabbit_spawn_egg", "Spawn Rabbit"], ["rabbit_stew", "Rabbit Stew"], ["rail", "Rails"], ["red_banner", "Red Banner"], ["red_bed", "Red Bed"], ["red_carpet", "Red Carpet"], ["red_concrete", "Red Concrete"], ["red_concrete_powder", "Red Concrete Powder"], ["red_glazed_terracotta", "Red Glazed Terracotta"], ["red_mushroom", "Red Mushroom"], ["red_mushroom_block", "Red Mushroom Block"], ["red_nether_bricks", "Red Nether Bricks"], ["red_sand", "Red Sand"], ["red_sandstone", "Red Sandstone"], ["red_sandstone_slab", "Red Sandstone Slab"], ["red_sandstone_stairs", "Red Sandstone Stairs"], ["red_shulker_box", "Red Shulker Box"], ["red_stained_glass", "Red Stained Glass"], ["red_stained_glass_pane", "Red Stained Glass Pane"], ["red_terracotta", "Red Terracotta"], ["red_tulip", "Red Tulip"], ["red_wool", "Red Wool"], ["redstone", "Redstone Dust"], ["redstone_block", "Redstone Block"], ["redstone_lamp", "Redstone Lamp"], ["redstone_ore", "Redstone Ore"], ["redstone_torch", "Redstone Torch"], ["repeater", "Redstone Repeater"], ["repeating_command_block", "Repeating Command Block"], ["rose_bush", "Rose Bush"], ["rotten_flesh", "Rotten Flesh"], ["saddle", "Saddle"], ["salmon", "Raw Salmon"], ["sand", "Sand"], ["sandstone", "Sandstone"], ["sandstone_slab", "Sandstone Slab"], ["sandstone_stairs", "Sandstone Stairs"], ["seagrass", "Seagrass"], ["sea_lantern", "Sea Lantern"], ["scute", "Scute"], ["shears", "Shears"], ["sheep_spawn_egg", "Spawn Sheep"], ["shield", "Shield"], ["shulker_shell", "Shulker Shell"], ["shulker_spawn_egg", "Spawn Shulker"], ["silverfish_spawn_egg", "Spawn Silverfish"], ["skeleton_horse_spawn_egg", "Spawn Skeleton Horse"], ["skeleton_skull", "Skeleton Skull"], ["skeleton_spawn_egg", "Spawn Skeleton"], ["slime_ball", "Slimeball"], ["slime_block", "Slime Block"], ["slime_spawn_egg", "Spawn Slime"], ["smooth_quartz", "Smooth Quartz"], ["smooth_red_sandstone", "Smooth Red Sandstone"], ["smooth_sandstone", "Smooth Sandstone"], ["smooth_stone", "Smooth Stone"], ["snow", "Snow"], ["snow_block", "Snow Block"], ["snowball", "Snowball"], ["soul_sand", "Soul Sand"], ["glistering_melon_slice", "Glistering Melon Slice"], ["spectral_arrow", "Spectral Arrow"], ["spider_eye", "Spider Eye"], ["spider_spawn_egg", "Spawn Spider"], ["splash_potion", "Splash Potion"], ["sponge", "Sponge"], ["spruce_wood", "Spruce Wood"], ["spruce_door", "Spruce Door"], ["spruce_fence", "Spruce Fence"], ["spruce_fence_gate", "Spruce Fence Gate"], ["spruce_leaves", "Spruce Leaves"], ["spruce_log", "Spruce Log"], ["spruce_planks", "Spruce Planks"], ["spruce_sapling", "Spruce Sapling"], ["spruce_slab", "Spruce Slab"], ["spruce_stairs", "Spruce Wood Stairs"], ["squid_spawn_egg", "Spawn Squid"], ["stick", "Stick"], ["sticky_piston", "Sticky Piston"], ["stone", "Stone"], ["stone_axe", "Stone Axe"], ["stone_brick_slab", "Stone Bricks Slab"], ["stone_brick_stairs", "Stone Brick Stairs"], ["stone_bricks", "Stone Bricks"], ["stone_button", "Stone Button"], ["stone_hoe", "Stone Hoe"], ["stone_pickaxe", "Stone Pickaxe"], ["stone_pressure_plate", "Stone Pressure Plate"], ["stone_shovel", "Stone Shovel"], ["stone_sword", "Stone Sword"], ["stray_spawn_egg", "Spawn Stray"], ["string", "String"], ["sugar", "Sugar"], ["sugar_cane", "Sugar Cane"], ["sunflower", "Sunflower"], ["tall_grass", "Double Tallgrass"], ["terracotta", "Terracotta"], ["tipped_arrow", "Tipped Arrow"], ["tnt", "TNT"], ["tnt_minecart", "Minecart with TNT"], ["torch", "Torch"], ["totem_of_undying", "Totem of Undying"], ["oak_trapdoor", "Oak Trapdoor"], ["spruce_trapdoor", "Spruce Trapdoor"], ["birch_trapdoor", "Birch Trapdoor"], ["jungle_trapdoor", "Jungle Trapdoor"], ["acacia_trapdoor", "Acacia Trapdoor"], ["dark_oak_trapdoor", "Dark Oak Trapdoor"], ["trapped_chest", "Trapped Chest"], ["trident", "Trident"], ["tripwire_hook", "Tripwire Hook"], ["turtle_egg", "Turtle Egg"], ["turtle_helmet", "Turtle Helmet"], ["turtle_spawn_egg", "Spawn Turtle"], ["vex_spawn_egg", "Spawn Vex"], ["villager_spawn_egg", "Spawn Villager"], ["vindicator_spawn_egg", "Spawn Vindicator"], ["vine", "Vines"], ["water_bucket", "Water Bucket"], ["wet_sponge", "Wet Sponge"], ["wheat", "Wheat"], ["wheat_seeds", "Wheat Seeds"], ["white_banner", "White Banner"], ["white_bed", "White Bed"], ["white_carpet", "White Carpet"], ["white_concrete", "White Concrete"], ["white_concrete_powder", "White Concrete Powder"], ["white_glazed_terracotta", "White Glazed Terracotta"], ["shulker_box", "Shulker Box"], ["white_shulker_box", "White Shulker Box"], ["white_stained_glass", "White Stained Glass"], ["white_stained_glass_pane", "White Stained Glass Pane"], ["white_terracotta", "White Terracotta"], ["white_tulip", "White Tulip"], ["white_wool", "White Wool"], ["witch_spawn_egg", "Spawn Witch"], ["wither_skeleton_skull", "Wither Skeleton Skull"], ["wither_skeleton_spawn_egg", "Spawn Wither Skeleton"], ["wolf_spawn_egg", "Spawn Wolf"], ["wooden_axe", "Wooden Axe"], ["wooden_hoe", "Wooden Hoe"], ["wooden_pickaxe", "Wooden Pickaxe"], ["wooden_shovel", "Wooden Shovel"], ["wooden_sword", "Wooden Sword"], ["writable_book", "Book and Quill"], ["written_book", "Written Book"], ["yellow_banner", "Yellow Banner"], ["yellow_bed", "Yellow Bed"], ["yellow_carpet", "Yellow Carpet"], ["yellow_concrete", "Yellow Concrete"], ["yellow_concrete_powder", "Yellow Concrete Powder"], ["yellow_glazed_terracotta", "Yellow Glazed Terracotta"], ["yellow_shulker_box", "Yellow Shulker Box"], ["yellow_stained_glass", "Yellow Stained Glass"], ["yellow_stained_glass_pane", "Yellow Stained Glass Pane"], ["yellow_terracotta", "Yellow Terracotta"], ["yellow_wool", "Yellow Wool"], ["zombie_head", "Zombie Head"], ["zombie_horse_spawn_egg", "Spawn Zombie Horse"], ["zombified_piglin_spawn_egg", "Spawn Zombiefied Piglin"], ["zombie_spawn_egg", "Spawn Zombie"], ["zombie_villager_spawn_egg", "Spawn Zombie Villager"], ["dead_tube_coral_block", "Dead Tube Coral Block"], ["dead_brain_coral_block", "Dead Brain Coral Block"], ["dead_bubble_coral_block", "Dead Bubble Coral Block"], ["dead_fire_coral_block", "Dead Fire Coral Block"], ["dead_horn_coral_block", "Dead Horn Coral Block"], ["dead_tube_coral_fan", "Dead Tube Coral Fan"], ["dead_brain_coral_fan", "Dead Brain Coral Fan"], ["dead_bubble_coral_fan", "Dead Bubble Coral Fan"], ["dead_fire_coral_fan", "Dead Fire Coral Fan"], ["dead_horn_coral_fan", "Dead Horn Coral Fan"], ["dead_tube_coral", "Dead Tube Coral"], ["dead_brain_coral", "Dead Brain Coral"], ["dead_bubble_coral", "Dead Bubble Coral"], ["dead_fire_coral", "Dead Fire Coral"], ["dead_horn_coral", "Dead Horn Coral"], ["tube_coral_block", "Tube Coral Block(Blue)"], ["brain_coral_block", "Brain Coral Block (Pink)"], ["bubble_coral_block", "Bubble Coral Block (Purple)"], ["fire_coral_block", "Fire Coral Block (Red)"], ["horn_coral_block", "Horn Coral Block (Yellow)"], ["tube_coral", "Tube Coral Plant (Blue)"], ["brain_coral", "Brain Coral Plant (Pink)"], ["bubble_coral", "Bubble Coral Plant (Purple)"], ["fire_coral", "Fire Coral Plant (Red)"], ["horn_coral", "Horn Coral Plant (Yellow)"], ["tube_coral_fan", "Tube Coral Fan (Blue)"], ["brain_coral_fan", "Brain Coral Fan (Pink)"], ["bubble_coral_fan", "Bubble Coral Fan (Purple)"], ["fire_coral_fan", "Fire Coral Fan (Red)"], ["horn_coral_fan", "Horn Coral Fan (Yellow)"], ["sea_pickle", "Sea Pickle"], ["stripped_oak_log", "Stripped Oak Log"], ["stripped_spruce_log", "Stripped Spruce Log"], ["stripped_birch_log", "Stripped Birch Log"], ["stripped_jungle_log", "Stripped Jungle Log"], ["stripped_acacia_log", "Stripped Acacia Log"], ["stripped_dark_oak_log", "Stripped Dark Oak Log"], ["stripped_oak_wood", "Stripped Oak Wood"], ["stripped_spruce_wood", "Stripped Spruce Wood"], ["stripped_birch_wood", "Stripped Birch Wood"], ["stripped_jungle_wood", "Stripped Jungle Wood"], ["stripped_acacia_wood", "Stripped Acacia Wood"], ["stripped_dark_oak_wood", "Stripped Dark Oak Wood"], ["prismarine_slab", "Prismarine Slab"], ["prismarine_brick_slab", "Prismarine Bricks Slab"], ["dark_prismarine_slab", "Dark Prismarine Slab"], ["cod_spawn_egg", "Spawn Cod"], ["salmon_spawn_egg", "Spawn Salmon"], ["pufferfish_spawn_egg", "Spawn Pufferfish"], ["tropical_fish_spawn_egg", "Spawn Tropical Fish"], ["drowned_spawn_egg", "Spawn Drowned Zombie"], ["cod_bucket", "Cod Bucket"], ["salmon_bucket", "Salmon Bucket"], ["pufferfish_bucket", "Pufferfish Bucket"], ["tropical_fish_bucket", "Tropical Fish Bucket"], ["phantom_membrane", "Phantom Membrane"], ["heart_of_the_sea", "Heart of the Sea"], ["nautilus_shell", "Nautilus Shell"], ["conduit", "Conduit"], ["blue_ice", "Blue Ice"], ["dolphin_spawn_egg", "Spawn Dolphin"], ["bamboo", "Bamboo"], ["crossbow", "Crossbow"], ["smooth_stone_slab", "Smooth Stone Slab"], ["smooth_red_sandstone_slab", "Smooth Red Sandstone Slab"], ["smooth_sandstone_slab", "Smooth Sandstone Slab"], ["smooth_quartz_slab", "Smooth Quartz Slab"], ["oak_sign", "Oak Sign"], ["spruce_sign", "Spruce Sign"], ["birch_sign", "Birch Sign"], ["jungle_sign", "Jungle Sign"], ["acacia_sign", "Acacia Sign"], ["dark_oak_sign", "Dark Oak Sign"], ["cobblestone_wall", "Cobblestone Wall"], ["mossy_cobblestone_wall", "Mossy Cobblestone Wall"], ["brick_wall", "Brick Wall"], ["prismarine_wall", "Prismarine Wall"], ["red_sandstone_wall", "Red Sandstone Wall"], ["mossy_stone_brick_wall", "Mossy Stone Brick Wall"], ["stone_brick_wall", "Stone Brick Wall"], ["nether_brick_wall", "Nether Brick Wall"], ["andesite_wall", "Andesite Wall"], ["diorite_wall", "Diorite Wall"], ["granite_wall", "Granite Wall"], ["end_stone_brick_wall", "End Stone Brick Wall"], ["sandstone_wall", "Sandstone Wall"], ["red_nether_brick_wall", "Red Nether Brick Wall"], ["stone_stairs", "Stone Stairs"], ["granite_stairs", "Granite Stairs"], ["polished_granite_stairs", "Polished Granite Stairs"], ["diorite_stairs", "Diorite Stairs"], ["polished_diorite_stairs", "Polished Diorite Stairs"], ["andesite_stairs", "Andesite Stairs"], ["polished_andesite_stairs", "Polished Andesite Stairs"], ["smooth_red_sandstone_stairs", "Smooth Red Sandstone Stairs"], ["smooth_quartz_stairs", "Smooth Quartz Stairs"], ["mossy_stone_brick_stairs", "Mossy Stone Brick Stairs"], ["end_stone_brick_stairs", "End Stone Brick Stairs"], ["red_nether_brick_stairs", "Red Nether Brick Stairs"], ["smooth_sandstone_stairs", "Smooth Sandstone Stairs"], ["mossy_cobblestone_stairs", "Mossy Cobblestone Stairs"], ["stone_slab", "Stone Slab"], ["granite_slab", "Granite Slab"], ["polished_granite_slab", "Polished Granite Slab"], ["diorite_slab", "Diorite Slab"], ["polished_diorite_slab", "Polished Diorite Slab"], ["andesite_slab", "Andesite Slab"], ["polished_andesite_slab", "Polished Andesite Slab"], ["smooth_red_sandstone_slab", "Smooth Red Sandstone Slab"], ["smooth_quartz_slab", "Smooth Quartz Slab"], ["mossy_stone_brick_slab", "Mossy Stone Brick Slab"], ["end_stone_brick_slab", "End Stone Brick Slab"], ["red_nether_brick_slab", "Red Nether Brick Slab"], ["smooth_sandstone_slab", "Smooth Sandstone Slab"], ["mossy_cobblestone_slab", "Mossy Cobblestone Slab"], ["black_dye", "Black Dye"], ["red_dye", "Red Dye"], ["green_dye", "Green Dye"], ["brown_dye", "Brown Dye"], ["purple_dye", "Purple Dye"], ["cyan_dye", "Cyan Dye"], ["light_gray_dye", "Light Gray Dye"], ["gray_dye", "Gray Dye"], ["pink_dye", "Pink Dye"], ["lime_dye", "Lime Dye"], ["yellow_dye", "Yellow Dye"], ["light_blue_dye", "Light Blue Dye"], ["magenta_dye", "Magenta Dye"], ["orange_dye", "Orange Dye"], ["blue_dye", "Blue Dye"], ["white_dye", "White Dye"], ["cornflower", "Cornflower"], ["lily_of_the_valley", "Lily of the Valley"], ["wither_rose", "Wither Rose"], ["loom", "Loom"], ["globe_banner_pattern", "Globe Banner Pattern"], ["mojang_banner_pattern", "Mojang Banner Pattern"], ["flower_banner_pattern", "Flower Banner Pattern"], ["creeper_banner_pattern", "Creeper Banner Pattern"], ["skull_banner_pattern", "Skull Banner Pattern"], ["ravager_spawn_egg", "Spawn Ravager"], ["pillager_spawn_egg", "Spawn Pillager"], ["panda_spawn_egg", "Spawn Panda"], ["suspicious_stew", "Suspicious Stew"], ["barrel", "Barrel"], ["bell", "Bell"], ["blast_furnace", "Blast Furnace"], ["smoker", "Smoker"], ["fletching_table", "Fletching Table"], ["smithing_table", "Smithing Table"], ["cartography_table", "Cartography Table"], ["stonecutter", "Stonecutter"], ["grindstone", "Grindstone"], ["lectern", "Lectern"], ["cat_spawn_egg", "Spawn Cat"], ["scaffolding", "Scaffolding"], ["lantern", "Lantern"], ["jigsaw", "Jigsaw Block"], ["sweet_berries", "Sweet Berries"], ["campfire", "Campfire"], ["composter", "Composter"], ["wandering_trader_spawn_egg", "Spawn Wandering Trader"], ["trader_llama_spawn_egg", "Spawn Trader Llama"], ["fox_spawn_egg", "Spawn Fox"], ["leather_horse_armor", "Leather Horse Armor"], ["cut_red_sandstone_slab", "Cut Red Sandstone Slab"], ["cut_sandstone_slab", "Cut Sandstone Slab"], ["structure_block", "Structure Block"], ["structure_void", "Structure Void"], ["beehive", "Beehive"], ["bee_nest", "Bee Nest"], ["bee_spawn_egg", "Spawn Bee"], ["honey_bottle", "Honey Bottle"], ["honeycomb", "Honeycomb"], ["honey_block", "Honey Block"], ["honeycomb_block", "Honeycomb Block"], ["netherite_scrap", "Netherite Scrap"], ["netherite_ingot", "Netherite Ingot"], ["hoglin_spawn_egg", "Spawn Hoglin"], ["ancient_debris", "Ancient Debris"], ["netherite_block", "Netherite Block"], ["basalt", "Basalt"], ["nether_sprouts", "Nether Sprouts"], ["warped_wart_block", "Warped Wart Block"], ["weeping_vines", "Weeping Vines"], ["shroomlight", "Shroomlight"], ["soul_soil", "Soul Soil"], ["soul_lantern", "Soul Lantern"], ["soul_torch", "Soul Torch"], ["warped_button", "Warped Button"], ["warped_door", "Warped Door"], ["warped_fence", "Warped Fence"], ["warped_fence_gate", "Warped Fence Gate"], ["warped_fungus", "Warped Fungus"], ["warped_nylium", "Warped Nylium"], ["warped_planks", "Warped Planks"], ["warped_pressure_plate", "Warped Pressure Plate"], ["warped_roots", "Warped Roots"], ["warped_sign", "Warped Sign"], ["warped_slab", "Warped Slab"], ["warped_stairs", "Warped Stairs"], ["warped_stem", "Warped Stem"], ["warped_trapdoor", "Warped Trapdoor"], ["crimson_button", "Crimson Button"], ["crimson_door", "Crimson Door"], ["crimson_fence", "Crimson Fence"], ["crimson_fence_gate", "Crimson Fence Gate"], ["crimson_fungus", "Crimson Fungus"], ["crimson_nylium", "Crimson Nylium"], ["crimson_planks", "Crimson Planks"], ["crimson_pressure_plate", "Crimson Pressure Plate"], ["crimson_roots", "Crimson Roots"], ["crimson_sign", "Crimson Sign"], ["crimson_slab", "Crimson Slab"], ["crimson_stairs", "Crimson Stairs"], ["crimson_stem", "Crimson Stem"], ["crimson_trapdoor", "Crimson Trapdoor"], ["stripped_crimson_stem", "Stripped Crimson Stem"], ["stripped_warped_stem", "Stripped Warped Stem"], ["netherite_axe", "Netherite Axe"], ["netherite_boots", "Netherite Boots"], ["netherite_chestplate", "Netherite Chestplate"], ["netherite_helmet", "Netherite Helmet"], ["netherite_hoe", "Netherite Hoe"], ["netherite_leggings", "Netherite Leggings"], ["netherite_pickaxe", "Netherite Pickaxe"], ["netherite_shovel", "Netherite Shovel"], ["netherite_sword", "Netherite Sword"], ["piglin_spawn_egg", "Spawn Piglin"], ["piglin_brute_spawn_egg", "Spawn Piglin Brute"], ["target", "Target"], ["crying_obsidian", "Crying Obsidian"], ["stripped_warped_hyphae", "Stripped Warped Hyphae"], ["stripped_crimson_hyphae", "Stripped Crimson Hyphae"], ["warped_hyphae", "Warped Hyphae"], ["crimson_hyphae", "Crimson Hyphae"], ["twisting_vines", "Twisting Vines"], ["nether_gold_ore", "Nether Gold Ore"], ["respawn_anchor", "Respawn Anchor"], ["polished_basalt", "Polished Basalt"], ["warped_fungus_on_a_stick", "Warped Fungus on a Stick"], ["lodestone", "Lodestone"], ["strider_spawn_egg", "Spawn Strider"], ["zoglin_spawn_egg", "Spawn Zoglin"], ["blackstone", "Blackstone"], ["blackstone_slab", "Blackstone Slab"], ["blackstone_stairs", "Blackstone Stairs"], ["blackstone_wall", "Blackstone Wall"], ["chiseled_polished_blackstone", "Chiseled Polished Blackstone"], [ "cracked_polished_blackstone_bricks", "Cracked Polished Blackstone Bricks", ], ["gilded_blackstone", "Gilded Blackstone"], ["polished_blackstone", "Polished Blackstone"], ["polished_blackstone_brick_slab", "Polished Blackstone Brick Slab"], [ "polished_blackstone_brick_stairs", "Polished Blackstone Brick Stairs", ], ["polished_blackstone_brick_wall", "Polished Blackstone Brick Wall"], ["polished_blackstone_bricks", "Polished Blackstone Bricks"], ["polished_blackstone_button", "Polished Blackstone Button"], [ "polished_blackstone_pressure_plate", "Polished Blackstone Pressure Plate", ], ["polished_blackstone_slab", "Polished Blackstone Slab"], ["polished_blackstone_stairs", "Polished Blackstone Stairs"], ["polished_blackstone_wall", "Polished Blackstone Wall"], ["chiseled_nether_bricks", "Chiseled Nether Bricks"], ["cracked_nether_bricks", "Cracked Nether Bricks"], ["quartz_bricks", " Quartz Bricks"], ["soul_campfire", "Soul Campfire"], ["piglin_banner_pattern", "Piglin Banner Pattern"], ["music_disc_pigstep", "Music Disc Pigstep"], ["chain", "Chain"], ], dsOperation = new Array("remove", "replace", "place"), disabledSlots = new Array( "Hand", "Boot", "Leg", "Chest", "Head", "Offhand" ), spawnEggs = [ "bat", "blaze", "cat", "cave_spider", "chicken", "cod", "cow", "creeper", "dolphin", "donkey", "drowned", "elder_guardian", "ender_dragon", "enderman", "endermite", "evoker_fangs", "evoker", "fox", "ghast", "giant", "guardian", "horse", "husk", "ravager", "illusioner", "llama", "magma_cube", "mooshroom", "mule", "ocelot", "panda", "parrot", "phantom", "pig", "pillager", "polar_bear", "pufferfish", "rabbit", "salmon", "sheep", "shulker", "silverfish", "skeleton", "skeleton_horse", "slime", "snow_golem", "spider", "squid", "stray", "trader_llama", "tropical_fish", "turtle", "vex", "villager", "iron_golem", "vindicator", "wandering_trader", "witch", "wither", "wither_skeleton", "wolf", "zombie", "zombie_horse", "zombie_pigman", "zombie_villager", ], dyes = [ "Black", "Red", "Green", "Brown", "Blue", "Purple", "Cyan", "Light Gray", "Gray", "Pink", "Lime", "Yellow", "Light Blue", "Magenta", "Orange", "White", ], woolDyes = [ "White", "Orange", "Magenta", "Light Blue", "Yellow", "Lime", "Pink", "Gray", "Light Gray", "Cyan", "Purple", "Blue", "Brown", "Green", "Red", "Black", ], soundList = [ "ambient.cave", "ambient.basalt_deltas.loop", "ambient.basalt_deltas.additions", "ambient.basalt_deltas.mood", "ambient.crimson_forest.loop", "ambient.crimson_forest.additions", "ambient.crimson_forest.mood", "ambient.warped_forest.loop", "ambient.warped_forest.additions", "ambient.warped_forest.mood", "ambient.soul_sand_valley.loop", "ambient.soul_sand_valley.additions", "ambient.soul_sand_valley.mood", "ambient.nether_wastes.loop", "ambient.nether_wastes.additions", "ambient.nether_wastes.mood", "ambient.underwater.enter", "ambient.underwater.exit", "ambient.underwater.loop", "ambient.underwater.loop.additions", "ambient.underwater.loop.additions.rare", "ambient.underwater.loop.additions.ultra_rare", "block.anvil.break", "block.anvil.destroy", "block.anvil.fall", "block.anvil.hit", "block.anvil.land", "block.anvil.place", "block.anvil.step", "event.raid.horn", "block.anvil.use", "block.beacon.activate", "block.beacon.ambient", "block.beacon.deactivate", "block.beacon.power_select", "block.bamboo.break", "block.bamboo.fall", "block.bamboo.hit", "block.bamboo.place", "block.bamboo.step", "block.bamboo_sapling.place", "block.bamboo_sapling.break", "block.bamboo_sapling.hit", "block.barrel.close", "block.barrel.open", "block.beehive.enter", "block.beehive.exit", "block.beehive.drip", "block.beehive.shear", "block.beehive.work", "block.bell.use", "block.bell.resonate", "block.blastfurnace.fire_crackle", "block.brewing_stand.brew", "block.bubble_column.bubble_pop", "block.bubble_column.upwards_ambient", "block.bubble_column.upwards_inside", "block.bubble_column.whirlpool_ambient", "block.bubble_column.whirlpool_inside", "block.campfire.crackle", "block.chest.close", "block.chest.locked", "block.chest.open", "block.chorus_flower.death", "block.chorus_flower.grow", "block.comparator.click", "block.composter.fill", "block.composter.fill_success", "block.composter.empty", "block.composter.ready", "block.conduit.activate", "block.conduit.ambient", "block.conduit.ambient.short", "block.conduit.attack.target", "block.conduit.deactivate", "block.dispenser.dispense", "block.dispenser.fail", "block.dispenser.launch", "block.enchantment_table.use", "block.end_gateway.spawn", "block.end_portal.spawn", "block.end_portal_frame.fill", "block.ender_chest.close", "block.ender_chest.open", "block.fence_gate.close", "block.fence_gate.open", "block.fire.ambient", "block.fire.extinguish", "block.furnace.fire_crackle", "block.glass.break", "block.glass.fall", "block.glass.hit", "block.glass.place", "block.glass.step", "block.grass.break", "block.grass.fall", "block.grass.hit", "block.grass.place", "block.grass.step", "block.grindstone.use", "block.wet_grass.break", "block.wet_grass.fall", "block.wet_grass.hit", "block.wet_grass.place", "block.wet_grass.step", "block.coral_block.break", "block.coral_block.fall", "block.coral_block.hit", "block.coral_block.place", "block.coral_block.step", "block.respawn_anchor.charge", "block.respawn_anchor.deplete", "block.respawn_anchor.set_spawn", "block.respawn_anchor.ambient", "block.gravel.break", "block.gravel.fall", "block.gravel.hit", "block.gravel.place", "block.gravel.step", "block.honey_block.break", "block.honey_block.fall", "block.honey_block.hit", "block.honey_block.place", "block.honey_block.slide", "block.honey_block.step", "block.iron_door.close", "block.iron_door.open", "block.iron_trapdoor.close", "block.iron_trapdoor.open", "block.ladder.break", "block.ladder.fall", "block.ladder.hit", "block.ladder.place", "block.ladder.step", "block.lantern.break", "block.lantern.fall", "block.lantern.hit", "block.lantern.place", "block.lantern.step", "block.lava.ambient", "block.lava.extinguish", "block.lava.pop", "block.lever.click", "block.lily_pad.place", "block.lodestone.break", "block.lodestone.step", "block.lodestone.place", "block.lodestone.hit", "block.lodestone.fall", "block.chain.break", "block.chain.fall", "block.chain.hit", "block.chain.place", "block.chain.step", "block.metal.break", "block.metal.fall", "block.metal.hit", "block.metal.place", "block.metal.step", "block.metal_pressure_plate.click_off", "block.metal_pressure_plate.click_on", "block.note_block.basedrum", "block.note_block.bass", "block.note_block.bell", "block.note_block.chime", "block.note_block.flute", "block.note_block.guitar", "block.note_block.harp", "block.note_block.hat", "block.note_block.snare", "block.note_block.xylophone", "block.note_block.cow_bell", "block.note_block.iron_xylophone", "block.note_block.didgeridoo", "block.note_block.bit", "block.note_block.banjo", "block.note_block.pling", "block.piston.contract", "block.piston.extend", "block.portal.ambient", "block.portal.travel", "block.portal.trigger", "block.pumpkin.carve", "block.redstone_torch.burnout", "block.sand.break", "block.sand.fall", "block.sand.hit", "block.sand.place", "block.sand.step", "block.scaffolding.break", "block.scaffolding.fall", "block.scaffolding.hit", "block.scaffolding.place", "block.scaffolding.step", "block.shulker_box.close", "block.shulker_box.open", "block.slime_block.break", "block.slime_block.fall", "block.slime_block.hit", "block.slime_block.place", "block.slime_block.step", "block.smoker.smoke", "block.smithing_table.use", "block.snow.break", "block.snow.fall", "block.snow.hit", "block.snow.place", "block.snow.step", "block.soul_sand.break", "block.soul_sand.fall", "block.soul_sand.hit", "block.soul_sand.place", "block.soul_sand.step", "block.soul_soil.break", "block.soul_soil.fall", "block.soul_soil.hit", "block.soul_soil.place", "block.soul_soil.step", "block.nylium.break", "block.nylium.fall", "block.nylium.hit", "block.nylium.place", "block.nylium.step", "block.roots.break", "block.roots.fall", "block.roots.hit", "block.roots.place", "block.roots.step", "block.fungus.break", "block.fungus.fall", "block.fungus.hit", "block.fungus.place", "block.fungus.step", "block.stem.break", "block.stem.fall", "block.stem.hit", "block.stem.place", "block.stem.step", "block.vine.step", "block.weeping_vines.break", "block.weeping_vines.fall", "block.weeping_vines.hit", "block.weeping_vines.place", "block.weeping_vines.step", "block.shroomlight.break", "block.shroomlight.fall", "block.shroomlight.hit", "block.shroomlight.place", "block.shroomlight.step", "block.basalt.break", "block.basalt.fall", "block.basalt.hit", "block.basalt.place", "block.basalt.step", "block.bone_block.break", "block.bone_block.fall", "block.bone_block.hit", "block.bone_block.place", "block.bone_block.step", "block.nether_bricks.break", "block.nether_bricks.fall", "block.nether_bricks.hit", "block.nether_bricks.place", "block.nether_bricks.step", "block.netherrack.break", "block.netherrack.fall", "block.netherrack.hit", "block.netherrack.place", "block.netherrack.step", "block.nether_sprouts.break", "block.nether_sprouts.fall", "block.nether_sprouts.hit", "block.nether_sprouts.place", "block.nether_sprouts.step", "block.wart_block.break", "block.wart_block.fall", "block.wart_block.hit", "block.wart_block.place", "block.wart_block.step", "block.nether_ore.break", "block.nether_ore.fall", "block.nether_ore.hit", "block.nether_ore.place", "block.nether_ore.step", "block.nether_gold_ore.break", "block.nether_gold_ore.fall", "block.nether_gold_ore.hit", "block.nether_gold_ore.place", "block.nether_gold_ore.step", "block.gilded_blackstone.break", "block.gilded_blackstone.fall", "block.gilded_blackstone.hit", "block.gilded_blackstone.place", "block.gilded_blackstone.step", "block.stone.break", "block.stone.fall", "block.stone.hit", "block.stone.place", "block.stone.step", "block.stone_button.click_off", "block.stone_button.click_on", "block.stone_pressure_plate.click_off", "block.stone_pressure_plate.click_on", "block.sweet_berry_bush.break", "block.sweet_berry_bush.place", "block.tripwire.attach", "block.tripwire.click_off", "block.tripwire.click_on", "block.tripwire.detach", "block.water.ambient", "block.wood.break", "block.wood.fall", "block.wood.hit", "block.wood.place", "block.wood.step", "block.wooden_button.click_off", "block.wooden_button.click_on", "block.wooden_door.close", "block.wooden_door.open", "block.wooden_pressure_plate.click_off", "block.wooden_pressure_plate.click_on", "block.wooden_trapdoor.close", "block.wooden_trapdoor.open", "block.wool.break", "block.wool.fall", "block.wool.hit", "block.wool.place", "block.wool.step", "enchant.thorns.hit", "particle.soul_escape", "entity.armor_stand.break", "entity.armor_stand.fall", "entity.armor_stand.hit", "entity.armor_stand.place", "entity.arrow.hit", "entity.arrow.hit_player", "entity.arrow.shoot", "entity.bat.ambient", "entity.bat.death", "entity.bat.hurt", "entity.bat.loop", "entity.bat.takeoff", "entity.bee.loop", "entity.bee.loop_aggressive", "entity.bee.death", "entity.bee.hurt", "entity.bee.pollinate", "entity.bee.sting", "entity.blaze.ambient", "entity.blaze.burn", "entity.blaze.death", "entity.blaze.hurt", "entity.blaze.shoot", "entity.boat.paddle_land", "entity.boat.paddle_water", "entity.cat.ambient", "entity.cat.beg_for_food", "entity.cat.death", "entity.cat.eat", "entity.cat.hiss", "entity.cat.hurt", "entity.cat.purr", "entity.cat.purreow", "entity.cat.stray_ambient", "entity.ocelot.ambient", "entity.ocelot.hurt", "entity.ocelot.death", "entity.chicken.ambient", "entity.chicken.death", "entity.chicken.egg", "entity.chicken.hurt", "entity.chicken.step", "entity.cod.ambient", "entity.cod.death", "entity.cod.flop", "entity.cod.hurt", "entity.cow.ambient", "entity.cow.death", "entity.cow.hurt", "entity.cow.milk", "entity.cow.step", "entity.creeper.death", "entity.creeper.hurt", "entity.creeper.primed", "entity.dolphin.ambient", "entity.dolphin.ambient_water", "entity.dolphin.attack", "entity.dolphin.death", "entity.dolphin.eat", "entity.dolphin.hurt", "entity.dolphin.jump", "entity.dolphin.play", "entity.dolphin.splash", "entity.dolphin.swim", "entity.donkey.ambient", "entity.donkey.angry", "entity.donkey.chest", "entity.donkey.death", "entity.donkey.eat", "entity.donkey.hurt", "entity.dragon_fireball.explode", "entity.drowned.ambient", "entity.drowned.ambient_water", "entity.drowned.death", "entity.drowned.death_water", "entity.drowned.hurt", "entity.drowned.hurt_water", "entity.drowned.shoot", "entity.drowned.step", "entity.drowned.swim", "entity.egg.throw", "entity.elder_guardian.ambient", "entity.elder_guardian.ambient_land", "entity.elder_guardian.curse", "entity.elder_guardian.death", "entity.elder_guardian.death_land", "entity.elder_guardian.flop", "entity.elder_guardian.hurt", "entity.elder_guardian.hurt_land", "entity.ender_dragon.ambient", "entity.ender_dragon.death", "entity.ender_dragon.flap", "entity.ender_dragon.growl", "entity.ender_dragon.hurt", "entity.ender_dragon.shoot", "entity.ender_eye.death", "entity.ender_eye.launch", "entity.ender_pearl.throw", "entity.enderman.ambient", "entity.enderman.death", "entity.enderman.hurt", "entity.enderman.scream", "entity.enderman.stare", "entity.enderman.teleport", "entity.endermite.ambient", "entity.endermite.death", "entity.endermite.hurt", "entity.endermite.step", "entity.evoker.ambient", "entity.evoker.cast_spell", "entity.evoker.celebrate", "entity.evoker.death", "entity.evoker.hurt", "entity.evoker.prepare_attack", "entity.evoker.prepare_summon", "entity.evoker.prepare_wololo", "entity.evoker_fangs.attack", "entity.experience_bottle.throw", "entity.experience_orb.pickup", "entity.firework_rocket.blast", "entity.firework_rocket.blast_far", "entity.firework_rocket.large_blast", "entity.firework_rocket.large_blast_far", "entity.firework_rocket.launch", "entity.firework_rocket.shoot", "entity.firework_rocket.twinkle", "entity.firework_rocket.twinkle_far", "entity.fish.swim", "entity.fishing_bobber.retrieve", "entity.fishing_bobber.splash", "entity.fishing_bobber.throw", "entity.fox.ambient", "entity.fox.hurt", "entity.fox.death", "entity.fox.aggro", "entity.fox.sniff", "entity.fox.bite", "entity.fox.eat", "entity.fox.screech", "entity.fox.sleep", "entity.fox.spit", "entity.fox.teleport", "entity.generic.big_fall", "entity.generic.burn", "entity.generic.death", "entity.generic.drink", "entity.generic.eat", "entity.generic.explode", "entity.generic.extinguish_fire", "entity.generic.hurt", "entity.generic.small_fall", "entity.generic.splash", "entity.generic.swim", "entity.ghast.ambient", "entity.ghast.death", "entity.ghast.hurt", "entity.ghast.scream", "entity.ghast.shoot", "entity.ghast.warn", "entity.guardian.ambient", "entity.guardian.ambient_land", "entity.guardian.attack", "entity.guardian.death", "entity.guardian.death_land", "entity.guardian.flop", "entity.guardian.hurt", "entity.guardian.hurt_land", "entity.hoglin.ambient", "entity.hoglin.angry", "entity.hoglin.attack", "entity.hoglin.converted_to_zombified", "entity.hoglin.hurt", "entity.hoglin.death", "entity.hoglin.retreat", "entity.hoglin.step", "entity.zoglin.ambient", "entity.zoglin.angry", "entity.zoglin.attack", "entity.zoglin.hurt", "entity.zoglin.death", "entity.zoglin.step", "entity.horse.ambient", "entity.horse.angry", "entity.horse.armor", "entity.horse.breathe", "entity.horse.death", "entity.horse.eat", "entity.horse.gallop", "entity.horse.hurt", "entity.horse.jump", "entity.horse.land", "entity.horse.saddle", "entity.horse.step", "entity.horse.step_wood", "entity.hostile.big_fall", "entity.hostile.death", "entity.hostile.hurt", "entity.hostile.small_fall", "entity.hostile.splash", "entity.hostile.swim", "entity.husk.ambient", "entity.husk.converted_to_zombie", "entity.husk.death", "entity.husk.hurt", "entity.husk.step", "entity.ravager.ambient", "entity.ravager.attack", "entity.ravager.celebrate", "entity.ravager.death", "entity.ravager.hurt", "entity.ravager.step", "entity.ravager.stunned", "entity.ravager.roar", "entity.illusioner.ambient", "entity.illusioner.cast_spell", "entity.illusioner.death", "entity.illusioner.hurt", "entity.illusioner.mirror_move", "entity.illusioner.prepare_blindness", "entity.illusioner.prepare_mirror", "entity.iron_golem.attack", "entity.iron_golem.death", "entity.iron_golem.hurt", "entity.iron_golem.repair", "entity.iron_golem.damage", "entity.iron_golem.step", "entity.item.break", "entity.item.pickup", "entity.item_frame.add_item", "entity.item_frame.break", "entity.item_frame.place", "entity.item_frame.remove_item", "entity.item_frame.rotate_item", "entity.leash_knot.break", "entity.leash_knot.place", "entity.lightning_bolt.impact", "entity.lightning_bolt.thunder", "entity.lingering_potion.throw", "entity.llama.ambient", "entity.llama.angry", "entity.llama.chest", "entity.llama.death", "entity.llama.eat", "entity.llama.hurt", "entity.llama.spit", "entity.llama.step", "entity.llama.swag", "entity.magma_cube.death", "entity.magma_cube.death_small", "entity.magma_cube.hurt", "entity.magma_cube.hurt_small", "entity.magma_cube.jump", "entity.magma_cube.squish", "entity.magma_cube.squish_small", "entity.minecart.inside", "entity.minecart.riding", "entity.mooshroom.convert", "entity.mooshroom.eat", "entity.mooshroom.milk", "entity.mooshroom.suspicious_milk", "entity.mooshroom.shear", "entity.mule.ambient", "entity.mule.angry", "entity.mule.chest", "entity.mule.death", "entity.mule.eat", "entity.mule.hurt", "entity.painting.break", "entity.painting.place", "entity.panda.pre_sneeze", "entity.panda.sneeze", "entity.panda.ambient", "entity.panda.bite", "entity.panda.cant_breed", "entity.panda.death", "entity.panda.eat", "entity.panda.step", "entity.panda.aggressive_ambient", "entity.panda.worried_ambient", "entity.panda.hurt", "entity.pillager.ambient", "entity.pillager.hurt", "entity.pillager.celebrate", "entity.pillager.death", "entity.parrot.ambient", "entity.parrot.death", "entity.parrot.eat", "entity.parrot.fly", "entity.parrot.hurt", "entity.parrot.imitate.blaze", "entity.parrot.imitate.creeper", "entity.parrot.imitate.drowned", "entity.parrot.imitate.elder_guardian", "entity.parrot.imitate.ender_dragon", "entity.parrot.imitate.endermite", "entity.parrot.imitate.evoker", "entity.parrot.imitate.ghast", "entity.parrot.imitate.guardian", "entity.parrot.imitate.hoglin", "entity.parrot.imitate.husk", "entity.parrot.imitate.illusioner", "entity.parrot.imitate.magma_cube", "entity.parrot.imitate.phantom", "entity.parrot.imitate.piglin", "entity.parrot.imitate.piglin_brute", "entity.parrot.imitate.pillager", "entity.parrot.imitate.ravager", "entity.parrot.imitate.shulker", "entity.parrot.imitate.silverfish", "entity.parrot.imitate.skeleton", "entity.parrot.imitate.slime", "entity.parrot.imitate.spider", "entity.parrot.imitate.stray", "entity.parrot.imitate.vex", "entity.parrot.imitate.vindicator", "entity.parrot.imitate.witch", "entity.parrot.imitate.wither", "entity.parrot.imitate.wither_skeleton", "entity.parrot.imitate.zoglin", "entity.parrot.imitate.zombie", "entity.parrot.imitate.zombie_villager", "entity.parrot.step", "entity.phantom.ambient", "entity.phantom.bite", "entity.phantom.death", "entity.phantom.flap", "entity.phantom.hurt", "entity.phantom.swoop", "entity.pig.ambient", "entity.pig.death", "entity.pig.hurt", "entity.pig.saddle", "entity.pig.step", "entity.piglin.ambient", "entity.piglin.angry", "entity.piglin.celebrate", "entity.piglin.converted_to_zombified", "entity.piglin.hurt", "entity.piglin.death", "entity.piglin.retreat", "entity.piglin.step", "entity.piglin.jealous", "entity.piglin.admiring_item", "entity.piglin_brute.ambient", "entity.piglin_brute.angry", "entity.piglin_brute.death", "entity.piglin_brute.hurt", "entity.piglin_brute.step", "entity.piglin_brute.converted_to_zombified", "entity.player.attack.crit", "entity.player.attack.knockback", "entity.player.attack.nodamage", "entity.player.attack.strong", "entity.player.attack.sweep", "entity.player.attack.weak", "entity.player.big_fall", "entity.player.breath", "entity.player.burp", "entity.player.death", "entity.player.hurt", "entity.player.hurt_drown", "entity.player.hurt_on_fire", "entity.player.hurt_sweet_berry_bush", "entity.player.levelup", "entity.player.small_fall", "entity.player.splash", "entity.player.splash.high_speed", "entity.player.swim", "entity.polar_bear.ambient", "entity.polar_bear.ambient_baby", "entity.polar_bear.death", "entity.polar_bear.hurt", "entity.polar_bear.step", "entity.polar_bear.warning", "entity.puffer_fish.ambient", "entity.puffer_fish.blow_out", "entity.puffer_fish.blow_up", "entity.puffer_fish.death", "entity.puffer_fish.flop", "entity.puffer_fish.hurt", "entity.puffer_fish.sting", "entity.rabbit.ambient", "entity.rabbit.attack", "entity.rabbit.death", "entity.rabbit.hurt", "entity.rabbit.jump", "entity.salmon.ambient", "entity.salmon.death", "entity.salmon.flop", "entity.salmon.hurt", "entity.sheep.ambient", "entity.sheep.death", "entity.sheep.hurt", "entity.sheep.shear", "entity.sheep.step", "entity.shulker.ambient", "entity.shulker.close", "entity.shulker.death", "entity.shulker.hurt", "entity.shulker.hurt_closed", "entity.shulker.open", "entity.shulker.shoot", "entity.shulker.teleport", "entity.shulker_bullet.hit", "entity.shulker_bullet.hurt", "entity.silverfish.ambient", "entity.silverfish.death", "entity.silverfish.hurt", "entity.silverfish.step", "entity.skeleton.ambient", "entity.skeleton.death", "entity.skeleton.hurt", "entity.skeleton.shoot", "entity.skeleton.step", "entity.skeleton_horse.ambient", "entity.skeleton_horse.ambient_water", "entity.skeleton_horse.death", "entity.skeleton_horse.gallop_water", "entity.skeleton_horse.hurt", "entity.skeleton_horse.jump_water", "entity.skeleton_horse.step_water", "entity.skeleton_horse.swim", "entity.slime.attack", "entity.slime.death", "entity.slime.death_small", "entity.slime.hurt", "entity.slime.hurt_small", "entity.slime.jump", "entity.slime.jump_small", "entity.slime.squish", "entity.slime.squish_small", "entity.snow_golem.ambient", "entity.snow_golem.death", "entity.snow_golem.hurt", "entity.snow_golem.shoot", "entity.snow_golem.shear", "entity.snowball.throw", "entity.spider.ambient", "entity.spider.death", "entity.spider.hurt", "entity.spider.step", "entity.splash_potion.break", "entity.splash_potion.throw", "entity.squid.ambient", "entity.squid.death", "entity.squid.hurt", "entity.squid.squirt", "entity.stray.ambient", "entity.stray.death", "entity.stray.hurt", "entity.stray.step", "entity.strider.ambient", "entity.strider.eat", "entity.strider.happy", "entity.strider.hurt", "entity.strider.death", "entity.strider.retreat", "entity.strider.saddle", "entity.strider.step", "entity.strider.step_lava", "entity.tnt.primed", "entity.tropical_fish.ambient", "entity.tropical_fish.death", "entity.tropical_fish.flop", "entity.tropical_fish.hurt", "entity.turtle.ambient_land", "entity.turtle.death", "entity.turtle.death_baby", "entity.turtle.egg_break", "entity.turtle.egg_crack", "entity.turtle.egg_hatch", "entity.turtle.hurt", "entity.turtle.hurt_baby", "entity.turtle.lay_egg", "entity.turtle.shamble", "entity.turtle.shamble_baby", "entity.turtle.swim", "entity.vex.ambient", "entity.vex.charge", "entity.vex.death", "entity.vex.hurt", "entity.villager.ambient", "entity.villager.celebrate", "entity.villager.death", "entity.villager.hurt", "entity.villager.no", "entity.villager.trade", "entity.villager.yes", "entity.villager.work_armorer", "entity.villager.work_butcher", "entity.villager.work_cartographer", "entity.villager.work_cleric", "entity.villager.work_farmer", "entity.villager.work_fisherman", "entity.villager.work_fletcher", "entity.villager.work_leatherworker", "entity.villager.work_librarian", "entity.villager.work_mason", "entity.villager.work_shepherd", "entity.villager.work_toolsmith", "entity.villager.work_weaponsmith", "entity.vindicator.ambient", "entity.vindicator.celebrate", "entity.vindicator.death", "entity.vindicator.hurt", "entity.wandering_trader.ambient", "entity.wandering_trader.death", "entity.wandering_trader.hurt", "entity.wandering_trader.no", "entity.wandering_trader.trade", "entity.wandering_trader.yes", "entity.wandering_trader.drink_milk", "entity.wandering_trader.drink_potion", "entity.wandering_trader.disappeared", "entity.wandering_trader.reappeared", "entity.witch.ambient", "entity.witch.celebrate", "entity.witch.death", "entity.witch.drink", "entity.witch.hurt", "entity.witch.throw", "entity.wither.ambient", "entity.wither.break_block", "entity.wither.death", "entity.wither.hurt", "entity.wither.shoot", "entity.wither.spawn", "entity.wither_skeleton.ambient", "entity.wither_skeleton.death", "entity.wither_skeleton.hurt", "entity.wither_skeleton.step", "entity.wolf.ambient", "entity.wolf.death", "entity.wolf.growl", "entity.wolf.howl", "entity.wolf.hurt", "entity.wolf.pant", "entity.wolf.shake", "entity.wolf.step", "entity.wolf.whine", "entity.zombie.ambient", "entity.zombie.attack_iron_door", "entity.zombie.attack_wooden_door", "entity.zombie.break_wooden_door", "entity.zombie.converted_to_drowned", "entity.zombie.death", "entity.zombie.destroy_egg", "entity.zombie.hurt", "entity.zombie.infect", "entity.zombie.step", "entity.zombie_horse.ambient", "entity.zombie_horse.death", "entity.zombie_horse.hurt", "entity.zombified_piglin.ambient", "entity.zombified_piglin.angry", "entity.zombified_piglin.death", "entity.zombified_piglin.hurt", "entity.zombie_villager.ambient", "entity.zombie_villager.converted", "entity.zombie_villager.cure", "entity.zombie_villager.death", "entity.zombie_villager.hurt", "entity.zombie_villager.step", "item.armor.equip_chain", "item.armor.equip_diamond", "item.armor.equip_elytra", "item.armor.equip_generic", "item.armor.equip_gold", "item.armor.equip_iron", "item.armor.equip_leather", "item.armor.equip_netherite", "item.armor.equip_turtle", "item.axe.strip", "item.book.page_turn", "item.book.put", "item.honey_bottle.drink", "item.bottle.empty", "item.bottle.fill", "item.bottle.fill_dragonbreath", "item.bucket.empty", "item.bucket.empty_fish", "item.bucket.empty_lava", "item.bucket.fill", "item.bucket.fill_fish", "item.bucket.fill_lava", "item.chorus_fruit.teleport", "item.crossbow.quick_charge_1", "item.crossbow.quick_charge_2", "item.crossbow.quick_charge_3", "item.crossbow.loading_start", "item.crossbow.loading_middle", "item.crossbow.loading_end", "item.crossbow.shoot", "item.crossbow.hit", "item.elytra.flying", "item.firecharge.use", "item.flintandsteel.use", "item.hoe.till", "item.lodestone_compass.lock", "item.nether_wart.plant", "item.crop.plant", "block.crop.break", "block.nether_wart.break", "block.netherite_block.break", "block.netherite_block.fall", "block.netherite_block.hit", "block.netherite_block.place", "block.netherite_block.step", "block.ancient_debris.break", "block.ancient_debris.fall", "block.ancient_debris.hit", "block.ancient_debris.place", "block.ancient_debris.step", "item.shield.block", "item.shield.break", "item.shovel.flatten", "item.totem.use", "item.sweet_berries.pick_from_bush", "item.trident.hit", "item.trident.hit_ground", "item.trident.return", "item.trident.riptide_1", "item.trident.riptide_2", "item.trident.riptide_3", "item.trident.throw", "item.trident.thunder", "music.creative", "music.credits", "music.dragon", "music.end", "music.game", "music.menu", "music.nether.basalt_deltas", "music.nether.nether_wastes", "music.nether.soul_sand_valley", "music.nether.crimson_forest", "music.nether.warped_forest", "music.under_water", "music_disc.11", "music_disc.13", "music_disc.blocks", "music_disc.cat", "music_disc.chirp", "music_disc.far", "music_disc.mall", "music_disc.mellohi", "music_disc.pigstep", "music_disc.stal", "music_disc.strad", "music_disc.wait", "music_disc.ward", "ui.button.click", "ui.cartography_table.take_result", "ui.loom.select_pattern", "ui.loom.take_result", "ui.toast.challenge_complete", "ui.toast.in", "ui.toast.out", "ui.stonecutter.select_recipe", "ui.stonecutter.take_result", "weather.rain", "weather.rain.above", ], particles = [ "ambient_entity_effect", "angry_villager", "ash", "barrier", "block", "bubble", "bubble_column_up", "bubble_pop", "campfire_cosy_smoke", "campfire_signal_smoke", "cloud", "composter", "crimson_spore", "crit", "current_down", "damage_indicator", "dolphin", "dragon_breath", "dripping_honey", "dripping_lava", "dripping_obsidian_tear", "dripping_water", "dust", "effect", "elder_guardian", "enchant", "enchanted_hit", "end_rod", "entity_effect", "explosion", "explosion_emitter", "falling_dust", "falling_honey", "falling_lava", "falling_nectar", "falling_obsidian_tear", "falling_water", "firework", "fishing", "flame", "flash", "happy_villager", "heart", "instant_effect", "item", "item_slime", "item_snowball", "landing_honey", "landing_lava", "landing_obsidian_tear", "large_smoke", "lava", "mycelium", "nautilus", "note", "poof", "portal", "rain", "reverse_portal", "smoke", "sneeze", "soul", "soul_fire_flame", "spit", "splash", "squid_ink", "sweep_attack", "totem_of_undying", "underwater", "warped_spore", "white_ash", "witch", ], statusEffects = [ ["-1", "unset"], ["1", "Speed"], ["2", "Slowness"], ["3", "Haste"], ["4", "Mining Fatigue"], ["5", "Strength"], ["6", "Instant Health"], ["7", "Instant Damage"], ["8", "Jump Boost"], ["9", "Nausea"], ["10", "Regeneration"], ["11", "Resistance"], ["12", "Fire Resistance"], ["13", "Water Breathing"], ["14", "Invisibility"], ["15", "Blindness"], ["16", "Night Vision"], ["17", "Hunger"], ["18", "Weakness"], ["19", "Poison"], ["20", "Wither"], ["21", "Health Boost"], ["22", "Absorption"], ["23", "Saturation"], ["24", "Glowing"], ["25", "Levitation"], ["26", "Luck"], ["27", "Bad Luck"], ["28", "Slow Falling"], ["29", "Conduit Power"], ["30", "Dolphins Grace"], ["31", "Bad Omen"], ["32", "Hero of the Village"], ], statuseffects1p13 = { 1: "speed", 2: "slowness", 3: "haste", 4: "mining_fatigue", 5: "strength", 6: "instant_health", 7: "instant_damage", 8: "jump_boost", 9: "nausea", 10: "regeneration", 11: "resistance", 12: "fire_resistance", 13: "water_breathing", 14: "invisibility", 15: "blindness", 16: "night_vision", 17: "hunger", 18: "weakness", 19: "poison", 20: "wither", 21: "health_boost", 22: "absorption", 23: "saturation", 24: "glowing", 25: "levitation", 26: "luck", 27: "unluck", 28: "slow_falling", 29: "conduit_power", 30: "dolphins_grace", 31: "bad_omen", 32: "hero_of_the_village", }, mobAttributes = [ "maxHealth", "followRange", "knockbackResistance", "movementSpeed", "attackDamage", "armor", "armorToughness", "attackKnockback", "jumpStrength", "spawnReinforcements", "flyingSpeed", ], attributeModifiers = [ "maxHealth", "followRange", "knockbackResistance", "movementSpeed", "attackDamage", "armor", "armorToughness", "attackSpeed", "luck", ], mobAttributes116 = [ "max_health", "follow_range", "knockback_resistance", "movement_speed", "attack_damage", "armor", "armor_toughness", "attack_knockback", "jump_strength", "spawn_reinforcements", "flying_speed", ], attributeModifiers116 = [ "max_health", "follow_range", "knockback_resistance", "movement_speed", "attack_damage", "armor", "armor_toughness", "attack_speed", "luck", ], flags = [ "Enchantments", "Modifiers", "Unbreakable", "CanDestroy", "CanPlaceOn", "HideOthers", ], bgPalette = [ "61abaf", "247F45", "7F653E", "FF9999", "7AF7FF", "95FFBB", "FFE9C9", "FFC2B6", "B3FFFF", "48FF8A", "FFC97D", "FF826A", "507C7F", "4A7F5D", "7F7465", "7F615B", "25C1CC", "3ACC6E", "CCA164", "CC6855", ], potions = new Array( ["-1", "unset"], ["empty", "Uncraftable Potion"], ["water", "Water Potion"], ["awkward", "Awkward Potion"], ["mundane", "Mundane Potion"], ["thick", "Thick Potion"], ["swiftness", "Swiftness Potion"], ["strong_swiftness", "Swiftness Strong Potion"], ["long_swiftness", "Swiftness Long Potion"], ["slowness", "Slowness Potion"], ["long_slowness", "Slowness Long Potion"], ["strength", "Strength Potion"], ["strong_strength", "Strength Strong Potion"], ["long_strength", "Strength Long Potion"], ["weakness", "Weakness Potion"], ["long_weakness", "Weakness Long Potion"], ["healing", "Healing Potion"], ["strong_healing", "Healing Strong Potion"], ["harming", "Harming Potion"], ["strong_harming", "Harming Strong Potion"], ["leaping", "Leaping Potion"], ["strong_leaping", "Leaping Strong Potion"], ["long_leaping", "Leaping Long Potion"], ["luck", "Luck Potion"], ["regeneration", "Regeneration Potion"], ["strong_regeneration", "Regeneration Strong Potion"], ["long_regeneration", "Regeneration Long Potion"], ["poison", "Poison Potion"], ["strong_poison", "Poison Strong Potion"], ["long_poison", "Poison Long Potion"], ["fire_resistance", "Fire Resistance Potion"], ["long_fire_resistance", "Fire Resistance Long Potion"], ["water_breathing", "Water Breathing Potion"], ["long_water_breathing", "Water Breathing Long Potion"], ["night_vision", "Night Vision Potion"], ["long_night_vision", "Night Vision Long Potion"], ["invisibility", "Invisibility Potion"], ["long_invisibility", "Invisibility Long Potion"], ["turtle_master", "Turtle Master Potion"], ["strong_turtle_master", "Turtle Master Strong Potion"], ["long_turtle_master", "Turtle Master Long Potion"], ["slow_falling", "Slow Falling Potion"], ["long_slow_falling", "Slow Falling Long Potion"] ), enchantables = []; (enchantables[0] = [ "Protection", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[1] = [ "Fire Protection", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[2] = [ "Feather Falling", [ "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_boots", ], ]), (enchantables[3] = [ "Blast Protection", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[4] = [ "Projectile Protection", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[5] = [ "Respiration", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "netherite_helmet", ], ]), (enchantables[6] = [ "Aqua Affinity", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "netherite_helmet", ], ]), (enchantables[7] = [ "Thorns", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[8] = [ "Depth Strider", [ "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_boots", ], ]), (enchantables[9] = [ "Frost Walker", [ "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_boots", ], ]), (enchantables[10] = [ "Binding Curse", [ "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "elytra", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", ], ]), (enchantables[16] = [ "Sharpness", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "netherite_axe", "netherite_sword", ], ]), (enchantables[17] = [ "Smite", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "netherite_axe", "netherite_sword", ], ]), (enchantables[18] = [ "Bane of Arthropods", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "netherite_axe", "netherite_sword", ], ]), (enchantables[19] = [ "Knockback", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "netherite_sword", ], ]), (enchantables[20] = [ "Fire Aspect", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "netherite_sword", ], ]), (enchantables[21] = [ "Looting", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "netherite_sword", ], ]), (enchantables[22] = [ "Sweeping", [ "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "netherite_sword", ], ]), (enchantables[32] = [ "Efficiency", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "shears", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "netherite_hoe", ], ]), (enchantables[33] = [ "Silk Touch", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "netherite_hoe", ], ]), (enchantables[34] = [ "Unbreaking", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "shears", "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "bow", "fishing_rod", "carrot_on_a_stick", "flint_and_steel", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "elytra", "shield", "trident", "turtle_helmet", "crossbow", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "netherite_hoe", "netherite_sword", "warped_fungus_on_a_stick", ], ]), (enchantables[35] = [ "Fortune", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "netherite_hoe", ], ]), (enchantables[48] = ["Power", ["bow"]]), (enchantables[49] = ["Punch", ["bow"]]), (enchantables[50] = ["Flame", ["bow"]]), (enchantables[51] = ["Infinity", ["bow"]]), (enchantables[61] = ["Luck of the Sea", ["fishing_rod"]]), (enchantables[62] = ["Lure", ["fishing_rod"]]), (enchantables[65] = ["Loyalty", ["trident"]]), (enchantables[66] = ["Impaling", ["trident"]]), (enchantables[67] = ["Riptide", ["trident"]]), (enchantables[68] = ["Channeling", ["trident"]]), (enchantables[70] = [ "Mending", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "shears", "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "bow", "fishing_rod", "carrot_on_a_stick", "flint_and_steel", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "shield", "elytra", "trident", "crossbow", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "netherite_hoe", "netherite_sword", "warped_fungus_on_a_stick", ], ]), (enchantables[71] = [ "Vanishing Curse", [ "iron_pickaxe", "wooden_pickaxe", "stone_pickaxe", "diamond_pickaxe", "golden_pickaxe", "iron_shovel", "wooden_shovel", "stone_shovel", "diamond_shovel", "golden_shovel", "iron_axe", "wooden_axe", "stone_axe", "diamond_axe", "golden_axe", "shears", "iron_sword", "wooden_sword", "stone_sword", "diamond_sword", "golden_sword", "turtle_helmet", "leather_helmet", "chainmail_helmet", "iron_helmet", "diamond_helmet", "golden_helmet", "leather_chestplate", "chainmail_chestplate", "iron_chestplate", "diamond_chestplate", "golden_chestplate", "leather_leggings", "chainmail_leggings", "iron_leggings", "diamond_leggings", "golden_leggings", "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "bow", "fishing_rod", "carrot_on_a_stick", "flint_and_steel", "wooden_hoe", "stone_hoe", "iron_hoe", "diamond_hoe", "golden_hoe", "shield", "elytra", "netherite_helmet", "netherite_boots", "netherite_chestplate", "netherite_leggings", "netherite_pickaxe", "netherite_shovel", "netherite_axe", "netherite_hoe", "netherite_sword", "warped_fungus_on_a_stick", "compass", ], ]), (enchantables[72] = ["Multishot", ["crossbow"]]), (enchantables[73] = ["Piercing", ["crossbow"]]), (enchantables[74] = ["Quick Charge", ["crossbow"]]), (enchantables[75] = [ "Soul Speed", [ "leather_boots", "chainmail_boots", "iron_boots", "diamond_boots", "golden_boots", "netherite_boots", ], ]); var entityDescriptors, mobSpawnerNBT, beeHiveNestNBT, settings, knowledgeList = [ "acacia_boat", "acacia_button", "acacia_door", "acacia_fence", "acacia_fence_gate", "acacia_planks", "acacia_pressure_plate", "acacia_sign", "acacia_slab", "acacia_stairs", "acacia_trapdoor", "acacia_wood", "activator_rail", "andesite", "andesite_slab", "andesite_slab_from_andesite_stonecutting", "andesite_stairs", "andesite_stairs_from_andesite_stonecutting", "andesite_wall", "andesite_wall_from_andesite_stonecutting", "anvil", "armor_dye", "armor_stand", "arrow", "baked_potato", "baked_potato_from_campfire_cooking", "baked_potato_from_smoking", "banner_duplicate", "barrel", "beacon", "beehive", "beetroot_soup", "birch_boat", "birch_button", "birch_door", "birch_fence", "birch_fence_gate", "birch_planks", "birch_pressure_plate", "birch_sign", "birch_slab", "birch_stairs", "birch_trapdoor", "birch_wood", "blackstone_slab", "blackstone_slab_from_blackstone_stonecutting", "blackstone_stairs", "blackstone_stairs_from_blackstone_stonecutting", "blackstone_wall", "blackstone_wall_from_blackstone_stonecutting", "black_banner", "black_bed", "black_bed_from_white_bed", "black_carpet", "black_carpet_from_white_carpet", "black_concrete_powder", "black_dye", "black_dye_from_wither_rose", "black_glazed_terracotta", "black_stained_glass", "black_stained_glass_pane", "black_stained_glass_pane_from_glass_pane", "black_terracotta", "black_wool", "blast_furnace", "blaze_powder", "blue_banner", "blue_bed", "blue_bed_from_white_bed", "blue_carpet", "blue_carpet_from_white_carpet", "blue_concrete_powder", "blue_dye", "blue_dye_from_cornflower", "blue_glazed_terracotta", "blue_ice", "blue_stained_glass", "blue_stained_glass_pane", "blue_stained_glass_pane_from_glass_pane", "blue_terracotta", "blue_wool", "bone_block", "bone_meal", "bone_meal_from_bone_block", "book", "bookshelf", "book_cloning", "bow", "bowl", "bread", "brewing_stand", "brick", "bricks", "brick_slab", "brick_slab_from_bricks_stonecutting", "brick_stairs", "brick_stairs_from_bricks_stonecutting", "brick_wall", "brick_wall_from_bricks_stonecutting", "brown_banner", "brown_bed", "brown_bed_from_white_bed", "brown_carpet", "brown_carpet_from_white_carpet", "brown_concrete_powder", "brown_dye", "brown_glazed_terracotta", "brown_stained_glass", "brown_stained_glass_pane", "brown_stained_glass_pane_from_glass_pane", "brown_terracotta", "brown_wool", "bucket", "cake", "campfire", "carrot_on_a_stick", "cartography_table", "cauldron", "chain", "charcoal", "chest", "chest_minecart", "chiseled_nether_bricks", "chiseled_nether_bricks_from_nether_bricks_stonecutting", "chiseled_polished_blackstone", "chiseled_polished_blackstone_from_blackstone_stonecutting", "chiseled_polished_blackstone_from_polished_blackstone_stonecutting", "chiseled_quartz_block", "chiseled_quartz_block_from_quartz_block_stonecutting", "chiseled_red_sandstone", "chiseled_red_sandstone_from_red_sandstone_stonecutting", "chiseled_sandstone", "chiseled_sandstone_from_sandstone_stonecutting", "chiseled_stone_bricks", "chiseled_stone_bricks_from_stone_bricks_stonecutting", "chiseled_stone_bricks_stone_from_stonecutting", "clay", "clock", "coal", "coal_block", "coal_from_blasting", "coal_from_smelting", "coarse_dirt", "cobblestone_slab", "cobblestone_slab_from_cobblestone_stonecutting", "cobblestone_stairs", "cobblestone_stairs_from_cobblestone_stonecutting", "cobblestone_wall", "cobblestone_wall_from_cobblestone_stonecutting", "comparator", "compass", "composter", "conduit", "cooked_beef", "cooked_beef_from_campfire_cooking", "cooked_beef_from_smoking", "cooked_chicken", "cooked_chicken_from_campfire_cooking", "cooked_chicken_from_smoking", "cooked_cod", "cooked_cod_from_campfire_cooking", "cooked_cod_from_smoking", "cooked_mutton", "cooked_mutton_from_campfire_cooking", "cooked_mutton_from_smoking", "cooked_porkchop", "cooked_porkchop_from_campfire_cooking", "cooked_porkchop_from_smoking", "cooked_rabbit", "cooked_rabbit_from_campfire_cooking", "cooked_rabbit_from_smoking", "cooked_salmon", "cooked_salmon_from_campfire_cooking", "cooked_salmon_from_smoking", "cookie", "cracked_nether_bricks", "cracked_polished_blackstone_bricks", "cracked_stone_bricks", "crafting_table", "creeper_banner_pattern", "crimson_button", "crimson_door", "crimson_fence", "crimson_fence_gate", "crimson_hyphae", "crimson_planks", "crimson_pressure_plate", "crimson_sign", "crimson_slab", "crimson_stairs", "crimson_trapdoor", "crossbow", "cut_red_sandstone", "cut_red_sandstone_from_red_sandstone_stonecutting", "cut_red_sandstone_slab", "cut_red_sandstone_slab_from_cut_red_sandstone_stonecutting", "cut_red_sandstone_slab_from_red_sandstone_stonecutting", "cut_sandstone", "cut_sandstone_from_sandstone_stonecutting", "cut_sandstone_slab", "cut_sandstone_slab_from_cut_sandstone_stonecutting", "cut_sandstone_slab_from_sandstone_stonecutting", "cyan_banner", "cyan_bed", "cyan_bed_from_white_bed", "cyan_carpet", "cyan_carpet_from_white_carpet", "cyan_concrete_powder", "cyan_dye", "cyan_glazed_terracotta", "cyan_stained_glass", "cyan_stained_glass_pane", "cyan_stained_glass_pane_from_glass_pane", "cyan_terracotta", "cyan_wool", "dark_oak_boat", "dark_oak_button", "dark_oak_door", "dark_oak_fence", "dark_oak_fence_gate", "dark_oak_planks", "dark_oak_pressure_plate", "dark_oak_sign", "dark_oak_slab", "dark_oak_stairs", "dark_oak_trapdoor", "dark_oak_wood", "dark_prismarine", "dark_prismarine_slab", "dark_prismarine_slab_from_dark_prismarine_stonecutting", "dark_prismarine_stairs", "dark_prismarine_stairs_from_dark_prismarine_stonecutting", "daylight_detector", "detector_rail", "diamond", "diamond_axe", "diamond_block", "diamond_boots", "diamond_chestplate", "diamond_from_blasting", "diamond_from_smelting", "diamond_helmet", "diamond_hoe", "diamond_leggings", "diamond_pickaxe", "diamond_shovel", "diamond_sword", "diorite", "diorite_slab", "diorite_slab_from_diorite_stonecutting", "diorite_stairs", "diorite_stairs_from_diorite_stonecutting", "diorite_wall", "diorite_wall_from_diorite_stonecutting", "dispenser", "dried_kelp", "dried_kelp_block", "dried_kelp_from_campfire_cooking", "dried_kelp_from_smelting", "dried_kelp_from_smoking", "dropper", "emerald", "emerald_block", "emerald_from_blasting", "emerald_from_smelting", "enchanting_table", "ender_chest", "ender_eye", "end_crystal", "end_rod", "end_stone_bricks", "end_stone_bricks_from_end_stone_stonecutting", "end_stone_brick_slab", "end_stone_brick_slab_from_end_stone_brick_stonecutting", "end_stone_brick_slab_from_end_stone_stonecutting", "end_stone_brick_stairs", "end_stone_brick_stairs_from_end_stone_brick_stonecutting", "end_stone_brick_stairs_from_end_stone_stonecutting", "end_stone_brick_wall", "end_stone_brick_wall_from_end_stone_brick_stonecutting", "end_stone_brick_wall_from_end_stone_stonecutting", "fermented_spider_eye", "firework_rocket", "firework_star", "firework_star_fade", "fire_charge", "fishing_rod", "fletching_table", "flint_and_steel", "flower_banner_pattern", "flower_pot", "furnace", "furnace_minecart", "glass", "glass_bottle", "glass_pane", "glistering_melon_slice", "glowstone", "golden_apple", "golden_axe", "golden_boots", "golden_carrot", "golden_chestplate", "golden_helmet", "golden_hoe", "golden_leggings", "golden_pickaxe", "golden_shovel", "golden_sword", "gold_block", "gold_ingot", "gold_ingot_from_blasting", "gold_ingot_from_gold_block", "gold_ingot_from_nuggets", "gold_nugget", "gold_nugget_from_blasting", "gold_nugget_from_smelting", "granite", "granite_slab", "granite_slab_from_granite_stonecutting", "granite_stairs", "granite_stairs_from_granite_stonecutting", "granite_wall", "granite_wall_from_granite_stonecutting", "gray_banner", "gray_bed", "gray_bed_from_white_bed", "gray_carpet", "gray_carpet_from_white_carpet", "gray_concrete_powder", "gray_dye", "gray_glazed_terracotta", "gray_stained_glass", "gray_stained_glass_pane", "gray_stained_glass_pane_from_glass_pane", "gray_terracotta", "gray_wool", "green_banner", "green_bed", "green_bed_from_white_bed", "green_carpet", "green_carpet_from_white_carpet", "green_concrete_powder", "green_dye", "green_glazed_terracotta", "green_stained_glass", "green_stained_glass_pane", "green_stained_glass_pane_from_glass_pane", "green_terracotta", "green_wool", "grindstone", "hay_block", "heavy_weighted_pressure_plate", "honeycomb_block", "honey_block", "honey_bottle", "hopper", "hopper_minecart", "iron_axe", "iron_bars", "iron_block", "iron_boots", "iron_chestplate", "iron_door", "iron_helmet", "iron_hoe", "iron_ingot", "iron_ingot_from_blasting", "iron_ingot_from_iron_block", "iron_ingot_from_nuggets", "iron_leggings", "iron_nugget", "iron_nugget_from_blasting", "iron_nugget_from_smelting", "iron_pickaxe", "iron_shovel", "iron_sword", "iron_trapdoor", "item_frame", "jack_o_lantern", "jukebox", "jungle_boat", "jungle_button", "jungle_door", "jungle_fence", "jungle_fence_gate", "jungle_planks", "jungle_pressure_plate", "jungle_sign", "jungle_slab", "jungle_stairs", "jungle_trapdoor", "jungle_wood", "ladder", "lantern", "lapis_block", "lapis_from_blasting", "lapis_from_smelting", "lapis_lazuli", "lead", "leather", "leather_boots", "leather_chestplate", "leather_helmet", "leather_horse_armor", "leather_leggings", "lectern", "lever", "light_blue_banner", "light_blue_bed", "light_blue_bed_from_white_bed", "light_blue_carpet", "light_blue_carpet_from_white_carpet", "light_blue_concrete_powder", "light_blue_dye_from_blue_orchid", "light_blue_dye_from_blue_white_dye", "light_blue_glazed_terracotta", "light_blue_stained_glass", "light_blue_stained_glass_pane", "light_blue_stained_glass_pane_from_glass_pane", "light_blue_terracotta", "light_blue_wool", "light_gray_banner", "light_gray_bed", "light_gray_bed_from_white_bed", "light_gray_carpet", "light_gray_carpet_from_white_carpet", "light_gray_concrete_powder", "light_gray_dye_from_azure_bluet", "light_gray_dye_from_black_white_dye", "light_gray_dye_from_gray_white_dye", "light_gray_dye_from_oxeye_daisy", "light_gray_dye_from_white_tulip", "light_gray_glazed_terracotta", "light_gray_stained_glass", "light_gray_stained_glass_pane", "light_gray_stained_glass_pane_from_glass_pane", "light_gray_terracotta", "light_gray_wool", "light_weighted_pressure_plate", "lime_banner", "lime_bed", "lime_bed_from_white_bed", "lime_carpet", "lime_carpet_from_white_carpet", "lime_concrete_powder", "lime_dye", "lime_dye_from_smelting", "lime_glazed_terracotta", "lime_stained_glass", "lime_stained_glass_pane", "lime_stained_glass_pane_from_glass_pane", "lime_terracotta", "lime_wool", "lodestone", "loom", "magenta_banner", "magenta_bed", "magenta_bed_from_white_bed", "magenta_carpet", "magenta_carpet_from_white_carpet", "magenta_concrete_powder", "magenta_dye_from_allium", "magenta_dye_from_blue_red_pink", "magenta_dye_from_blue_red_white_dye", "magenta_dye_from_lilac", "magenta_dye_from_purple_and_pink", "magenta_glazed_terracotta", "magenta_stained_glass", "magenta_stained_glass_pane", "magenta_stained_glass_pane_from_glass_pane", "magenta_terracotta", "magenta_wool", "magma_block", "magma_cream", "map", "map_cloning", "map_extending", "melon", "melon_seeds", "minecart", "mojang_banner_pattern", "mossy_cobblestone", "mossy_cobblestone_slab", "mossy_cobblestone_slab_from_mossy_cobblestone_stonecutting", "mossy_cobblestone_stairs", "mossy_cobblestone_stairs_from_mossy_cobblestone_stonecutting", "mossy_cobblestone_wall", "mossy_cobblestone_wall_from_mossy_cobblestone_stonecutting", "mossy_stone_bricks", "mossy_stone_brick_slab", "mossy_stone_brick_slab_from_mossy_stone_brick_stonecutting", "mossy_stone_brick_stairs", "mossy_stone_brick_stairs_from_mossy_stone_brick_stonecutting", "mossy_stone_brick_wall", "mossy_stone_brick_wall_from_mossy_stone_brick_stonecutting", "mushroom_stew", "netherite_axe_smithing", "netherite_block", "netherite_boots_smithing", "netherite_chestplate_smithing", "netherite_helmet_smithing", "netherite_hoe_smithing", "netherite_ingot", "netherite_ingot_from_netherite_block", "netherite_leggings_smithing", "netherite_pickaxe_smithing", "netherite_scrap", "netherite_scrap_from_blasting", "netherite_shovel_smithing", "netherite_sword_smithing", "nether_brick", "nether_bricks", "nether_brick_fence", "nether_brick_slab", "nether_brick_slab_from_nether_bricks_stonecutting", "nether_brick_stairs", "nether_brick_stairs_from_nether_bricks_stonecutting", "nether_brick_wall", "nether_brick_wall_from_nether_bricks_stonecutting", "nether_wart_block", "note_block", "oak_boat", "oak_button", "oak_door", "oak_fence", "oak_fence_gate", "oak_planks", "oak_pressure_plate", "oak_sign", "oak_slab", "oak_stairs", "oak_trapdoor", "oak_wood", "observer", "orange_banner", "orange_bed", "orange_bed_from_white_bed", "orange_carpet", "orange_carpet_from_white_carpet", "orange_concrete_powder", "orange_dye_from_orange_tulip", "orange_dye_from_red_yellow", "orange_glazed_terracotta", "orange_stained_glass", "orange_stained_glass_pane", "orange_stained_glass_pane_from_glass_pane", "orange_terracotta", "orange_wool", "packed_ice", "painting", "paper", "pink_banner", "pink_bed", "pink_bed_from_white_bed", "pink_carpet", "pink_carpet_from_white_carpet", "pink_concrete_powder", "pink_dye_from_peony", "pink_dye_from_pink_tulip", "pink_dye_from_red_white_dye", "pink_glazed_terracotta", "pink_stained_glass", "pink_stained_glass_pane", "pink_stained_glass_pane_from_glass_pane", "pink_terracotta", "pink_wool", "piston", "polished_andesite", "polished_andesite_from_andesite_stonecutting", "polished_andesite_slab", "polished_andesite_slab_from_andesite_stonecutting", "polished_andesite_slab_from_polished_andesite_stonecutting", "polished_andesite_stairs", "polished_andesite_stairs_from_andesite_stonecutting", "polished_andesite_stairs_from_polished_andesite_stonecutting", "polished_basalt", "polished_basalt_from_basalt_stonecutting", "polished_blackstone", "polished_blackstone_bricks", "polished_blackstone_bricks_from_blackstone_stonecutting", "polished_blackstone_bricks_from_polished_blackstone_stonecutting", "polished_blackstone_brick_slab", "polished_blackstone_brick_slab_from_blackstone_stonecutting", "polished_blackstone_brick_slab_from_polished_blackstone_bricks_stonecutting", "polished_blackstone_brick_slab_from_polished_blackstone_stonecutting", "polished_blackstone_brick_stairs", "polished_blackstone_brick_stairs_from_blackstone_stonecutting", "polished_blackstone_brick_stairs_from_polished_blackstone_bricks_stonecutting", "polished_blackstone_brick_stairs_from_polished_blackstone_stonecutting", "polished_blackstone_brick_wall", "polished_blackstone_brick_wall_from_blackstone_stonecutting", "polished_blackstone_brick_wall_from_polished_blackstone_bricks_stonecutting", "polished_blackstone_brick_wall_from_polished_blackstone_stonecutting", "polished_blackstone_button", "polished_blackstone_from_blackstone_stonecutting", "polished_blackstone_pressure_plate", "polished_blackstone_slab", "polished_blackstone_slab_from_blackstone_stonecutting", "polished_blackstone_slab_from_polished_blackstone_stonecutting", "polished_blackstone_stairs", "polished_blackstone_stairs_from_blackstone_stonecutting", "polished_blackstone_stairs_from_polished_blackstone_stonecutting", "polished_blackstone_wall", "polished_blackstone_wall_from_blackstone_stonecutting", "polished_blackstone_wall_from_polished_blackstone_stonecutting", "polished_diorite", "polished_diorite_from_diorite_stonecutting", "polished_diorite_slab", "polished_diorite_slab_from_diorite_stonecutting", "polished_diorite_slab_from_polished_diorite_stonecutting", "polished_diorite_stairs", "polished_diorite_stairs_from_diorite_stonecutting", "polished_diorite_stairs_from_polished_diorite_stonecutting", "polished_granite", "polished_granite_from_granite_stonecutting", "polished_granite_slab", "polished_granite_slab_from_granite_stonecutting", "polished_granite_slab_from_polished_granite_stonecutting", "polished_granite_stairs", "polished_granite_stairs_from_granite_stonecutting", "polished_granite_stairs_from_polished_granite_stonecutting", "popped_chorus_fruit", "powered_rail", "prismarine", "prismarine_bricks", "prismarine_brick_slab", "prismarine_brick_slab_from_prismarine_stonecutting", "prismarine_brick_stairs", "prismarine_brick_stairs_from_prismarine_stonecutting", "prismarine_slab", "prismarine_slab_from_prismarine_stonecutting", "prismarine_stairs", "prismarine_stairs_from_prismarine_stonecutting", "prismarine_wall", "prismarine_wall_from_prismarine_stonecutting", "pumpkin_pie", "pumpkin_seeds", "purple_banner", "purple_bed", "purple_bed_from_white_bed", "purple_carpet", "purple_carpet_from_white_carpet", "purple_concrete_powder", "purple_dye", "purple_glazed_terracotta", "purple_stained_glass", "purple_stained_glass_pane", "purple_stained_glass_pane_from_glass_pane", "purple_terracotta", "purple_wool", "purpur_block", "purpur_pillar", "purpur_pillar_from_purpur_block_stonecutting", "purpur_slab", "purpur_slab_from_purpur_block_stonecutting", "purpur_stairs", "purpur_stairs_from_purpur_block_stonecutting", "quartz", "quartz_block", "quartz_bricks", "quartz_bricks_from_quartz_block_stonecutting", "quartz_from_blasting", "quartz_pillar", "quartz_pillar_from_quartz_block_stonecutting", "quartz_slab", "quartz_slab_from_stonecutting", "quartz_stairs", "quartz_stairs_from_quartz_block_stonecutting", "rabbit_stew_from_brown_mushroom", "rabbit_stew_from_red_mushroom", "rail", "redstone", "redstone_block", "redstone_from_blasting", "redstone_from_smelting", "redstone_lamp", "redstone_torch", "red_banner", "red_bed", "red_bed_from_white_bed", "red_carpet", "red_carpet_from_white_carpet", "red_concrete_powder", "red_dye_from_beetroot", "red_dye_from_poppy", "red_dye_from_rose_bush", "red_dye_from_tulip", "red_glazed_terracotta", "red_nether_bricks", "red_nether_brick_slab", "red_nether_brick_slab_from_red_nether_bricks_stonecutting", "red_nether_brick_stairs", "red_nether_brick_stairs_from_red_nether_bricks_stonecutting", "red_nether_brick_wall", "red_nether_brick_wall_from_red_nether_bricks_stonecutting", "red_sandstone", "red_sandstone_slab", "red_sandstone_slab_from_red_sandstone_stonecutting", "red_sandstone_stairs", "red_sandstone_stairs_from_red_sandstone_stonecutting", "red_sandstone_wall", "red_sandstone_wall_from_red_sandstone_stonecutting", "red_stained_glass", "red_stained_glass_pane", "red_stained_glass_pane_from_glass_pane", "red_terracotta", "red_wool", "repair_item", "repeater", "respawn_anchor", "sandstone", "sandstone_slab", "sandstone_slab_from_sandstone_stonecutting", "sandstone_stairs", "sandstone_stairs_from_sandstone_stonecutting", "sandstone_wall", "sandstone_wall_from_sandstone_stonecutting", "scaffolding", "sea_lantern", "shears", "shield", "shield_decoration", "shulker_box", "shulker_box_coloring", "skull_banner_pattern", "slime_ball", "slime_block", "smithing_table", "smoker", "smooth_quartz", "smooth_quartz_slab", "smooth_quartz_slab_from_smooth_quartz_stonecutting", "smooth_quartz_stairs", "smooth_quartz_stairs_from_smooth_quartz_stonecutting", "smooth_red_sandstone", "smooth_red_sandstone_slab", "smooth_red_sandstone_slab_from_smooth_red_sandstone_stonecutting", "smooth_red_sandstone_stairs", "smooth_red_sandstone_stairs_from_smooth_red_sandstone_stonecutting", "smooth_sandstone", "smooth_sandstone_slab", "smooth_sandstone_slab_from_smooth_sandstone_stonecutting", "smooth_sandstone_stairs", "smooth_sandstone_stairs_from_smooth_sandstone_stonecutting", "smooth_stone", "smooth_stone_slab", "smooth_stone_slab_from_smooth_stone_stonecutting", "snow", "snow_block", "soul_campfire", "soul_lantern", "soul_torch", "spectral_arrow", "sponge", "spruce_boat", "spruce_button", "spruce_door", "spruce_fence", "spruce_fence_gate", "spruce_planks", "spruce_pressure_plate", "spruce_sign", "spruce_slab", "spruce_stairs", "spruce_trapdoor", "spruce_wood", "stick", "sticky_piston", "stick_from_bamboo_item", "stone", "stonecutter", "stone_axe", "stone_bricks", "stone_bricks_from_stone_stonecutting", "stone_brick_slab", "stone_brick_slab_from_stone_bricks_stonecutting", "stone_brick_slab_from_stone_stonecutting", "stone_brick_stairs", "stone_brick_stairs_from_stone_bricks_stonecutting", "stone_brick_stairs_from_stone_stonecutting", "stone_brick_wall", "stone_brick_walls_from_stone_stonecutting", "stone_brick_wall_from_stone_bricks_stonecutting", "stone_button", "stone_hoe", "stone_pickaxe", "stone_pressure_plate", "stone_shovel", "stone_slab", "stone_slab_from_stone_stonecutting", "stone_stairs", "stone_stairs_from_stone_stonecutting", "stone_sword", "stripped_acacia_wood", "stripped_birch_wood", "stripped_crimson_hyphae", "stripped_dark_oak_wood", "stripped_jungle_wood", "stripped_oak_wood", "stripped_spruce_wood", "stripped_warped_hyphae", "sugar_from_honey_bottle", "sugar_from_sugar_cane", "suspicious_stew", "target", "terracotta", "tipped_arrow", "tnt", "tnt_minecart", "torch", "trapped_chest", "tripwire_hook", "turtle_helmet", "warped_button", "warped_door", "warped_fence", "warped_fence_gate", "warped_fungus_on_a_stick", "warped_hyphae", "warped_planks", "warped_pressure_plate", "warped_sign", "warped_slab", "warped_stairs", "warped_trapdoor", "wheat", "white_banner", "white_bed", "white_carpet", "white_concrete_powder", "white_dye", "white_dye_from_lily_of_the_valley", "white_glazed_terracotta", "white_stained_glass", "white_stained_glass_pane", "white_stained_glass_pane_from_glass_pane", "white_terracotta", "white_wool_from_string", "wooden_axe", "wooden_hoe", "wooden_pickaxe", "wooden_shovel", "wooden_sword", "writable_book", "yellow_banner", "yellow_bed", "yellow_bed_from_white_bed", "yellow_carpet", "yellow_carpet_from_white_carpet", "yellow_concrete_powder", "yellow_dye_from_dandelion", "yellow_dye_from_sunflower", "yellow_glazed_terracotta", "yellow_stained_glass", "yellow_stained_glass_pane", "yellow_stained_glass_pane_from_glass_pane", "yellow_terracotta", "yellow_wool", ], nsweName = ["north", "south", "east", "west"], nsewudName = ["north", "south", "east", "west", "up", "down"], nsewdName = ["north", "south", "east", "west", "down"], nsewuName = ["north", "south", "east", "west", "up"], doorBS = { facing: nsweName, half: ["upper", "lower"], hinge: ["left", "right"], open: [!1, !0], powered: [!1, !0], }, buttonsBS = { facing: nsweName, face: ["ceiling", "wall", "floor"] }, leavesBS = { distance: [1, 2, 3, 4, 5, 6, 7], persistent: [!1, !0] }, stairBlockState = { facing: nsweName, half: ["top", "bottom"], shape: [ "straight", "inner_left", "inner_right", "outer_left", "outer_right", ], waterlogged: [!1, !0], }, trapdoors = { powered: [!1, !0], facing: nsweName, half: ["top", "bottom"], open: [!1, !0], }, slabTypes = { type: ["top", "bottom", "double"], waterlogged: [!1, !0] }, bedOptions = { occupied: [!1, !0], facing: nsweName, part: ["head", "foot"], }, woodTypes1 = [ [0, "Oak"], [1, "Spruce"], [2, "Birch"], [3, "Jungle"], [4, "Acacia"], [5, "Dark Oak"], ], colours1 = [ [0, "White"], [1, "Orange"], [2, "Magenta"], [3, "Light Blue"], [4, "Yellow"], [5, "Lime"], [6, "Pink"], [7, "Gray"], [8, "Light Gray"], [9, "Cyan"], [10, "Purple"], [11, "Blue"], [12, "Brown"], [13, "Green"], [14, "Red"], [15, "Black"], ], fenceBS = { north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], waterlogged: [!0, !1], }, wallBS = { north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], up: [!1, !0], waterlogged: [!0, !1], }, fenceGateBS = { facing: nsweName, in_wall: [!1, !0], open: [!1, !0], powered: [!1, !0], waterlogged: [!0, !1], }, mushroom = [ [0, "Pores on all sides"], [1, "Cap texture on top, west and north"], [2, "Cap texture on top and north"], [3, "Cap texture on top, north and east"], [4, "Cap texture on top and west"], [5, "Cap texture on top"], [6, "Cap texture on top and east"], [7, "Cap texture on top, south and west"], [8, "Cap texture on top and south"], [9, "Cap texture on top, east and south"], [10, "Stem texture on all four sides, pores on top and bottom"], [14, "Cap texture on all six sides"], [15, "Stem texture on all six sides"], ], trapdoor = [ [0, "Trapdoor on the west side of a block (bottom of block)"], [1, "Trapdoor on the south side of a block (bottom of block)"], [2, "Trapdoor on the east side of a block (bottom of block)"], [3, "Trapdoor on the north side of a block (bottom of block)"], [4, "Open Trapdoor on the west side of a block (bottom of block)"], [5, "Open Trapdoor on the south side of a block (bottom of block)"], [6, "Open Trapdoor on the east side of a block (bottom of block)"], [7, "Open Trapdoor on the north side of a block (bottom of block)"], [8, "Trapdoor on the west side of a block (top of block)"], [9, "Trapdoor on the south side of a block (top of block)"], [10, "Trapdoor on the east side of a block (top of block)"], [11, "Trapdoor on the north side of a block (top of block)"], [12, "Open Trapdoor on the west side of a block (top of block)"], [13, "Open Trapdoor on the south side of a block (top of block)"], [14, "Open Trapdoor on the east side of a block (top of block)"], [15, "Open Trapdoor on the north side of a block (top of block)"], ], repeater = [ [0, "Facing north, 1 tick delay"], [1, "Facing east, 1 tick delay"], [2, "Facing south, 1 tick delay"], [3, "Facing west, 1 tick delay"], [4, "Facing north, 2 tick delay"], [5, "Facing east, 2 tick delay"], [6, "Facing south, 2 tick delay"], [7, "Facing west, 2 tick delay"], [8, "Facing north, 3 tick delay"], [9, "Facing east, 3 tick delay"], [10, "Facing south, 3 tick delay"], [11, "Facing west, 3 tick delay"], [12, "Facing north, 4 tick delay"], [13, "Facing east, 4 tick delay"], [14, "Facing south, 4 tick delay"], [15, "Facing west, 4 tick delay"], ], comparator = [ [0, "Facing north"], [1, "Facing east"], [2, "Facing south"], [3, "Facing west"], [4, "Facing north, subtraction mode"], [5, "Facing east, subtraction mode"], [6, "Facing south, subtraction mode"], [7, "Facing west, subtraction mode"], [8, "Facing north, powered"], [9, "Facing east, powered"], [10, "Facing south, powered"], [11, "Facing west, powered"], [12, "Facing north, subtraction mode, powered"], [13, "Facing east, subtraction mode, powered"], [14, "Facing south, subtraction mode, powered"], [15, "Facing west, subtraction mode, powered"], ], cactusReeds = [ [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15], ], buttons = [ [0, "Button on block bottom facing down"], [1, "Button on block side facing east"], [2, "Button on block side facing west"], [3, "Button on block side facing south"], [4, "Button on block side facing north"], [5, "Button on block top facing up"], [8, "Button on block bottom facing down (active)"], [9, "Button on block side facing east (active)"], [10, "Button on block side facing west (active)"], [11, "Button on block side facing south (active)"], [12, "Button on block side facing north (active)"], [13, "Button on block top facing up (active)"], ], torch = [ [1, "Facing east (attached to a block to its west)"], [2, "Facing west (attached to a block to its east)"], [3, "Facing south (attached to a block to its north)"], [4, "Facing north (attached to a block to its south)"], [5, "Facing up (attached to a block beneath it)"], ], pressure = [ [0, "Inactive"], [1, "Active"], ], dunswe = [ [0, "Down"], [1, "Up"], [2, "north"], [3, "south"], [4, "west"], [5, "east"], ], nswe = [ [2, "north"], [3, "south"], [4, "west"], [5, "east"], ], stairs = [ [0, "East"], [1, "West"], [2, "South"], [3, "North"], [4, "East Upside-down"], [5, "West Upside-down"], [6, "South Upside-down"], [7, "North Upside-down"], ], rails = [ [0, "flat track going north-south"], [1, "flat track going west-east"], [2, "sloped track ascending to the east"], [3, "sloped track ascending to the west"], [4, "sloped track ascending to the north"], [5, "sloped track ascending to the south"], ], cropAge0to7 = [ [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], ], beetsAndWarts = [ [0, 0], [1, 1], [2, 2], [3, 3], ], standingSignBanner = [ [0, "south"], [1, "south-southwest"], [2, "southwest"], [3, "west-southwest"], [4, "west"], [5, "west-northwest"], [6, "northwest"], [7, "north-northwest"], [8, "north"], [9, "north-northeast"], [10, "northeast"], [11, "east-northeast"], [12, "east"], [13, "east-southeast"], [14, "southeast"], [15, "south-southeast"], ], headRotate = [ [0, "north"], [1, "north-northeast"], [2, "northeast"], [3, "east-northeast"], [4, "east"], [5, "east-southeast"], [6, "southeast"], [7, "south-southeast"], [8, "south"], [9, "south-southwest"], [10, "southwest"], [11, "west-southwest"], [12, "west"], [13, "west-northwest"], [14, "northwest"], [15, "north-northwest"], ], commandBlockDirection = [ [0, "Facing down"], [1, "Facing up"], [2, "Facing north"], [3, "Facing south"], [4, "Facing west"], [5, "Facing east"], [8, "Facing down, Conditional"], [9, "Facing up, Conditional"], [10, "Facing north, Conditional"], [11, "Facing south, Conditional"], [12, "Facing west, Conditional"], [13, "Facing east, Conditional"], ], tiles = [ ["air", "Air"], ["cave_air", "Cave Air"], ["void_air", "Void Air"], ["stone", "Stone"], ["granite", "Granite"], ["polished_granite", "Polished Granite"], ["diorite", "Diorite"], ["polished_diorite", "Polished Diorite"], ["andesite", "Andesite"], ["polished_andesite", "Polished Andesite"], ["grass_block", "Grass Block"], ["dirt", "Dirt"], ["coarse_dirt", "Coarse Dirt"], ["podzol", "Podzol"], ["cobblestone", "Cobblestone"], ["oak_planks", "Oak Planks"], ["spruce_planks", "Spruce Planks"], ["birch_planks", "Birch Planks"], ["jungle_planks", "Jungle Planks"], ["acacia_planks", "Acacia Planks"], ["dark_oak_planks", "Dark Oak Planks"], ["oak_sapling", "Oak Sapling"], ["spruce_sapling", "Spruce Sapling"], ["birch_sapling", "Birch Sapling"], ["jungle_sapling", "Jungle Sapling"], ["acacia_sapling", "Acacia Sapling"], ["dark_oak_sapling", "Dark Oak Sapling"], ["white_bed", "White Bed"], ["orange_bed", "Orange Bed"], ["magenta_bed", "Magenta Bed"], ["light_blue_bed", "Light Blue Bed"], ["yellow_bed", "Yellow Bed"], ["lime_bed", "Lime Bed"], ["pink_bed", "Pink Bed"], ["gray_bed", "Gray Bed"], ["light_gray_bed", "Light Gray Bed"], ["cyan_bed", "Cyan Bed"], ["purple_bed", "Purple Bed"], ["blue_bed", "Blue Bed"], ["brown_bed", "Brown Bed"], ["green_bed", "Green Bed"], ["red_bed", "Red Bed"], ["black_bed", "Black Bed"], ["bedrock", "Bedrock"], ["water", "Stationary Water"], ["lava", "Stationary Lava"], ["sand", "Sand"], ["red_sand", "Red Sand"], ["gravel", "Gravel"], ["gold_ore", "Gold Ore"], ["iron_ore", "Iron Ore"], ["coal_ore", "Coal Ore"], ["oak_log", "Oak Log"], ["spruce_log", "Spruce Log"], ["birch_log", "Birch Log"], ["jungle_log", "Jungle Log"], ["oak_wood", "Oak Wood"], ["spruce_wood", "Spruce Wood"], ["birch_wood", "Birch Wood"], ["jungle_wood", "Jungle Wood"], ["acacia_log", "Acacia Log"], ["dark_oak_log", "Dark Oak Log"], ["acacia_wood", "Acacia Wood"], ["dark_oak_wood", "Dark Oak Wood"], ["stripped_oak_log", "Stripped Oak Log"], ["stripped_spruce_log", "Stripped Spruce Log"], ["stripped_birch_log", "Stripped Birch Log"], ["stripped_jungle_log", "Stripped Jungle Log"], ["stripped_acacia_log", "Stripped Acacia Log"], ["stripped_dark_oak_log", "Stripped Dark Oak Log"], ["stripped_oak_wood", "Stripped Oak Wood"], ["stripped_spruce_wood", "Stripped Spruce Wood"], ["stripped_birch_wood", "Stripped Birch Wood"], ["stripped_jungle_wood", "Stripped Jungle Wood"], ["stripped_acacia_wood", "Stripped Acacia Wood"], ["stripped_dark_oak_wood", "Stripped Dark Oak Wood"], ["oak_leaves", "Oak Leaves"], ["spruce_leaves", "Spruce Leaves"], ["birch_leaves", "Birch Leaves"], ["jungle_leaves", "Jungle Leaves"], ["acacia_leaves", "Acacia Leaves"], ["dark_oak_leaves", "Dark Oak Leaves"], ["sponge", "Sponge"], ["wet_sponge", "Wet Sponge"], ["glass", "Glass"], ["lapis_ore", "Lapis Lazuli Ore"], ["lapis_block", "Lapis Lazuli Block"], ["dispenser", "Dispenser"], ["sandstone", "Sandstone"], ["chiseled_sandstone", "Chiseled Sandstone"], ["cut_sandstone", "Cut Sandstone"], ["note_block", "Note Block"], ["powered_rail", "Powered Rail"], ["detector_rail", "Detector Rail"], ["cobweb", "Cobweb"], ["grass", "Grass"], ["fern", "Fern"], ["dead_bush", "Dead Bush"], ["piston", "Piston"], ["piston_head", "Piston Head"], ["sticky_piston", "Sticky Piston"], ["moving_piston", "Moving Piston"], ["white_wool", "White Wool"], ["orange_wool", "Orange Wool"], ["magenta_wool", "Magenta Wool"], ["light_blue_wool", "Light Blue Wool"], ["yellow_wool", "Yellow Wool"], ["lime_wool", "Lime Wool"], ["pink_wool", "Pink Wool"], ["gray_wool", "Gray Wool"], ["light_gray_wool", "Light Gray Wool"], ["cyan_wool", "Cyan Wool"], ["purple_wool", "Purple Wool"], ["blue_wool", "Blue Wool"], ["brown_wool", "Brown Wool"], ["green_wool", "Green Wool"], ["red_wool", "Red Wool"], ["black_wool", "Black Wool"], ["dandelion", "Dandelion"], ["poppy", "Poppy"], ["blue_orchid", "Blue Orchid"], ["allium", "Allium"], ["azure_bluet", "Azure Bluet"], ["red_tulip", "Red Tulip"], ["orange_tulip", "Orange Tulip"], ["white_tulip", "White Tulip"], ["pink_tulip", "Pink Tulip"], ["oxeye_daisy", "Oxeye Daisy"], ["brown_mushroom", "Brown Mushroom"], ["red_mushroom", "Red Mushroom"], ["gold_block", "Block of Gold"], ["iron_block", "Block of Iron"], ["bricks", "Bricks"], ["tnt", "TNT"], ["bookshelf", "Bookshelf"], ["mossy_cobblestone", "Moss Stone"], ["obsidian", "Obsidian"], ["wall_torch", "Torch"], ["fire", "Fire"], ["spawner", "Spawner"], ["oak_stairs", "Oak Wood Stairs"], ["chest", "Chest"], ["redstone_wire", "Redstone Wire"], ["diamond_ore", "Diamond Ore"], ["diamond_block", "Block of Diamond"], ["crafting_table", "Crafting Table"], ["wheat", "Wheat"], ["farmland", "Farmland"], ["furnace", "Furnace"], ["oak_door", "Oak Door"], ["ladder", "Ladder"], ["rail", "Rail"], ["cobblestone_stairs", "Cobblestone Stairs"], ["lever", "Lever"], ["stone_pressure_plate", "Stone Pressure Plate"], ["iron_door", "Iron Door"], ["oak_pressure_plate", "Oak Pressure Plate"], ["spruce_pressure_plate", "Spruce Pressure Plate"], ["birch_pressure_plate", "Birch Pressure Plate"], ["jungle_pressure_plate", "Jungle Pressure Plate"], ["acacia_pressure_plate", "Acacia Pressure Plate"], ["dark_oak_pressure_plate", "Dark Oak Pressure Plate"], ["redstone_ore", "Redstone Ore"], ["redstone_wall_torch", "Redstone Torch"], ["stone_button", "Stone Button"], ["snow", "Snow"], ["ice", "Ice"], ["snow_block", "Snow Block"], ["cactus", "Cactus"], ["clay", "Clay"], ["sugar_cane", "Sugar cane"], ["jukebox", "Jukebox"], ["oak_fence", "Oak Fence"], ["pumpkin", "Pumpkin"], ["carved_pumpkin", "Carved Pumpkin"], ["netherrack", "Netherrack"], ["soul_sand", "Soul Sand"], ["glowstone", "Glowstone"], ["jack_o_lantern", "Jack o'Lantern"], ["cake", "Cake"], ["repeater", "Redstone Repeater"], ["white_stained_glass", "White Stained Glass"], ["orange_stained_glass", "Orange Stained Glass"], ["magenta_stained_glass", "Magenta Stained Glass"], ["light_blue_stained_glass", "Light Blue Stained Glass"], ["yellow_stained_glass", "Yellow Stained Glass"], ["lime_stained_glass", "Lime Stained Glass"], ["pink_stained_glass", "Pink Stained Glass"], ["gray_stained_glass", "Gray Stained Glass"], ["light_gray_stained_glass", "Light Gray Stained Glass"], ["cyan_stained_glass", "Cyan Stained Glass"], ["purple_stained_glass", "Purple Stained Glass"], ["blue_stained_glass", "Blue Stained Glass"], ["brown_stained_glass", "Brown Stained Glass"], ["green_stained_glass", "Green Stained Glass"], ["red_stained_glass", "Red Stained Glass"], ["black_stained_glass", "Black Stained Glass"], ["infested_stone", "Infested Stone"], ["infested_cobblestone", "Infested Cobblestone"], ["infested_stone_bricks", "Infested Stone Bricks"], ["infested_mossy_stone_bricks", "Infested Mossy Stone Bricks"], ["infested_cracked_stone_bricks", "Infested Cracked Stone Bricks"], ["infested_chiseled_stone_bricks", "Infested Chiseled Stone Bricks"], ["stone_bricks", "Stone Bricks"], ["mossy_stone_bricks", "Mossy Stone Bricks"], ["cracked_stone_bricks", "Cracked Stone Bricks"], ["chiseled_stone_bricks", "Chiseled Stone Bricks"], ["mushroom_stem", "Mushroom Stem"], ["brown_mushroom_block", "Brown Mushroom Block"], ["red_mushroom_block", "Red Mushroom Block"], ["iron_bars", "Iron Bars"], ["glass_pane", "Glass Pane"], ["white_stained_glass_pane", "White Stained Glass Pane"], ["orange_stained_glass_pane", "Orange Stained Glass Pane"], ["magenta_stained_glass_pane", "Magenta Stained Glass Pane"], ["light_blue_stained_glass_pane", "Light Blue Stained Glass Pane"], ["yellow_stained_glass_pane", "Yellow Stained Glass Pane"], ["lime_stained_glass_pane", "Lime Stained Glass Pane"], ["pink_stained_glass_pane", "Pink Stained Glass Pane"], ["gray_stained_glass_pane", "Gray Stained Glass Pane"], ["light_gray_stained_glass_pane", "Light Gray Stained Glass Pane"], ["cyan_stained_glass_pane", "Cyan Stained Glass Pane"], ["purple_stained_glass_pane", "Purple Stained Glass Pane"], ["blue_stained_glass_pane", "Blue Stained Glass Pane"], ["brown_stained_glass_pane", "Brown Stained Glass Pane"], ["green_stained_glass_pane", "Green Stained Glass Pane"], ["red_stained_glass_pane", "Red Stained Glass Pane"], ["black_stained_glass_pane", "Black Stained Glass Pane"], ["melon", "Melon"], ["pumpkin_stem", "Pumpkin Stem"], ["melon_stem", "Melon Stem"], ["attached_pumpkin_stem", "Attached Pumpkin Stem"], ["attached_melon_stem", "Attached Melon Stem"], ["vine", "Vines"], ["oak_fence_gate", "Oak Fence Gate"], ["brick_stairs", "Brick Stairs"], ["stone_brick_stairs", "Stone Brick Stairs"], ["mycelium", "Mycelium"], ["lily_pad", "Lily Pad"], ["nether_bricks", "Nether Brick"], ["nether_brick_fence", "Nether Brick Fence"], ["nether_brick_stairs", "Nether Brick Stairs"], ["end_stone_bricks", "End Stone Bricks"], ["nether_wart", "Nether Wart"], ["enchanting_table", "Enchantment Table"], ["brewing_stand", "Brewing Stand"], ["cauldron", "Cauldron"], ["end_portal_frame", "End Portal Frame"], ["end_portal", "End Portal"], ["end_stone", "End Stone"], ["dragon_egg", "Dragon Egg"], ["redstone_lamp", "Redstone Lamp"], ["purpur_slab", "Purpur Slab"], ["oak_slab", "Oak Slab"], ["spruce_slab", "Spruce Slab"], ["birch_slab", "Birch Slab"], ["jungle_slab", "Jungle Slab"], ["acacia_slab", "Acacia Slab"], ["dark_oak_slab", "Dark Oak Slab"], ["sandstone_slab", "Sandstone Slab"], ["petrified_oak_slab", "Petrified Oak Slab"], ["cobblestone_slab", "Cobblestone Slab"], ["brick_slab", "Bricks Slab"], ["stone_brick_slab", "Stone Bricks Slab"], ["nether_brick_slab", "Nether Bricks Slab"], ["quartz_slab", "Quartz Slab"], ["red_sandstone_slab", "Red Sandstone Slab"], ["smooth_red_sandstone", "Smooth Red Sandstone"], ["smooth_stone", "Smooth Stone"], ["smooth_sandstone", "Smooth Sandstone"], ["smooth_quartz", "Smooth Quartz"], ["cocoa", "Cocoa"], ["sandstone_stairs", "Sandstone Stairs"], ["emerald_ore", "Emerald Ore"], ["ender_chest", "Ender Chest"], ["tripwire_hook", "Tripwire Hook"], ["tripwire", "Tripwire"], ["emerald_block", "Block of Emerald"], ["spruce_stairs", "Spruce Wood Stairs"], ["birch_stairs", "Birch Wood Stairs"], ["jungle_stairs", "Jungle Wood Stairs"], ["command_block", "Command Block"], ["beacon", "Beacon"], ["cobblestone_wall", "Cobblestone Wall"], ["mossy_cobblestone_wall", "Mossy Cobblestone Wall"], ["flower_pot", "Flower Pot"], ["potted_poppy", "Potted Poppy"], ["potted_dandelion", "Potted Dandelion"], ["potted_oak_sapling", "Potted Oak Sapling"], ["potted_spruce_sapling", "Potted Spruce Sapling"], ["potted_birch_sapling", "Potted Birch Sapling"], ["potted_jungle_sapling", "Potted Jungle Sapling"], ["potted_red_mushroom", "Potted Red Mushroom"], ["potted_brown_mushroom", "Potted Brown Mushroom"], ["potted_cactus", "Potted Cactus"], ["potted_dead_bush", "Potted Dead Bush"], ["potted_fern", "Potted Fern"], ["potted_acacia_sapling", "Potted Acacia Sapling"], ["potted_dark_oak_sapling", "Potted Dark Oak Sapling"], ["potted_blue_orchid", "Potted Blue Orchid"], ["potted_allium", "Potted Allium"], ["potted_azure_bluet", "Potted Azure Bluet"], ["potted_red_tulip", "Potted Red Tulip"], ["potted_orange_tulip", "Potted Orange Tulip"], ["potted_white_tulip", "Potted White Tulip"], ["potted_pink_tulip", "Potted Pink Tulip"], ["potted_oxeye_daisy", "Potted Oxeye Daisy"], ["carrots", "Carrot"], ["potatoes", "Potato"], ["oak_button", "Oak Button"], ["spruce_button", "Spruce Button"], ["birch_button", "Birch Button"], ["jungle_button", "Jungle Button"], ["acacia_button", "Acacia Button"], ["dark_oak_button", "Dark Oak Button"], ["oak_trapdoor", "Oak Trapdoor"], ["spruce_trapdoor", "Spruce Trapdoor"], ["birch_trapdoor", "Birch Trapdoor"], ["jungle_trapdoor", "Jungle Trapdoor"], ["acacia_trapdoor", "Acacia Trapdoor"], ["dark_oak_trapdoor", "Dark Oak Trapdoor"], ["skeleton_skull", "Skeleton Skull"], ["skeleton_wall_skull", "Skeleton Wall Skull"], ["wither_skeleton_skull", "Wither Skeleton Skull"], ["wither_skeleton_wall_skull", "Wither Skeleton Wall Skull"], ["zombie_head", "Zombie Head"], ["zombie_wall_head", "Zombie Wall Head"], ["player_head", "Player Head"], ["player_wall_head", "Player Wall Head"], ["creeper_head", "Creeper Head"], ["creeper_wall_head", "Creeper Wall Head"], ["dragon_head", "Dragon Head"], ["dragon_wall_head", "Dragon Wall Head"], ["anvil", "Anvil"], ["chipped_anvil", "Chipped Anvil"], ["damaged_anvil", "Damaged Anvil"], ["trapped_chest", "Trapped Chest"], ["light_weighted_pressure_plate", "Light Weighted Pressure Plate"], ["heavy_weighted_pressure_plate", "Heavy Weighted Pressure Plate"], ["comparator", "Redstone Comparator"], ["daylight_detector", "Daylight Sensor"], ["redstone_block", "Block of Redstone"], ["nether_quartz_ore", "Nether Quartz Ore"], ["hopper", "Hopper"], ["quartz_block", "Block of Quartz"], ["chiseled_quartz_block", "Chiseled Quartz Block"], ["quartz_pillar", "Quartz Pillar"], ["quartz_stairs", "Quartz Stairs"], ["activator_rail", "Activator Rail"], ["dropper", "Dropper"], ["acacia_stairs", "Acacia Wood Stairs"], ["dark_oak_stairs", "Dark Oak Wood Stairs"], ["slime_block", "Slime Block"], ["barrier", "Barrier"], ["iron_trapdoor", "Iron Trapdoor"], ["prismarine", "Prismarine"], ["prismarine_bricks", "Prismarine Bricks"], ["dark_prismarine", "Dark Prismarine"], ["prismarine_slab", "Prismarine Slab"], ["prismarine_bricks_slab", "Prismarine Bricks Slab"], ["dark_prismarine_slab", "Dark Prismarine Slab"], ["sea_lantern", "Sea Lantern"], ["hay_block", "Hay Bale"], ["white_carpet", "White Carpet"], ["orange_carpet", "Orange Carpet"], ["magenta_carpet", "Magenta Carpet"], ["light_blue_carpet", "Light Blue Carpet"], ["yellow_carpet", "Yellow Carpet"], ["lime_carpet", "Lime Carpet"], ["pink_carpet", "Pink Carpet"], ["gray_carpet", "Gray Carpet"], ["light_gray_carpet", "Light Gray Carpet"], ["cyan_carpet", "Cyan Carpet"], ["purple_carpet", "Purple Carpet"], ["blue_carpet", "Blue Carpet"], ["brown_carpet", "Brown Carpet"], ["green_carpet", "Green Carpet"], ["red_carpet", "Red Carpet"], ["black_carpet", "Black Carpet"], ["terracotta", "Terracotta"], ["white_terracotta", "White Terracotta"], ["orange_terracotta", "Orange Terracotta"], ["magenta_terracotta", "Magenta Terracotta"], ["light_blue_terracotta", "Light Blue Terracotta"], ["yellow_terracotta", "Yellow Terracotta"], ["lime_terracotta", "Lime Terracotta"], ["pink_terracotta", "Pink Terracotta"], ["gray_terracotta", "Gray Terracotta"], ["light_gray_terracotta", "Light Gray Terracotta"], ["cyan_terracotta", "Cyan Terracotta"], ["purple_terracotta", "Purple Terracotta"], ["blue_terracotta", "Blue Terracotta"], ["brown_terracotta", "Brown Terracotta"], ["green_terracotta", "Green Terracotta"], ["red_terracotta", "Red Terracotta"], ["black_terracotta", "Black Terracotta"], ["coal_block", "Block of Coal"], ["packed_ice", "Packed Ice"], ["frosted_ice", "Frosted Ice"], ["sunflower", "Sunflower"], ["lilac", "Lilac"], ["tall_grass", "Double Tallgrass"], ["large_fern", "Large Fern"], ["rose_bush", "Rose Bush"], ["peony", "Peony"], ["white_banner", "White Banner"], ["orange_banner", "Orange Banner"], ["magenta_banner", "Magenta Banner"], ["light_blue_banner", "Light Blue Banner"], ["yellow_banner", "Yellow Banner"], ["lime_banner", "Lime Banner"], ["pink_banner", "Pink Banner"], ["gray_banner", "Gray Banner"], ["light_gray_banner", "Light Gray Banner"], ["cyan_banner", "Cyan Banner"], ["purple_banner", "Purple Banner"], ["blue_banner", "Blue Banner"], ["brown_banner", "Brown Banner"], ["green_banner", "Green Banner"], ["red_banner", "Red Banner"], ["black_banner", "Black Banner"], ["white_wall_banner", "White Wall Banner"], ["orange_wall_banner", "Orange Wall Banner"], ["magenta_wall_banner", "Magenta Wall Banner"], ["light_blue_wall_banner", "Light Blue Wall Banner"], ["yellow_wall_banner", "Yellow Wall Banner"], ["lime_wall_banner", "Lime Wall Banner"], ["pink_wall_banner", "Pink Wall Banner"], ["gray_wall_banner", "Gray Wall Banner"], ["light_gray_wall_banner", "Light Gray Wall Banner"], ["cyan_wall_banner", "Cyan Wall Banner"], ["purple_wall_banner", "Purple Wall Banner"], ["blue_wall_banner", "Blue Wall Banner"], ["brown_wall_banner", "Brown Wall Banner"], ["green_wall_banner", "Green Wall Banner"], ["red_wall_banner", "Red Wall Banner"], ["black_wall_banner", "Black Wall Banner"], ["red_sandstone", "Red Sandstone"], ["chiseled_red_sandstone", "Chiseled Red Sandstone"], ["cut_red_sandstone", "Cut Red Sandstone"], ["red_sandstone_stairs", "Red Sandstone Stairs"], ["spruce_fence_gate", "Spruce Fence Gate"], ["birch_fence_gate", "Birch Fence Gate"], ["jungle_fence_gate", "Jungle Fence Gate"], ["dark_oak_fence_gate", "Dark Oak Fence Gate"], ["acacia_fence_gate", "Acacia Fence Gate"], ["spruce_fence", "Spruce Fence"], ["birch_fence", "Birch Fence"], ["jungle_fence", "Jungle Fence"], ["dark_oak_fence", "Dark Oak Fence"], ["acacia_fence", "Acacia Fence"], ["spruce_door", "Spruce Door"], ["birch_door", "Birch Door"], ["jungle_door", "Jungle Door"], ["acacia_door", "Acacia Door"], ["dark_oak_door", "Dark Oak Door"], ["chorus_flower", "Chorus Flower"], ["chorus_plant", "Chorus Plant"], ["end_gateway", "End Gateway"], ["end_rod", "End Rod"], ["end_bricks", "End Stone Bricks"], ["purpur_block", "Purpur Block"], ["purpur_pillar", "Purpur Pillar"], ["purpur_stairs", "Purpur Stairs"], ["structure_block", "Structure Block"], ["structure_void", "Structure Void"], ["beetroots", "Beetroots"], ["grass_path", "Grass Path"], ["repeating_command_block", "Repeating Command Block"], ["chain_command_block", "Chain Command Block"], ["red_nether_bricks", "Red Nether Bricks"], ["nether_wart_block", "Nether Wart Block"], ["bone_block", "Bone Block"], ["magma_block", "Magma Block"], ["observer", "Observer"], ["shulker_box", "Shulker Box"], ["white_shulker_box", "White Shulker Box"], ["orange_shulker_box", "Orange Shulker Box"], ["magenta_shulker_box", "Magenta Shulker Box"], ["light_blue_shulker_box", "Light Blue Shulker Box"], ["yellow_shulker_box", "Yellow Shulker Box"], ["lime_shulker_box", "Lime Shulker Box"], ["pink_shulker_box", "Pink Shulker Box"], ["gray_shulker_box", "Gray Shulker Box"], ["light_gray_shulker_box", "Light Gray Shulker Box"], ["cyan_shulker_box", "Cyan Shulker Box"], ["purple_shulker_box", "Purple Shulker Box"], ["blue_shulker_box", "Blue Shulker Box"], ["brown_shulker_box", "Brown Shulker Box"], ["green_shulker_box", "Green Shulker Box"], ["red_shulker_box", "Red Shulker Box"], ["black_shulker_box", "Black Shulker Box"], ["white_concrete", "White Concrete"], ["orange_concrete", "Orange Concrete"], ["magenta_concrete", "Magenta Concrete"], ["light_blue_concrete", "Light Blue Concrete"], ["yellow_concrete", "Yellow Concrete"], ["lime_concrete", "Lime Concrete"], ["pink_concrete", "Pink Concrete"], ["gray_concrete", "Gray Concrete"], ["light_gray_concrete", "Light Gray Concrete"], ["cyan_concrete", "Cyan Concrete"], ["purple_concrete", "Purple Concrete"], ["blue_concrete", "Blue Concrete"], ["brown_concrete", "Brown Concrete"], ["green_concrete", "Green Concrete"], ["red_concrete", "Red Concrete"], ["black_concrete", "Black Concrete"], ["white_concrete_powder", "White Concrete Powder"], ["orange_concrete_powder", "Orange Concrete Powder"], ["magenta_concrete_powder", "Magenta Concrete Powder"], ["light_blue_concrete_powder", "Light Blue Concrete Powder"], ["yellow_concrete_powder", "Yellow Concrete Powder"], ["lime_concrete_powder", "Lime Concrete Powder"], ["pink_concrete_powder", "Pink Concrete Powder"], ["gray_concrete_powder", "Gray Concrete Powder"], ["light_gray_concrete_powder", "Light Gray Concrete Powder"], ["cyan_concrete_powder", "Cyan Concrete Powder"], ["purple_concrete_powder", "Purple Concrete Powder"], ["blue_concrete_powder", "Blue Concrete Powder"], ["brown_concrete_powder", "Brown Concrete Powder"], ["green_concrete_powder", "Green Concrete Powder"], ["red_concrete_powder", "Red Concrete Powder"], ["black_concrete_powder", "Black Concrete Powder"], ["white_glazed_terracotta", "White Glazed Terracotta"], ["orange_glazed_terracotta", "Orange Glazed Terracotta"], ["magenta_glazed_terracotta", "Magenta Glazed Terracotta"], ["light_blue_glazed_terracotta", "Light Blue Glazed Terracotta"], ["yellow_glazed_terracotta", "Yellow Glazed Terracotta"], ["lime_glazed_terracotta", "Lime Glazed Terracotta"], ["pink_glazed_terracotta", "Pink Glazed Terracotta"], ["gray_glazed_terracotta", "Gray Glazed Terracotta"], ["light_gray_glazed_terracotta", "Light Gray Glazed Terracotta"], ["cyan_glazed_terracotta", "Cyan Glazed Terracotta"], ["purple_terracotta", "Purple Glazed Terracotta"], ["blue_glazed_terracotta", "Blue Glazed Terracotta"], ["brown_glazed_terracotta", "Pink Glazed Terracotta"], ["green_glazed_terracotta", "Green Glazed Terracotta"], ["red_glazed_terracotta", "Red Glazed Terracotta"], ["black_glazed_terracotta", "Black Glazed Terracotta"], ["prismarine_stairs", "Prismarine Stairs"], ["prismarine_bricks_stairs", "Prismarine Brick Stairs"], ["dark_prismarine_stairs", "Dark Prismarine Stairs"], ["kelp", "Kelp"], ["dried_kelp_block", "Dried Kelp Block"], ["seagrass", "Seagrass"], ["tube_coral", "Tube Coral Plant (Blue)"], ["brain_coral", "Brain Coral Plant (Pink)"], ["bubble_coral", "Bubble Coral Plant (Purple)"], ["fire_coral", "Fire Coral Plant (Red)"], ["horn_coral", "Horn Coral Plant (Yellow)"], ["tube_coral_block", "Tube Coral Block(Blue)"], ["brain_coral_block", "Brain Coral Block (Pink)"], ["bubble_coral_block", "Bubble Coral Block (Purple)"], ["fire_coral_block", "Fire Coral Block (Red)"], ["horn_coral_block", "Horn Coral Block (Yellow)"], ["dead_tube_coral_block", "Dead Tube Coral Block"], ["dead_brain_coral_block", "Dead Brain Coral Block"], ["dead_bubble_coral_block", "Dead Bubble Coral Block"], ["dead_fire_coral_block", "Dead Fire Coral Block"], ["dead_horn_coral_block", "Dead Horn Coral Block"], ["dead_tube_coral", "Dead Tube Coral"], ["dead_brain_coral", "Dead Brain Coral"], ["dead_bubble_coral", "Dead Bubble Coral"], ["dead_fire_coral", "Dead Fire Coral"], ["dead_horn_coral", "Dead Horn Coral"], ["dead_tube_coral_fan", "Dead Tube Coral Fan"], ["dead_brain_coral_fan", "Dead Brain Coral Fan"], ["dead_bubble_coral_fan", "Dead Bubble Coral Fan"], ["dead_fire_coral_fan", "Dead Fire Coral Fan"], ["dead_horn_coral_fan", "Dead Horn Coral Fan"], ["tube_coral_fan", "Tube Coral Fan (Blue)"], ["brain_coral_fan", "Brain Coral Fan (Pink)"], ["bubble_coral_fan", "Bubble Coral Fan (Purple)"], ["fire_coral_fan", "Fire Coral Fan (Red)"], ["horn_coral_fan", "Horn Coral Fan (Yellow)"], ["dead_tube_coral_wall_fan", "Dead Tube Coral Wall Fan"], ["dead_brain_coral_wall_fan", "Dead Brain Coral Wall Fan"], ["dead_bubble_coral_wall_fan", "Dead Bubble Coral Wall Fan"], ["dead_fire_coral_wall_fan", "Dead Fire Coral Wall Fan"], ["dead_horn_coral_wall_fan", "Dead Horn Coral Wall Fan"], ["tube_coral_wall_fan", "Tube Coral Wall Fan (Blue)"], ["brain_coral_wall_fan", "Brain Coral Wall Fan (Pink)"], ["bubble_coral_wall_fan", "Bubble Wall Coral Fan (Purple)"], ["fire_coral_wall_fan", "Fire Coral Wall Fan (Red)"], ["horn_coral_wall_fan", "Horn Coral Wall Fan (Yellow)"], ["sea_pickle", "Sea Pickle"], ["conduit", "Conduit"], ["blue_ice", "Blue Ice"], ["turtle_egg", "Turtle Egg"], ["nether_portal", "Nether Portal"], ["bamboo", "Bamboo"], ["bamboo_sapling", "Bamboo Sapling"], ["potted_bamboo", "Potted Bamboo"], ["oak_sign", "Oak Sign"], ["spruce_sign", "Spruce Sign"], ["birch_sign", "Birch Sign"], ["jungle_sign", "Jungle Sign"], ["acacia_sign", "Acacia Sign"], ["dark_oak_sign", "Dark Oak Sign"], ["oak_wall_sign", "Oak Wall Sign"], ["spruce_wall_sign", "Spruce Wall Sign"], ["birch_wall_sign", "Birch Wall Sign"], ["jungle_wall_sign", "Jungle Wall Sign"], ["acacia_wall_sign", "Acacia Wall Sign"], ["dark_oak_wall_sign", "Dark Oak Wall Sign"], ["brick_wall", "Brick Wall"], ["prismarine_wall", "Prismarine Wall"], ["red_sandstone_wall", "Red Sandstone Wall"], ["mossy_stone_brick_wall", "Mossy Stone Brick Wall"], ["stone_brick_wall", "Stone Brick Wall"], ["nether_brick_wall", "Nether Brick Wall"], ["andesite_wall", "Andesite Wall"], ["granite_wall", "Granite Wall"], ["diorite_wall", "Diorite Wall"], ["end_stone_brick_wall", "End Stone Brick Wall"], ["sandstone_wall", "Sandstone Wall"], ["red_nether_brick_wall", "Red Nether Brick Wall"], ["stone_stairs", "Stone Stairs"], ["granite_stairs", "Granite Stairs"], ["polished_granite_stairs", "Polished Granite Stairs"], ["diorite_stairs", "Diorite Stairs"], ["polished_diorite_stairs", "Polished Diorite Stairs"], ["andesite_stairs", "Andesite Stairs"], ["polished_andesite_stairs", "Polished Andesite Stairs"], ["smooth_red_sandstone_stairs", "Smooth Red Sandstone Stairs"], ["smooth_quartz_stairs", "Smooth Quartz Stairs"], ["mossy_stone_brick_stairs", "Mossy Stone Brick Stairs"], ["end_stone_brick_stairs", "End Stone Brick Stairs"], ["red_nether_brick_stairs", "Red Nether Brick Stairs"], ["smooth_sandstone_stairs", "Smooth Sandstone Stairs"], ["mossy_cobblestone_stairs", "Mossy Cobblestone Stairs"], ["stone_slab", "Stone Slab"], ["smooth_stone_slab", "Smooth Stone Slab"], ["granite_slab", "Granite Slab"], ["polished_granite_slab", "Polished Granite Slab"], ["diorite_slab", "Diorite Slab"], ["polished_diorite_slab", "Polished Diorite Slab"], ["andesite_slab", "Andesite Slab"], ["polished_andesite_slab", "Polished Andesite Slab"], ["smooth_red_sandstone_slab", "Smooth Red Sandstone Slab"], ["smooth_quartz_slab", "Smooth Quartz Slab"], ["mossy_stone_brick_slab", "Mossy Stone Brick Slab"], ["end_stone_brick_slab", "End Stone Brick Slab"], ["red_nether_brick_slab", "Red Nether Brick Slab"], ["smooth_sandstone_slab", "Smooth Sandstone Slab"], ["mossy_cobblestone_slab", "Mossy Cobblestone Slab"], ["cornflower", "Cornflower"], ["lily_of_the_valley", "Lily of the Valley"], ["wither_rose", "Wither Rose"], ["loom", "Loom"], ["barrel", "Barrel"], ["bell", "Bell"], ["blast_furnace", "Blast Furnace"], ["smoker", "Smoker"], ["fletching_table", "Fletching Table"], ["smithing_table", "Smithing Table"], ["cartography_table", "Cartography Table"], ["stonecutter", "Stonecutter"], ["grindstone", "Grindstone"], ["lectern", "Lectern"], ["scaffolding", "Scaffolding"], ["lantern", "Lantern"], ["jigsaw", "Jigsaw Block"], ["sweet_berry_bush", "Sweet Berry Bush"], ["campfire", "Campfire"], ["composter", "Composter"], ["cut_red_sandstone_slab", "Cut Red Sandstone Slab"], ["cut_sandstone_slab", "Cut Sandstone Slab"], ["beehive", "Beehive"], ["bee_nest", "Bee Nest"], ["honey_block", "Honey Block"], ["honeycomb_block", "Honeycomb Block"], ["ancient_debris", "Ancient Debris"], ["netherite_block", "Netherite Block"], ["basalt", "Basalt"], ["nether_sprouts", "Nether Sprouts"], ["warped_wart_block", "Warped Wart Block"], ["weeping_vines", "Weeping Vines"], ["weeping_vines_plant", "Weeping Vines Plant"], ["shroomlight", "Shroomlight"], ["soul_soil", "Soul Soil"], ["soul_lantern", "Soul Lantern"], ["soul_torch", "Soul Torch"], ["warped_button", "Warped Button"], ["warped_door", "Warped Door"], ["warped_fence", "Warped Fence"], ["warped_fence_gate", "Warped Fence Gate"], ["warped_fungus", "Warped Fungus"], ["warped_nylium", "Warped Nylium"], ["warped_planks", "Warped Planks"], ["warped_pressure_plate", "Warped Pressure Plate"], ["warped_roots", "Warped Roots"], ["warped_sign", "Warped Sign"], ["warped_wall_sign", "Warped Wall Sign"], ["warped_slab", "Warped Slab"], ["warped_stairs", "Warped Stairs"], ["warped_stem", "Warped Stem"], ["warped_trapdoor", "Warped Trapdoor"], ["crimson_button", "Crimson Button"], ["crimson_door", "Crimson Door"], ["crimson_fence", "Crimson Fence"], ["crimson_fence_gate", "Crimson Fence Gate"], ["crimson_fungus", "Crimson Fungus"], ["crimson_nylium", "Crimson Nylium"], ["crimson_planks", "Crimson Planks"], ["crimson_pressure_plate", "Crimson Pressure Plate"], ["crimson_roots", "Crimson Roots"], ["crimson_sign", "Crimson Sign"], ["crimson_wall_sign", "Crimson Wall Sign"], ["crimson_slab", "Crimson Slab"], ["crimson_stairs", "Crimson Stairs"], ["crimson_stem", "Crimson Stem"], ["crimson_trapdoor", "Crimson Trapdoor"], ["stripped_crimson_stem", "Stripped Crimson Stem"], ["stripped_warped_stem", "Stripped Warped Stem"], ["target", "Target"], ["crying_obsidian", "Crying Obsidian"], ["potted_crimson_fungus", "Potted Crimson Fungus"], ["potted_crimson_roots", "Potted Crimson Roots"], ["potted_warped_fungus", "Potted Warped Fungus"], ["potted_warped_roots", "Potted Warped Roots"], ["stripped_warped_hyphae", "Stripped Warped Hyphae"], ["stripped_crimson_hyphae", "Stripped Crimson Hyphae"], ["warped_hyphae", "Warped Hyphae"], ["crimson_hyphae", "Crimson Hyphae"], ["twisting_vines", "Twisting Vines"], ["twisting_vines_plant", "Twisting Vines Plant"], ["nether_gold_ore", "Nether Gold Ore"], ["respawn_anchor", "Respawn Anchor"], ["polished_basalt", "Polished Basalt"], ["lodestone", "Lodestone"], ["blackstone", "Blackstone"], ["blackstone_slab", "Blackstone Slab"], ["blackstone_stairs", "Blackstone Stairs"], ["blackstone_wall", "Blackstone Wall"], ["chiseled_polished_blackstone", "Chiseled Polished Blackstone"], [ "cracked_polished_blackstone_bricks", "Cracked Polished Blackstone Bricks", ], ["gilded_blackstone", "Gilded Blackstone"], ["polished_blackstone", "Polished Blackstone"], ["polished_blackstone_brick_slab", "Polished Blackstone Brick Slab"], [ "polished_blackstone_brick_stairs", "Polished Blackstone Brick Stairs", ], ["polished_blackstone_brick_wall", "Polished Blackstone Brick Wall"], ["polished_blackstone_bricks", "Polished Blackstone Bricks"], ["polished_blackstone_button", "Polished Blackstone Button"], [ "polished_blackstone_pressure_plate", "Polished Blackstone Pressure Plate", ], ["polished_blackstone_slab", "Polished Blackstone Slab"], ["polished_blackstone_stairs", "Polished Blackstone Stairs"], ["polished_blackstone_wall", "Polished Blackstone Wall"], ["chiseled_nether_bricks", "Chiseled Nether Bricks"], ["cracked_nether_bricks", "Cracked Nether Bricks"], ["quartz_bricks", " Quartz Bricks"], ["soul_campfire", "Soul Campfire"], ["chain", "Chain"], ], blockStates = { standing_banner: { rotation: standingSignBanner }, carved_pumpkin: { facing: nsweName }, jack_o_lantern: { facing: nsweName }, white_banner: { rotation: standingSignBanner }, orange_banner: { rotation: standingSignBanner }, magenta_banner: { rotation: standingSignBanner }, light_blue_banner: { rotation: standingSignBanner }, yellow_banner: { rotation: standingSignBanner }, lime_banner: { rotation: standingSignBanner }, pink_banner: { rotation: standingSignBanner }, gray_banner: { rotation: standingSignBanner }, light_gray_banner: { rotation: standingSignBanner }, cyan_banner: { rotation: standingSignBanner }, purple_banner: { rotation: standingSignBanner }, blue_banner: { rotation: standingSignBanner }, brown_banner: { rotation: standingSignBanner }, green_banner: { rotation: standingSignBanner }, red_banner: { rotation: standingSignBanner }, black_banner: { rotation: standingSignBanner }, white_wall_banner: { facing: nsweName }, orange_wall_banner: { facing: nsweName }, magenta_wall_banner: { facing: nsweName }, light_blue_wall_banner: { facing: nsweName }, yellow_wall_banner: { facing: nsweName }, lime_wall_banner: { facing: nsweName }, pink_wall_banner: { facing: nsweName }, gray_wall_banner: { facing: nsweName }, light_gray_wall_banner: { facing: nsweName }, cyan_wall_banner: { facing: nsweName }, purple_wall_banner: { facing: nsweName }, blue_wall_banner: { facing: nsweName }, brown_wall_banner: { facing: nsweName }, green_wall_banner: { facing: nsweName }, red_wall_banner: { facing: nsweName }, black_wall_banner: { facing: nsweName }, loom: { facing: nsweName }, note_block: { powered: [!1, !0], instrument: [ "banjo", "basedrum", "bass", "bell", "bit", "chime", "cow_bell", "didgeridoo", "flute", "guitar", "harp", "hat", "iron_xylophone", "pling", "snare", "xylophone", ], note: [ [0, "octave 1 F♯/G♭"], [1, "octave 1 G"], [2, "octave 1 G♯/A♭"], [3, "octave 1 A"], [4, "octave 1 A♯/B♭"], [5, "octave 1 B"], [6, "octave 1 C"], [7, "octave 1 C♯/D♭"], [8, "octave 1 D"], [9, "octave 1 D♯/E♭"], [10, "octave 1 E"], [11, "octave 1 F"], [12, "octave 2 F♯/G♭"], [13, "octave 2 G"], [14, "octave 2 G♯/A♭"], [15, "octave 2 A"], [16, "octave 2 A#/B♭"], [17, "octave 2 B"], [18, "octave 2 C"], [19, "octave 2 C♯/D♭"], [20, "octave 2 D"], [21, "octave 2 D♯/E♭"], [22, "octave 2 E"], [23, "octave 2 F"], [24, "octave 2 F♯/G♭"], ], }, redstone_ore: { lit: [!1, !0] }, white_bed: bedOptions, orange_bed: bedOptions, magenta_bed: bedOptions, light_blue_bed: bedOptions, yellow_bed: bedOptions, lime_bed: bedOptions, pink_bed: bedOptions, gray_bed: bedOptions, light_gray_bed: bedOptions, cyan_bed: bedOptions, purple_bed: bedOptions, blue_bed: bedOptions, brown_bed: bedOptions, green_bed: bedOptions, red_bed: bedOptions, black_bed: bedOptions, tube_coral_wall_fan: { facing: nsweName }, brain_coral_wall_fan: { facing: nsweName }, bubble_coral_wall_fan: { facing: nsweName }, fire_coral_wall_fan: { facing: nsweName }, horn_coral_wall_fan: { facing: nsweName }, dead_tube_coral_wall_fan: { facing: nsweName }, dead_brain_coral_wall_fan: { facing: nsweName }, dead_bubble_coral_wall_fan: { facing: nsweName }, dead_fire_coral_wall_fan: { facing: nsweName }, dead_horn_coral_wall_fan: { facing: nsweName }, sea_pickle: { pickles: [1, 2, 3, 4], waterlogged: [!1, !0] }, cobblestone_wall: wallBS, mossy_cobblestone_wall: wallBS, brick_wall: wallBS, prismarine_wall: wallBS, red_sandstone_wall: wallBS, mossy_stone_brick_wall: wallBS, stone_brick_wall: wallBS, nether_brick_wall: wallBS, andesite_wall: wallBS, diorite_wall: wallBS, granite_wall: wallBS, end_stone_brick_wall: wallBS, sandstone_wall: wallBS, red_nether_brick_wall: wallBS, beetroots: { age: [0, 1, 2, 3] }, bone_block: { axis: ["x", "y", "z"] }, brewing_stand: { has_bottle_0: [!1, !0], has_bottle_1: [!1, !0], has_bottle_2: [!1, !0], }, stone_button: { facing: nsweName, face: ["ceiling", "wall", "floor"] }, redstone_lamp: { lit: [!1, !0] }, oak_button: buttonsBS, acacia_button: buttonsBS, jungle_button: buttonsBS, birch_button: buttonsBS, dark_oak_button: buttonsBS, spruce_button: buttonsBS, cactus: { age: cactusReeds }, cake: { bites: [0, 1, 2, 3, 4, 5] }, carrot: { age: [0, 1, 2, 3, 4, 5, 6, 7] }, chest: { facing: nsweName, type: ["single", "left", "right"] }, trapped_chest: { facing: nsweName, type: ["single", "left", "right"] }, ender_chest: { facing: nsweName }, chorus_flower: { age: [0, 1, 2, 3, 4, 5] }, chorus_plant: { north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], up: [!1, !0], down: [!1, !0], }, cocoa: { age: [0, 1, 2], facing: nsweName }, tnt: { unstable: [!1, !0] }, command_block: { conditional: [!1, !0], facing: nsewudName }, chain_command_block: { conditional: [!1, !0], facing: nsewudName }, repeating_command_block: { conditional: [!1, !0], facing: nsewudName }, daylight_detector: { inverted: [!1, !0] }, dispenser: { facing: nsewudName, triggered: [!1, !0] }, iron_door: doorBS, oak_door: doorBS, spruce_door: doorBS, birch_door: doorBS, jungle_door: doorBS, acacia_door: doorBS, dark_oak_door: doorBS, dropper: { facing: nsewudName, triggered: [!1, !0] }, end_portal_frame: { facing: nsweName, eye: [!1, !0] }, end_rod: { facing: nsweName, eye: [!1, !0] }, farmland: { moisture: [0, 1, 2, 3, 4, 5, 6, 7] }, oak_fence: fenceBS, spruce_fence: fenceBS, birch_fence: fenceBS, jungle_fence: fenceBS, acacia_fence: fenceBS, dark_oak_fence: fenceBS, nether_brick_fence: fenceBS, oak_fence_gate: fenceGateBS, spruce_fence_gate: fenceGateBS, birch_fence_gate: fenceGateBS, jungle_fence_gate: fenceGateBS, acacia_fence_gate: fenceGateBS, dark_oak_fence_gate: fenceGateBS, fire: { age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], up: [!1, !0], north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], }, frosted_ice: { age: [0, 1, 2, 3] }, furnace: { facing: nsweName, lit: [!1, !0] }, glass_pane: fenceBS, white_stained_glass_pane: fenceBS, orange_stained_glass_pane: fenceBS, magenta_stained_glass_pane: fenceBS, light_blue_stained_glass_pane: fenceBS, yellow_stained_glass_pane: fenceBS, lime_stained_glass_pane: fenceBS, pink_stained_glass_pane: fenceBS, gray_stained_glass_pane: fenceBS, light_gray_stained_glass_pane: fenceBS, cyan_stained_glass_pane: fenceBS, purple_stained_glass_pane: fenceBS, blue_stained_glass_pane: fenceBS, brown_stained_glass_pane: fenceBS, green_stained_glass_pane: fenceBS, red_stained_glass_pane: fenceBS, black_stained_glass_pane: fenceBS, white_glazed_terracotta: { facing: nsweName }, orange_glazed_terracotta: { facing: nsweName }, magenta_glazed_terracotta: { facing: nsweName }, light_blue_glazed_terracotta: { facing: nsweName }, yellow_glazed_terracotta: { facing: nsweName }, lime_glazed_terracotta: { facing: nsweName }, pink_glazed_terracotta: { facing: nsweName }, gray_glazed_terracotta: { facing: nsweName }, light_gray_glazed_terracotta: { facing: nsweName }, cyan_glazed_terracotta: { facing: nsweName }, purple_terracotta: { facing: nsweName }, blue_glazed_terracotta: { facing: nsweName }, brown_glazed_terracotta: { facing: nsweName }, green_glazed_terracotta: { facing: nsweName }, red_glazed_terracotta: { facing: nsweName }, black_glazed_terracotta: { facing: nsweName }, grass: { snowy: [!1, !0] }, hay_block: { axis: ["x", "y", "z"] }, nether_portal: { axis: ["x", "z"] }, hopper: { enabled: [!1, !0], facing: nsewdName }, iron_bars: fenceBS, lit_pumpkin: { facing: nsweName }, jukebox: { has_record: [!1, !0] }, ladder: { facing: nsweName }, lava: { level: [ [0, "0 Source"], [1, "1 Height "], [2, "2 Height"], [3, "3 Height"], [4, "4 Height"], [5, "5 Height"], [6, "6 Height"], [7, "7 Height"], [8, "8 Falling Lava"], [9, "9 Falling Lava"], [10, "10 Falling Lava"], [11, "11 Falling Lava"], [12, "12 Falling Lava"], [13, "13 Falling Lava"], [14, "14 Falling Lava"], [15, "15 Falling Lava"], ], }, lever: { facing: nsweName, face: ["ceiling", "wall", "floor"] }, brown_mushroom_block: { up: [!1, !0], down: [!1, !0], north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], }, red_mushroom_block: { up: [!1, !0], down: [!1, !0], north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], }, mushroom_stem: { up: [!1, !0], down: [!1, !0], north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], }, mycelium: { snowy: [!1, !0] }, nether_wart: { age: [0, 1, 2, 3] }, sticky_piston: { extended: [!1, !0], facing: nsewudName }, piston: { extended: [!1, !0], facing: nsewudName }, piston_head: { facing: nsewudName, short: [!1, !0], type: ["normal", "sticky"], }, piston_extension: { extended: [!1, !0], facing: nsewudName }, observer: { facing: nsewudName, powered: [!1, !0] }, potatoes: { age: [0, 1, 2, 3, 4, 5, 6, 7] }, stone_pressure_plate: { powered: [!1, !0] }, wooden_pressure_plate: { powered: [!1, !0] }, light_weighted_pressure_plate: { age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], }, heavy_weighted_pressure_plate: { age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], }, pumpkin_stem: { age: [0, 1, 2, 3, 4, 5, 6, 7] }, melon_stem: { age: [0, 1, 2, 3, 4, 5, 6, 7] }, attached_pumpkin_stem: { facing: nsweName }, attached_melon_stem: { facing: nsweName }, purpur_pillar: { axis: ["x", "y", "z"] }, quartz_pillar: { axis: ["x", "y", "z"] }, rail: { shape: [ "north_south", "east_west", "north_east", "north_west", "south_east", "south_west", "ascending_north", "ascending_south", "ascending_east", "ascending_west", ], }, activator_rail: { powered: [!1, !0], shape: [ "north_south", "east_west", "ascending_north", "ascending_south", "ascending_east", "ascending_west", ], }, golden_rail: { powered: [!1, !0], shape: [ "north_south", "east_west", "ascending_north", "ascending_south", "ascending_east", "ascending_west", ], }, detector_rail: { powered: [!1, !0], shape: [ "north_south", "east_west", "ascending_north", "ascending_south", "ascending_east", "ascending_west", ], }, powered_rail: { powered: [!1, !0], shape: [ "north_south", "east_west", "ascending_north", "ascending_south", "ascending_east", "ascending_west", ], }, redstone_wire: { north: ["none", "side", "up"], south: ["none", "side", "up"], east: ["none", "side", "up"], west: ["none", "side", "up"], power: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], }, repeater: { delay: [1, 2, 3, 4], facing: nsweName, locked: [!1, !0], powered: [!1, !0], }, comparator: { facing: nsweName, mode: ["compare", "subtract"], powered: [!1, !0], }, redstone_torch: { lit: [!1, !0] }, wall_torch: { facing: nsweName }, redstone_wall_torch: { facing: nsweName, lit: [!1, !0] }, sapling: { stage: [0, 1], type: ["oak", "spruce", "birch", "jungle", "acacia", "dark_oak"], }, white_shulker_box: { facing: nsewudName }, shulker_box: { facing: nsewudName }, orange_shulker_box: { facing: nsewudName }, magenta_shulker_box: { facing: nsewudName }, light_blue_shulker_box: { facing: nsewudName }, yellow_shulker_box: { facing: nsewudName }, lime_shulker_box: { facing: nsewudName }, pink_shulker_box: { facing: nsewudName }, gray_shulker_box: { facing: nsewudName }, light_gray_shulker_box: { facing: nsewudName }, cyan_shulker_box: { facing: nsewudName }, purple_shulker_box: { facing: nsewudName }, blue_shulker_box: { facing: nsewudName }, brown_shulker_box: { facing: nsewudName }, green_shulker_box: { facing: nsewudName }, red_shulker_box: { facing: nsewudName }, black_shulker_box: { facing: nsewudName }, oak_wall_sign: { facing: nsweName }, spruce_wall_sign: { facing: nsweName }, birch_wall_sign: { facing: nsweName }, jungle_wall_sign: { facing: nsweName }, acacia_wall_sign: { facing: nsweName }, dark_oak_wall_sign: { facing: nsweName }, oak_sign: { rotation: standingSignBanner }, spruce_sign: { rotation: standingSignBanner }, birch_sign: { rotation: standingSignBanner }, jungle_sign: { rotation: standingSignBanner }, acacia_sign: { rotation: standingSignBanner }, dark_oak_sign: { rotation: standingSignBanner }, skull: { facing: nsewudName, nodrop: [!1, !0] }, skeleton_wall_skull: { facing: nsweName }, wither_skeleton_wall_skull: { facing: nsweName }, zombie_wall_head: { facing: nsweName }, player_wall_head: { facing: nsweName }, creeper_wall_head: { facing: nsweName }, dragon_wall_head: { facing: nsweName }, skeleton_skull: { rotation: headRotate }, wither_skeleton_skull: { rotation: headRotate }, zombie_head: { rotation: headRotate }, player_head: { rotation: headRotate }, creeper_head: { rotation: headRotate }, dragon_head: { rotation: headRotate }, purpur_slab: slabTypes, oak_slab: slabTypes, spruce_slab: slabTypes, birch_slab: slabTypes, jungle_slab: slabTypes, acacia_slab: slabTypes, dark_oak_slab: slabTypes, stone_slab: slabTypes, sandstone_slab: slabTypes, petrified_oak_slab: slabTypes, cobblestone_slab: slabTypes, brick_slab: slabTypes, stone_brick_slab: slabTypes, nether_brick_slab: slabTypes, quartz_slab: slabTypes, red_sandstone_slab: slabTypes, smooth_stone_slab: slabTypes, smooth_red_sandstone_slab: slabTypes, smooth_sandstone_slab: slabTypes, smooth_quartz_slab: slabTypes, stone_slab: slabTypes, granite_slab: slabTypes, polished_granite_slab: slabTypes, diorite_slab: slabTypes, polished_diorite_slab: slabTypes, andesite_slab: slabTypes, polished_andesite_slab: slabTypes, smooth_red_sandstone_slab: slabTypes, smooth_quartz_slab: slabTypes, mossy_stone_brick_slab: slabTypes, end_stone_brick_slab: slabTypes, red_nether_brick_slab: slabTypes, smooth_sandstone_slab: slabTypes, mossy_cobblestone_slab: slabTypes, snow_layer: { layers: [1, 2, 3, 4, 5, 6, 7, 8] }, acacia_stairs: stairBlockState, stone_stairs: stairBlockState, birch_stairs: stairBlockState, brick_stairs: stairBlockState, dark_oak_stairs: stairBlockState, jungle_stairs: stairBlockState, nether_brick_stairs: stairBlockState, oak_stairs: stairBlockState, purpur_stairs: stairBlockState, quartz_stairs: stairBlockState, red_sandstone_stairs: stairBlockState, sandstone_stairs: stairBlockState, spruce_stairs: stairBlockState, stone_brick_stairs: stairBlockState, stone_stairs: stairBlockState, granite_stairs: stairBlockState, polished_granite_stairs: stairBlockState, diorite_stairs: stairBlockState, polished_diorite_stairs: stairBlockState, andesite_stairs: stairBlockState, polished_andesite_stairs: stairBlockState, smooth_red_sandstone_stairs: stairBlockState, smooth_quartz_stairs: stairBlockState, mossy_stone_brick_stairs: stairBlockState, end_stone_brick_stairs: stairBlockState, red_nether_brick_stairs: stairBlockState, smooth_sandstone_stairs: stairBlockState, mossy_cobblestone_stairs: stairBlockState, stonebrick: { variant: [ "stonebrick", "mossy_stonebrick", "cracked_stonebrick", "chiseled_stonebrick", ], }, structure_block: { mode: ["save", "load", "corner", "data"] }, reeds: { age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] }, iron_trapdoor: trapdoors, oak_trapdoor: trapdoors, acacia_trapdoor: trapdoors, spruce_trapdoor: trapdoors, jungle_trapdoor: trapdoors, birch_trapdoor: trapdoors, dark_oak_trapdoor: trapdoors, tripwire: { attached: [!1, !0], disarmed: [!1, !0], north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], powered: [!1, !0], }, tripwire_hook: { attached: [!1, !0], facing: nsweName, powered: [!1, !0], }, vine: { north: [!1, !0], south: [!1, !0], east: [!1, !0], west: [!1, !0], up: [!1, !0], }, water: { level: [ [0, "0 Source"], [1, "1 Height "], [2, "2 Height"], [3, "3 Height"], [4, "4 Height"], [5, "5 Height"], [6, "6 Height"], [7, "7 Height"], [8, "8 Falling Water"], [9, "9 Falling Water"], [10, "10 Falling Water"], [11, "11 Falling Water"], [12, "12 Falling Water"], [13, "13 Falling Water"], [14, "14 Falling Water"], [15, "15 Falling Water"], ], }, wheat: { age: [0, 1, 2, 3, 4, 5, 6, 7] }, oak_log: { axis: ["x", "y", "z"] }, acacia_log: { axis: ["x", "y", "z"] }, spruce_log: { axis: ["x", "y", "z"] }, birch_log: { axis: ["x", "y", "z"] }, jungle_log: { axis: ["x", "y", "z"] }, dark_oak_log: { axis: ["x", "y", "z"] }, stripped_oak_log: { axis: ["x", "y", "z"] }, stripped_acacia_log: { axis: ["x", "y", "z"] }, stripped_spruce_log: { axis: ["x", "y", "z"] }, stripped_birch_log: { axis: ["x", "y", "z"] }, stripped_jungle_log: { axis: ["x", "y", "z"] }, stripped_dark_oak_log: { axis: ["x", "y", "z"] }, stripped_oak_wood: { axis: ["x", "y", "z"] }, stripped_acacia_wood: { axis: ["x", "y", "z"] }, stripped_spruce_wood: { axis: ["x", "y", "z"] }, stripped_birch_wood: { axis: ["x", "y", "z"] }, stripped_jungle_wood: { axis: ["x", "y", "z"] }, stripped_dark_oak_wood: { axis: ["x", "y", "z"] }, oak_wood: { axis: ["x", "y", "z"] }, acacia_wood: { axis: ["x", "y", "z"] }, spruce_wood: { axis: ["x", "y", "z"] }, birch_wood: { axis: ["x", "y", "z"] }, jungle_wood: { axis: ["x", "y", "z"] }, dark_oak_wood: { axis: ["x", "y", "z"] }, barrel: { facing: nsewudName, open: [!1, !0] }, bell: { facing: nsweName, attachment: ["single_wall", "floor", "ceiling"], }, blast_furnace: { facing: nsweName, lit: [!1, !0] }, smoker: { facing: nsweName, lit: [!1, !0] }, lectern: { facing: nsweName, has_book: [!1, !0], powered: [!1, !0] }, grindstone: { facing: nsweName, face: ["floor", "ceiling", "wall"] }, jigsaw: { orientation: [ "down_east", "down_north", "down_south", "down_west", "up_east", "up_north", "up_south", "up_west", "east_up", "north_up", "south_up", "west_up", ], }, sweet_berry_bush: { age: [0, 1, 2, 3] }, campfire: { lit: [!1, !0], signal_fire: [!1, !0], waterlogged: [!1, !0], }, composter: { level: [0, 1, 2, 3, 4, 5, 6, 7, 8] }, cut_red_sandstone_slab: slabTypes, cut_sandstone_slab: slabTypes, cauldron: { level: [0, 1, 2, 3] }, bee_nest: { facing: nsweName, honey_level: [0, 1, 2, 3, 4, 5] }, beehive: { facing: nsweName, honey_level: [0, 1, 2, 3, 4, 5] }, basalt: { axis: ["x", "y", "z"] }, soul_lantern: { hanging: [!1, !0], waterlogged: [!1, !0] }, lantern: { hanging: [!1, !0], waterlogged: [!1, !0] }, soul_wall_torch: { facing: nsweName }, warped_button: { facing: nsweName, face: ["ceiling", "wall", "floor"] }, warped_door: doorBS, warped_fence: fenceBS, warped_fence_gate: fenceGateBS, warped_pressure_plate: { powered: [!1, !0] }, warped_wall_sign: { facing: nsweName }, warped_sign: { rotation: standingSignBanner }, warped_slab: slabTypes, warped_stairs: stairBlockState, warped_stem: { axis: ["x", "y", "z"] }, warped_trapdoor: trapdoors, crimson_button: { facing: nsweName, face: ["ceiling", "wall", "floor"], }, crimson_door: doorBS, crimson_fence: fenceBS, crimson_fence_gate: fenceGateBS, crimson_pressure_plate: { powered: [!1, !0] }, crimson_wall_sign: { facing: nsweName }, crimson_sign: { rotation: standingSignBanner }, crimson_slab: slabTypes, crimson_stairs: stairBlockState, crimson_stem: { axis: ["x", "y", "z"] }, crimson_trapdoor: trapdoors, stripped_crimson_stem: { axis: ["x", "y", "z"] }, stripped_warped_stem: { axis: ["x", "y", "z"] }, target: { power: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] }, stripped_warped_hyphae: { axis: ["x", "y", "z"] }, stripped_crimson_hyphae: { axis: ["x", "y", "z"] }, warped_hyphae: { axis: ["x", "y", "z"] }, crimson_hyphae: { axis: ["x", "y", "z"] }, twisting_vines: { age: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ], }, weeping_vines: { age: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, ], }, respawn_anchor: { charges: [0, 1, 2, 3, 4] }, polished_basalt: { axis: ["x", "y", "z"] }, blackstone_slab: slabTypes, blackstone_stairs: stairBlockState, blackstone_wall: wallBS, polished_blackstone_brick_slab: slabTypes, polished_blackstone_brick_stairs: stairBlockState, polished_blackstone_brick_wall: wallBS, polished_blackstone_button: { facing: nsweName, face: ["ceiling", "wall", "floor"], }, polished_blackstone_pressure_plate: { powered: [!1, !0] }, polished_blackstone_slab: slabTypes, polished_blackstone_stairs: stairBlockState, polished_blackstone_wall: wallBS, soul_campfire: { lit: [!1, !0], signal_fire: [!1, !0], waterlogged: [!1, !0], }, oak_leaves: leavesBS, spruce_leaves: leavesBS, birch_leaves: leavesBS, jungle_leaves: leavesBS, acacia_leaves: leavesBS, dark_oak_leaves: leavesBS, chain: { waterlogged: [!1, !0], axis: ["x", "y", "z"] }, }, unsetTrueFalse = [ [-1, "unset"], ["1", "True"], ["0", "False"], ], entities = [ "area_effect_cloud", "armor_stand", "arrow", "bat", "bee", "blaze", "boat", "cat", "cave_spider", "chest_minecart", "chicken", "cod", "command_block_minecart", "cow", "creeper", "dolphin", "donkey", "dragon_fireball", "drowned", "egg", "elder_guardian", "end_crystal", "ender_dragon", "ender_pearl", "enderman", "endermite", "evoker_fangs", "evoker", "experience_bottle", "experience_orb", "eye_of_ender", "falling_block", "fireball", "firework_rocket", "fishing_bobber", "fox", "furnace_minecart", "hopper_minecart", "ghast", "giant", "guardian", "hoglin", "horse", "husk", "illusioner", "iron_golem", "item", "item_frame", "leash_knot", "lightning_bolt", "llama", "llama_spit", "magma_cube", "minecart", "mooshroom", "mule", "ocelot", "painting", "panda", "parrot", "phantom", "pig", "piglin", "piglin_brute", "pillager", "polar_bear", "potion", "pufferfish", "rabbit", "ravager", "salmon", "sheep", "shulker", "shulker_bullet", "silverfish", "skeleton", "skeleton_horse", "slime", "small_fireball", "snowball", "snow_golem", "spawner_minecart", "spectral_arrow", "spider", "squid", "stray", "strider", "tnt", "tnt_minecart", "trader_llama", "trident", "tropical_fish", "turtle", "vex", "villager", "vindicator", "witch", "wandering_trader", "wither", "wither_skull", "wither_skeleton", "wolf", "zoglin", "zombie", "zombie_horse", "zombified_piglin", "zombie_villager", ], custNameColors = [ "unset", "white", "black", "dark_blue", "dark_green", "dark_aqua", "dark_red", "dark_purple", "gold", "gray", "dark_gray", "blue", "green", "aqua", "red", "light_purple", "yellow", "reset", ], entityIndex = 0, mouse = { x: 0, y: 0 }, currentCommand = "", tsScoreObjectiveCount = 0, processing = !1, formats = ["Bold", "Italic", "Underlined", "Strikethrough", "Obfuscated"], block = new Block("stone", {}), blocks = [], clipboard = ["", "", ""], cachedNBT = new CachedNBT(), deferJSONOutput = !1, deferOutput = !1, hasBlockData = []; function stripHTMLTags(e) { return ( new DOMParser().parseFromString(e, "text/html").body.textContent || "" ); } function showImport() { $("#commandInput").css({ top: mouse.y, left: mouse.x }), $("#commandInput").show(); } function showCommunity() { $("#intro").remove(), $("#community").show(), showSearch(); } function MCSException(e) { (this.value = e), (this.toString = function () { return this.value; }); } function getCustomNameAndColor(e, t) { var a = tellrawJson.getJsonForTellraw(e.substr(1) + t); return a.length ? ",CustomName:" + jsonConvert(JSON.stringify(a)) : ""; } function getCustomNameForBlock(e, t) { return $(e + t).val().length ? ',CustomName:"' + $(e + t).val() + '"' : ""; } function parseNBT(e, t) { (tsScoreObjectiveCount = 0), (deferOutput = !0); try { let t = null; try { (t = JSON.parse(e)), loadForm("loot_table"), importLootTable(t); } catch (e) {} if (null == t) { new CMDParser(e).parseTheCommand(e); } (deferOutput = !1), generateCommand(); } catch (e) { (deferOutput = !1), alertify.alert( "Your shipment of fail has arrived. ¯\\_(ツ)_/¯
" + e.toString() ), $("#disableOutput").prop("checked", !1); } } function logParseFail(e, t) { $.post( "mcstacker2.php", { op: "logParseFail", commandID: commandID, cmd: e, error: t }, function (e, t) {} ); } function baseCoords(e, t, a, o) { var n = " " + o + " " + e[0] + "" + makeTip(o, "coords") + "
" + e[1] + "
" + e[2] + ""; return ( null != a && (n += "
Relative Coordinates"), n ); } function makeCoords(e, t, a, o) { var n = " " + t + " Coordinates"; return ( null != a && (n += "~"), null != o && (n += "^"), (a || o) && (n += "C"), n + makeTip(t, "coords") ); } function prefixCoords(e, t) { for (var a = getCoordsString(e), o = 0; o < a.length; o++) "~" == t ? (a[o] = "~" + replaceAll("~", "", replaceAll("^", "", a[o]))) : "^" == t ? (a[o] = "^" + replaceAll("~", "", replaceAll("^", "", a[o]))) : "c" == t && (a[o] = replaceAll("~", "", replaceAll("^", "", a[o]))); $("#" + e).val(a[0] + " " + a[1] + " " + a[2]), -1 != e.indexOf("BlockNBT") ? -1 != e.indexOf("tellrawPane") ? tellrawUpdate(e.substr(0, e.indexOf("BlockNBT"))) : -1 != e.indexOf("BookPane") ? bookUpdate(e.substr(0, e.indexOf("BlockNBT"))) : -1 != e.indexOf("SignPane") && signUpdate(e.substr(0, e.indexOf("BlockNBT"))) : generateCommand(); } function loadEntityClass(e, t) { switch (e) { case "bat": return new Mob(t, e, { BatFlags: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "dolphin": return new Mob(t, e, { TreasurePosX: { type: "text", format: "int", tip: e, align: "R", }, TreasurePosY: { type: "text", format: "int", align: "R" }, TreasurePosZ: { type: "text", format: "int", align: "R" }, CanFindTreasure: { type: "choice", values: unsetTrueFalse, tip: e, format: "b", align: "R", }, }); case "pufferfish": return new Mob(t, e, { PuffState: { type: "choice", values: [ [-1, "unset"], ["0", "Deflated"], ["1", "Half Puffed"], ["2", "Fully Puffed"], ], format: "int", align: "R", }, }); case "cave_spider": case "elder_guardian": case "guardian": case "silverfish": case "skeleton": case "giant": case "spider": case "squid": case "stray": case "wither_skeleton": case "witch": case "cod": case "salmon": case "zoglin": case "blaze": return new Mob(t, e); case "bee": return new Bee(t, e); case "tropical_fish": return new tropical_fish(t, e); case "piglin": return new Piglin(t, e, { Inventory: { type: "multiitem", hide: !0, slotNumbers: !1, tip: e, }, IsBaby: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, IsImmuneToZombification: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, TimeInOverworld: { type: "ticks", tip: e, align: "R" }, CannotHunt: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "piglin_brute": return new Piglin(t, e, { IsImmuneToZombification: { type: "choice", values: unsetTrueFalse, format: "b", tip: "piglin", align: "R", }, TimeInOverworld: { type: "ticks", tip: "piglin", align: "R" }, }); case "husk": case "zombie": return new zombie(t, e, { DrownedConversionTime: { type: "ticks", tip: "zombie", align: "R", }, InWaterTime: { type: "ticks", tip: "zombie", align: "R" }, }); case "drowned": return new zombie(t, e); case "zombified_piglin": return new zombie(t, e, { AngerTime: { type: "ticks", tip: e, align: "R" }, AngryAt: { type: "UUIDArray", format: "special", align: "R", tip: e, }, }); case "zombie_villager": return new zombie(t, e, { ConversionTime: { type: "ticks", tip: e, align: "R" }, ConversionPlayer: { type: "UUIDArray", format: "intArray", align: "R", tip: e, }, profession: { type: "makeSelect", values: [ "unset", "none", "armorer", "butcher", "cartographer", "cleric", "farmer", "fisherman", "fletcher", "leatherworker", "librarian", "mason", "nitwit", "shepherd", "toolsmith", "weaponsmith", ], format: "special", tip: e, align: "R", }, type: { type: "makeSelect", values: [ "unset", "desert", "jungle", "plains", "savanna", "snow", "swamp", "taiga", ], format: "special", tip: "villager.type", align: "R", }, level: { type: "makeSelect", values: ["unset", 1, 2, 3, 4, 5, 99], format: "special", tip: "villager.level", align: "R", }, Trades: { type: "villTrade", format: "special", tip: "villager.Trades", align: "R", }, Memories: { type: "memories", format: "special", tip: "villager.memories", align: "R", }, Gossips: { type: "gossips", format: "special", tip: "villager.gossips", align: "R", }, NoTrades: { label: "Untradable", type: "cb", format: "special", tip: "villager.NoTrades", align: "R", }, }); case "area_effect_cloud": return new area_effect_cloud(t, e); case "armor_stand": return new armor_stand(t, e); case "trident": return new trident(t, e); case "arrow": case "spectral_arrow": return new arrow(t, e); case "illusioner": return new Mob(t, e, { Spellticks: { type: "ticks", tip: "evoker", align: "R" }, }); case "polar_bear": return new BreedableMob(t, e, { Aggro: { type: "choice", values: unsetTrueFalse, format: "b", align: "R", }, }); case "slime": return new Mob(t, e, { Size: { type: "text", format: "int", tip: e, align: "R" }, wasOnGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "magma_cube": return new Mob(t, e, { Size: { type: "text", format: "int", tip: "slime", align: "R" }, wasOnGround: { type: "choice", values: unsetTrueFalse, format: "b", tip: "slime", align: "R", }, }); case "dragon_fireball": case "wither_skull": case "small_fireball": return new small_fireball(t, e); case "fireball": return new fireball(t, e); case "firework_rocket": return new firework_rocket(t, e); case "phantom": return new Mob(t, e, { AX: { type: "text", format: "int", align: "R" }, AY: { type: "text", format: "int", align: "R" }, AZ: { type: "text", format: "int", align: "R" }, Size: { type: "text", format: "int", align: "R" }, }); case "enderman": return new enderman(t, e); case "pillager": return new pillager(t, e); case "ravager": return new pillager(t, e, { AttackTick: { type: "ticks", tip: e, align: "R" }, RoarTick: { type: "ticks", tip: e, align: "R" }, StunTick: { type: "ticks", tip: e, align: "R" }, }); case "endermite": return new Mob(t, e, { Lifetime: { type: "ticks", tip: e, align: "R" }, PlayerSpawned: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "ender_pearl": case "snowball": case "experience_bottle": case "egg": return new ThrownThings(t, e, { Item: { type: "itemselect", format: "special", hide: !1, tip: "projectile", align: "R", }, }); case "end_crystal": return new ender_crystal(t, e); case "ender_dragon": return new Mob(t, e, { DragonPhase: { type: "choice", values: [ [-1, "unset"], [1, "strafing(preparing to shoot a fireball)"], [2, "flying to the portal to land"], [3, "landing on the portal"], [4, "taking off from the portal"], [5, "landed, performing breath attack"], [6, "landed, looking for a player for breath attack"], [7, "landed, roar before beginning breath attack"], [8, "charging player"], [9, "flying to portal to die"], [10, "hovering with no AI (Default)"], ], format: "int", tip: e, align: "R", }, }); case "evoker_fangs": return new evoker_fangs(t, e); case "evoker": return new Mob(t, e, { SpellTicks: { type: "ticks", tip: e, align: "R" }, }); case "falling_block": return new falling_block(t, e); case "item": return new item(t, e); case "item_frame": return new item_frame(t, e); case "boat": return new Vehicle(t, e, { Type: { type: "makeSelect", values: [ "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", ], format: "string", tip: e, align: "R", }, }); case "ghast": return new Mob(t, e, { ExplosionPower: { type: "text", format: "int", tip: e, align: "R", }, }); case "minecart": return new minecart(t, e); case "tnt_minecart": return new minecart(t, e, { TNTFuse: { type: "ticks", tip: e, align: "R" }, }); case "chest_minecart": return new chest_minecart(t, e, 27); case "hopper_minecart": return new hopper_minecart(t, e, 5); case "furnace_minecart": return new minecart(t, e, { PushX: { type: "text", format: "d", tip: e, align: "R" }, PushZ: { type: "text", format: "d", tip: e, align: "R" }, Fuel: { type: "ticks", tip: e, align: "R" }, }); case "spawner_minecart": return new spawner_minecart(t, e); case "command_block_minecart": return new minecart(t, e, { Command: { type: "text", format: "string", tip: e, align: "R" }, SuccessCount: { type: "text", format: "int", tip: e, align: "R", }, LastOutput: { type: "text", format: "string", tip: e, align: "R", }, TrackOutput: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "chicken": return new BreedableMob(t, e, { IsChickenJockey: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, EggLayTime: { type: "ticks", tip: e, align: "R" }, }); case "creeper": return new Mob(t, e, { powered: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, ExplosionRadius: { type: "text", format: "b", tip: e, align: "R", }, Fuse: { type: "ticks", tip: e, align: "R" }, ignited: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "mooshroom": return new BreedableMob(t, e, { Type: { type: "choice", values: [ [-1, "unset"], ["brown", "Brown"], ["red", "Red"], ], tip: e, format: "string", align: "R", }, EffectId: { type: "choice", values: statusEffects, format: "b", align: "R", tip: e, }, EffectDuration: { type: "ticks", tip: e, align: "R" }, }); case "cow": return new BreedableMob(t, e); case "hoglin": return new BreedableMob(t, e, { IsImmuneToZombification: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, TimeInOverworld: { type: "ticks", tip: e, align: "R" }, CannotBeHunted: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "lightning_bolt": return new lightning_bolt(t, e); case "fishing_bobber": return new fishing_bobber(t, e); case "horse": case "llama": case "trader_llama": case "donkey": case "mule": case "zombie_horse": case "skeleton_horse": return new HorseMob(t, e); case "eye_of_ender": case "leash_knot": return new SimpleEntity(t, e); case "llama_spit": return new llama_spit(t, e); case "turtle": return new BreedableMob(t, e, { HomePosX: { type: "text", format: "int", align: "R" }, HomePosY: { type: "text", format: "int", align: "R" }, HomePosZ: { type: "text", format: "int", align: "R" }, TravelPosX: { type: "text", format: "int", align: "R" }, TravelPosY: { type: "text", format: "int", align: "R" }, TravelPosZ: { type: "text", format: "int", align: "R" }, HasEgg: { type: "choice", values: unsetTrueFalse, format: "b", align: "R", }, }); case "fox": return new Fox(t, e); case "wolf": return new BreedableMob(t, e, { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "mob.Owner", }, Sitting: { type: "choice", values: unsetTrueFalse, format: "b", tip: "tameable", align: "R", }, AngerTime: { type: "ticks", tip: e, align: "R" }, CollarColor: { type: "makeSelectWithIndexes", hasUnset: !0, values: dyes, format: "b", tip: e, align: "R", }, }); case "parrot": return new Mob(t, e, { OwnerUUID: { type: "text", format: "string", tip: "tameable", align: "R", }, Sitting: { type: "choice", values: unsetTrueFalse, format: "b", tip: "tameable", align: "R", }, Variant: { type: "choice", values: [ [-1, "unset"], [0, "Red"], [1, "Blue"], [2, "Green"], [3, "Cyan"], [4, "Silver"], ], format: "int", tip: e, align: "R", }, }); case "ocelot": return new BreedableMob(t, e, { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "mob.Owner", }, Sitting: { type: "choice", values: unsetTrueFalse, format: "b", tip: "tameable", align: "R", }, }); case "cat": return new BreedableMob(t, e, { Owner: { type: "UUIDArray", format: "intArray", align: "R", tip: "mob.Owner", }, Sitting: { type: "choice", values: unsetTrueFalse, format: "b", tip: "tameable", align: "R", }, CatType: { type: "choice", values: [ [0, "Tabby"], [1, "Tuxedo"], [2, "Red Tabby"], [3, "Siamese"], [4, "British Shorthair"], [5, "Calico"], [6, "Persian"], [7, "Ragdoll"], [8, "White"], [9, "Jellie"], [10, "Panther"], ], format: "int", tip: e, align: "R", tip: e, }, CollarColor: { type: "makeSelectWithIndexes", hasUnset: !0, values: woolDyes, format: "b", align: "R", tip: e, }, }); case "strider": case "pig": return new BreedableMob(t, e, { Saddle: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "panda": return new BreedableMob(t, e, { MainGene: { type: "makeSelect", values: [ "normal", "aggressive", "weak", "lazy", "worried", "playful", "brown", ], format: "string", tip: e, align: "R", }, HiddenGene: { type: "makeSelect", values: [ "normal", "aggressive", "weak", "lazy", "worried", "playful", "brown", ], format: "string", tip: e, align: "R", }, }); case "painting": return new painting(t, e, { Facing: { type: "choice", values: [ [-1, "unset"], ["0", "South"], ["1", "West"], ["2", "North"], ["3", "East"], ], format: "b", tip: e, align: "R", }, Motive: { type: "makeSelect", values: [ "kebab", "aztec", "alban", "aztec2", "bomb", "plant", "wasteland", "wanderer", "graham", "pool", "courbet", "sunset", "sea", "creebet", "match", "bust", "stage", "void", "skull_and_roses", "wither", "fighters", "skeleton", "donkey_kong", "pointer", "pigscene", "burning_skull", ], format: "special", tip: e, align: "R", }, Invulnerable: { type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, }); case "potion": return new potion(t, e); case "rabbit": return new BreedableMob(t, e, { RabbitType: { type: "choice", values: [ [-1, "unset"], [0, "Brown"], [1, "White"], [2, "Black"], [3, "Black & White"], [4, "Gold"], [5, "Salt & Pepper"], [99, "Killer Bunny"], ], format: "int", tip: e, align: "R", }, MoreCarrotTicks: { type: "ticks", tip: e, align: "R" }, }); case "sheep": return new BreedableMob(t, e, { Sheared: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, Color: { type: "makeSelectWithIndexes", values: woolDyes, format: "b", tip: e, hasUnset: !0, align: "R", }, }); case "shulker": return new Mob(t, e, { Peek: { type: "text", format: "b", tip: e, align: "R" }, AttachFace: { type: "choice", values: [ [0, "Above"], [1, "Below"], [2, "South"], [3, "North"], [4, "East"], [5, "West"], ], format: "b", tip: e, align: "R", }, Color: { type: "makeSelectWithIndexes", values: woolDyes, format: "b", tip: e, hasUnset: !0, align: "R", }, APX: { type: "text", format: "int", tip: "shulker.AP", align: "R", }, APY: { type: "text", format: "int", tip: "shulker.AP", align: "R", }, APZ: { type: "text", format: "int", tip: "shulker.AP", align: "R", }, }); case "shulker_bullet": return new shulker_bullet(t, e); case "snow_golem": return new Mob(t, e, { Pumpkin: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "tnt": return new SimpleEntity(t, e, { Fuse: { type: "ticks", tip: e, align: "R" }, }); case "vex": return new Mob(t, e, { BoundX: { type: "text", format: "int", tip: "vex.Bound", align: "R", }, BoundY: { type: "text", format: "int", tip: "vex.Bound", align: "R", }, BoundZ: { type: "text", format: "int", tip: "vex.Bound", align: "R", }, LifeTicks: { type: "ticks", tip: e, align: "R" }, }); case "wandering_trader": case "villager": return new villager(t, e); case "iron_golem": return new Mob(t, e, { PlayerCreated: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "vindicator": return new Mob(t, e, { Johnny: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, align: "R", }, }); case "wither": return new Mob(t, e, { Invul: { type: "ticks", tip: e, align: "R" }, }); case "experience_orb": return new SimpleEntity(t, e, { Age: { type: "ticks", tip: "xp_orb", align: "R" }, Health: { type: "text", format: "b", tip: "xp_orb", align: "R", }, Value: { type: "text", format: "short", tip: "xp_orb", align: "R", }, }); case "player": return new Player(t, e); } return null; } function loadForm(e) { clearOutputCharacterCount(), $("#intro").remove(), cachedNBT.clear(), (currentCommand = e), $("#commandOutput").css({ top: 0, left: $(window).width() - 510 }), $("#commandForm").html(""), (entityIndex = 0), (entityDescriptors = []), $("#disableOutput").prop("checked", !0), "execute if entity" != e && makeExecutePane("commandForm"), "give" == e ? makeGivePane("commandForm", "givePane") : "setblock" == e ? makeBlockPane("commandForm", "blockPane") : "replaceitem" == e ? makeReplaceItemPane("commandForm", "replaceItemPane") : "teleport" == e ? makeTeleportPane("commandForm", "replaceItemPane") : "fill" == e ? makeBlockPaneFill("commandForm", "blockPane") : "blockdata" == e || "data merge block" == e ? makeBlockDataPane("commandForm", "blockPane") : "execute if entity" == e || "kill" == e ? makeAddEntityAndPlayerPane("commandForm", "rootEntity") : "tellraw" == e || "title" == e ? makeTellrawPane("commandForm", "tellrawPane") : "summon" == e || "entitydata" == e || "data merge entity" == e ? makeAddEntityPane("commandForm", "rootEntity") : "particle" == e ? makeParticlePane("commandForm", "particlePane") : "effect" == e ? makeEffectPane("commandForm", "effectPane") : "playsound" == e ? makePlaySoundPane("commandForm", "soundPane") : "team" == e ? makeTeamPane("commandForm", "teamPane") : "scoreboard" == e ? makeScoreboardPane("commandForm", "scoreboardPane") : "bossbar" == e ? makeBossbarPane("commandForm", "bossbarPane") : "loot" == e ? makeLootPane("commandForm", "lootPane") : "loot_table" == e && makeLootTableGenerator("commandForm"), $("#disableOutput").prop("checked", !1), $("#commandOutput-ta").val("Fill out the form to get a command."); } function makeExecutePane(e) { $("#" + e).html( "
make /execute command
" ); } function appendTS() { $("#exeString").val( $("#exeString").val().trim() + " " + getTargetSelectorStringGeneric("execute0") ), generateCommand(); } function insertTextAtCursor() { var e = jQuery("#exeString"), t = e[0].selectionStart, a = e.val(), o = getTargetSelectorStringGeneric("execute0"); e.val(a.substring(0, t) + o + a.substring(t)); } function loadSavedCommand(e) { parseNBT($("#commandString").val().trim(), e); } function removeExecute() { $("#executePane").html( "make /execute command" ), generateCommand(); } function createExecuteForm() { $("#disableOutput").prop("checked", !0); var e = "Execute String

Target Type⇑ Append⇑ Insert at cursor
" + makeTip("effect", "Entity"); $("#executePane").html(e), bindGenCom("exeString", "keyup"), $("#executePane br:first").remove(), teleportEntityChange("execute0"), $("#disableOutput").prop("checked", !1), generateCommand(); } function makeTeamPane(e, t) { $("#" + e).append("
"); var a = "Command Type" + makeTip("team", "commandType") + ""; $("#" + t).append(a), createComponent( t, "Team", { id: "team", type: "text", tip: "team", fwClass: "bigTF" }, 0 ), $("#" + t).append("
"), createTellrawForm(t, 0); } function teamChange() { $("#teamSpan").html(""), "modify" == $("#add_modify").val() && createComponent( "teamSpan", "Part", { type: "makeSelect", values: ["displayName", "prefix", "suffix"], tip: "team", }, 0 ), generateCommand(); } function makeScoreboardPane(e, t) { $("#" + e).append("
"); var a = "Command Type" + makeTip("scoreboard", "commandType") + ""; $("#" + t).append(a), createComponent( t, "Objective", { id: "objective", type: "text", fwClass: "bigTF", tip: "scoreboard", }, 0 ), $("#" + t).append("
"), sbChange(), createTellrawForm(t, 0); } function sbChange() { $("#sbSpan").html(""), "add" == $("#add_modify").val() && createComponent( "sbSpan", "Criteria", { type: "text", fwClass: "bigTF", tip: "scoreboard" }, 0 ), generateCommand(); } function makeLootPane(e, t) { $("#" + e).append("
"), $("#" + t).append( "Target" + makeTip("loot", "target") + "
" ), $("#" + t).append( "
Source" + makeTip("loot", "source") + "
" ), lootTargetChange(), lootSourceChange(); } function lootSourceChange() { $("#sourceSpan").html(""), "loot" == $("#sourceType").val() || "fish" == $("#sourceType").val() ? (createComponent( "sourceSpan", "Loot Table", { id: "LootTable", type: "text", fwClass: "bigTF", tip: "loot.loottable", }, 0 ), "fish" == $("#sourceType").val() && ($("#sourceSpan").append( "
" + makeCoords("Fishing", "Fishing", !0, !0) ), bindGenCom("Fishing", "keyup"), createComponent( "sourceSpan", "FishingTool", { type: "itemselect", forceConstruct: !0, format: "special", hide: !1, tip: "loot", }, 0 ))) : "mine" == $("#sourceType").val() ? ($("#sourceSpan").append( "
" + makeCoords("Mining", "Mining", !0, !0) ), bindGenCom("Mining", "keyup"), createComponent( "sourceSpan", "MiningTool", { type: "itemselect", forceConstruct: !0, format: "special", hide: !1, tip: "loot", }, 0 )) : "kill" == $("#sourceType").val() && ($("#sourceSpan").append( "
" ), loadTargetSelectorsGeneric("kill0_ts", !0, !1, "kill0"), $("#kill0TSPane").css( "background", "rgba(" + hexToR(bgPalette[1]) + "," + hexToG(bgPalette[1]) + "," + hexToB(bgPalette[1]) + ",0.5)" )), generateCommand(); } function lootTargetChange() { $("#targetSpan").html(""), "spawn" == $("#targetType").val() || "insert" == $("#targetType").val() || "replace block" == $("#targetType").val() ? ($("#targetSpan").append(makeCoords("Loot", "Loot", !0, !0)), bindGenCom("Loot", "keyup")) : ("give" != $("#targetType").val() && "replace entity" != $("#targetType").val()) || ($("#targetSpan").append( "Entity/Player
" ), $("#targetSpanTSPane").css( "background", "rgba(" + hexToR(bgPalette[1]) + "," + hexToG(bgPalette[1]) + "," + hexToB(bgPalette[1]) + ",0.5)" ), lootEntityChange("entity0")), ("replace entity" != $("#targetType").val() && "replace block" != $("#targetType").val()) || createComponent( "targetSpan", "Slot", { id: "slot", type: "makeSelect", values: getLootSlots( "replace entity" == $("#targetType").val() ), tip: "loot.slots", }, 0 ), generateCommand(); } function lootEntityChange(e) { $("#" + e + "_ts").html(""), loadTargetSelectorsGeneric( e + "_ts", "player" != $("#" + e).val(), "player" == $("#" + e).val(), e ), $("#" + e + "TSPane").css( "background", "rgba(" + hexToR(bgPalette[1]) + "," + hexToG(bgPalette[1]) + "," + hexToB(bgPalette[1]) + ",0.5)" ), $("#" + e + "_ts br:first").remove(), generateCommand(); } function getLootSlots(e) { if (e) { a = ["armor.head", "armor.chest", "armor.legs", "armor.feet"]; for (var t = 0; t < 27; t++) a.push("enderchest." + t); for (t = 0; t < 15; t++) a.push("horse." + t); a = a.concat(["horse.armor", "horse.chest", "horse.saddle"]); for (t = 0; t < 9; t++) a.push("hotbar." + t); for (t = 0; t < 27; t++) a.push("inventory." + t); for (t = 0; t < 8; t++) a.push("villager." + t); a = a.concat(["weapon", "weapon.mainhand", "weapon.offhand"]); } else { var a = []; for (t = 0; t < 54; t++) a.push("container." + t); } return a; } function lootTargetSetChange() { $("#lootSetSpan").html(""), "name" == $("#set").val() ? $("#bossbarPaneItemPane").show() : "players" == $("#set").val() && ($("#bossbarPaneItemPane").hide(), loadTargetSelectors("bbSetSpan", !1, !0)), generateCommand(); } function makeBossbarPane(e, t) { $("#" + e).append("
"); var a = "Action" + makeTip("bossbar", "action"); $("#" + t).append(a), createComponent( t, "ID", { type: "text", fwClass: "bigTF", tip: "bossbar" }, 0 ), $("#" + t).append( "
" ), bbChange(), createTellrawForm(t, 0); } function bbChange() { if (($("#bbSpan").html(""), "add" == $("#action").val())) $("#bossbarPaneItemPane").show(); else if ("set" == $("#action").val()) { var e = "
Set" + makeTip("bossbar", "set") + ""; $("#bbSpan").append(e), bbSetChange(); } generateCommand(); } function bbSetChange() { $("#bbSetSpan").html(""), "name" == $("#set").val() ? $("#bossbarPaneItemPane").show() : "players" == $("#set").val() && ($("#bossbarPaneItemPane").hide(), loadTargetSelectors("bbSetSpan", !1, !0)), generateCommand(); } function makeTellrawPane(e, t) { $("#" + e).append("
"), "title" == currentCommand && createComponent( t, "Type", { id: "titleType", type: "makeSelect", values: ["title", "subtitle", "actionbar"], tip: "title.Type", }, 0 ), loadTargetSelectors(t, !1, !0), $("#" + t).append("
"), $("#" + t + " br:first").remove(), createTellrawForm(t, 0); } function makeEffectPane(e, t) { $("#" + e).append("
"); var a = "Entity
" + makeTip("effect", "Entity"); $("#" + t).append(a); var o = statusEffects.slice(0); o.splice(0, 1), createComponent( t, "Effect", { id: "effect", type: "choice", values: o, tip: "effect" }, 0 ), createComponent( t, "Seconds", { id: "seconds", type: "text", tip: "effect" }, 0 ), createComponent( t, "Amplifier", { id: "amplifier", type: "text", tip: "effect" }, 0 ), createComponent( t, "Hide Particles", { id: "hideParticles", type: "makeSelect", values: ["false", "true"], tip: "effect.hideParticles", }, 0 ), teleportEntityChange("entity0"); } function makeParticlePane(e, t) { $("#" + e).append("
"), createComponent( t, "Name", { id: "name", type: "makeSelect", values: particles, tip: "particle", }, 0 ), $("#" + t).append("
"), $("#" + t).append("
"); let a = makeCoords("Location", "Location", !0, !0); $("#" + t).append("
" + a), bindGenCom("Location", "keyup"), (a = baseCoords( ["X", "Y", "Z"], ["xd", "yd", "zd"], null, "Direction" )), $("#" + t).append("
" + a), bindGenCom("xd", "keyup"), bindGenCom("yd", "keyup"), bindGenCom("zd", "keyup"), createComponent( t, "Speed", { id: "speed", type: "text", value: "1", tip: "particle" }, 0 ), createComponent( t, "Count", { id: "count", type: "text", tip: "particle113.Count", value: "0" }, 0 ), createComponent( t, "Mode", { id: "mode", type: "makeSelect", values: ["normal", "force"], format: "string", tip: "particle", }, 0 ), $("#" + t).append( "
Dust Size" + makeTip("particle113", "dustSize") + "

Effect Color" + makeTip("particle113", "color") + "
" ), loadTargetSelectors(t, !1, !0), $("#" + t).append(makeTip("particle", "player")), showHide("TSPane", "TSPaneSH"), (a = "
Block"), (a += ""), $("#blockFallingDustSettings").append(a), (a = "
Item"), (a += ""), $("#itemSettings").append(a), $("#blockFallingDustSettings").hide(), $("#itemSettings").hide(), bindGenCom("dustSize", "keyup"), $("#name").bind("change", function () { -1 != $("#name").val().indexOf("entity_effect") ? ($("#colsettings").show(), $("#dustsettings").hide(), $("#blockFallingDustSettings").hide(), $("#itemSettings").hide()) : "falling_dust" == $("#name").val() || "block" == $("#name").val() ? ($("#colsettings").hide(), $("#dustsettings").hide(), $("#blockFallingDustSettings").show(), $("#itemSettings").hide()) : "dust" == $("#name").val() ? ($("#colsettings").show(), $("#dustsettings").show(), $("#blockFallingDustSettings").hide(), $("#itemSettings").hide()) : "item" == $("#name").val() ? ($("#colsettings").hide(), $("#dustsettings").hide(), $("#blockFallingDustSettings").hide(), $("#itemSettings").show()) : ($("#colsettings").hide(), $("#dustsettings").hide(), $("#blockFallingDustSettings").hide(), $("#itemSettings").hide()); }), $("#mobSpell_color").bind("change", function () { "dust" != $("#name").val() ? changeParticelXdYdZd($("#mobSpell_color").val()) : generateCommand(); }), new jscolor.color( document.getElementById("mobSpell_color"), {} ).fromString("FF0000"); } function changeParticelXdYdZd(e) { $("#xd").val(parseFloat(hexToR(e) / 255).toFixed(3)), $("#yd").val(parseFloat(hexToG(e) / 255).toFixed(3)), $("#zd").val(parseFloat(hexToB(e) / 255).toFixed(3)), generateCommand(); } function makePlaySoundPane(e, t) { $("#" + e).append("
"), $("#" + t).append( "Sound Effect" + makeTip("sound", "effect") ), bindGenCom("sound", "change"), createComponent( "soundPane", "Source", { id: "source", type: "makeSelect", values: [ "master", "music", "record", "weather", "block", "hostile", "neutral", "player", "ambient", "voice", ], tip: "sound.source", }, 0 ), loadTargetSelectors("soundPane", !1, !0); var a = makeCoords("Position", "Position", !0, !0) + makeTip("sound", "relative"); $("#soundPane").append("
" + a), bindGenCom("Position", "keyup"), createComponent( "soundPane", "Volume", { id: "volume", type: "text", tip: "sound.volume" }, 0 ), createComponent( "soundPane", "Pitch", { id: "pitch", type: "text", tip: "sound.pitch" }, 0 ), createComponent( "soundPane", "Minimum Volume", { id: "minvolume", type: "text", tip: "sound.minvolume" }, 0 ), loadSoundOptions(); } function loadSoundOptions() { for (var e = [], t = 0; t < soundList.length; t++) e.push( '" ); $("#sound").html(e.join("")); } function updateSoundSelect(e) { for ( var t = $("#" + e).val(), a = $("#" + e + "_filter").val(), o = [], n = 0; n < soundList.length; n++ ) (0 != a.length && -1 == soundList[n].indexOf(a)) || o.push( '" ); $("#" + e).html(o.join("")), t != $("#" + e).val() && $("#" + e).trigger("change"); } function makeBlockDataPane(e, t) { $("#" + e).append( "
" + makeCoords("Block", "Block", !0, !0) + "
" ), bindGenCom("Block", "keyup"); var a = "
Block"; (a += ""), $("#" + t).append(a), updateBlockDataSelect("block"); } function updateBlockDataSelect(e) { for ( var t = $("#" + e + "_filter").val(), a = [], o = 0; o < tiles.length; o++ ) -1 == hasBlockData.indexOf(tiles[o][0]) || (0 != t.length && -1 == tiles[o][0].indexOf(t) && -1 == tiles[o][1].indexOf(t)) || a.push( '" ); $("#" + e).html(a.join("")), blockChange(!1); } function makeBlockPane(e, t) { $("#" + e).append( "
" + makeCoords("Block", "Block", !0, !0) + "
" ), bindGenCom("Block", "keyup"), createComponent( t, "Old Block Handling", { id: "blockHandle", type: "makeSelect", values: ["replace", "destroy", "keep"], hide: !1, tip: "setblock.Handling", }, 0 ); var a = "
Block"; a += ""), $("#" + t).append(a); } function makeBlockPaneFill(e, t) { $("#" + e).append( "
" + makeCoords("Corner", "Corner", !0, !0) + "
" + makeCoords("Opposite", "Opposite", !0, !0) + "
" ), bindGenCom("Corner", "keyup"), bindGenCom("Opposite", "keyup"), createComponent( t, "Old Block Handling", { id: "blockHandle", type: "makeSelect", values: ["replace", "destroy", "hollow", "keep", "outline"], hide: !1, tip: "setblock.Handling", }, 0 ); for (var a = "", o = 0; o < tiles.length; o++) a += ""; var n = "
Block
Replace Block"; $("#" + t).append(n); } function fallingBlockChange(e) { if ( ((e = e || 0), $("#blockSpec" + e).html(""), $("#block" + e).val() in blockStates) ) { var t = blockStates[$("#block" + e).val()]; for (var a in t) { var o = t[a].slice(); $.isArray(o[0]) ? (o.unshift(["unset", "unset"]), createComponent( "blockSpec" + e, a, { id: a + "BS" + e, type: "choice", values: o }, e )) : (o.unshift("unset"), createComponent( "blockSpec" + e, a, { id: a + "BS" + e, type: "makeSelect", values: o }, e )); } } (blocks[e] = loadBlockClass($("#block" + e).val())), "falling_block" == entityDescriptors["e" + e].entityType && blocks[e].generateFormForFalling(e), $("#blockSpec" + e).html().length ? ($("#blockSpec" + e).addClass("fallingBlock"), $("#blockSpec" + e + " br:first").remove()) : $("#blockSpec" + e).removeClass("fallingBlock"), generateCommand(); } function blockChange(e) { if (($("#blockSpec0").html(""), e && $("#block").val() in blockStates)) { var t = blockStates[$("#block").val()]; for (var a in t) { var o = t[a].slice(); $.isArray(o[0]) ? (o.unshift(["unset", "unset"]), createComponent( "blockSpec0", a, { id: a + "BS0", type: "choice", values: o }, 0 )) : (o.unshift("unset"), createComponent( "blockSpec0", a, { id: a + "BS0", type: "makeSelect", values: o }, 0 )); } } "particle" != currentCommand && ((block = loadBlockClass($("#block").val())).generateForm(), cachedNBT.loadCachedBlockNBT("BS0")), generateCommand(); } function detectBlockChange() { if ( ($("#detect_blockSpec").html(""), $("#detect_block").val() in blockStates) ) { var e = blockStates[$("#detect_block").val()]; for (var t in e) { var a = e[t].slice(); $.isArray(a[0]) ? (a.unshift(["unset", "unset"]), createComponent( "detect_blockSpec", t, { id: t + "detect_BS0", type: "choice", values: a }, 0 )) : (a.unshift("unset"), createComponent( "detect_blockSpec", t, { id: t + "detect_BS0", type: "makeSelect", values: a }, 0 )); } } generateCommand(); } function replaceBlockChange() { if ( ($("#replaceBlockSpec").html(""), $("#replaceblock").val() in blockStates) ) { var e = blockStates[$("#replaceblock").val()]; for (var t in e) { var a = e[t].slice(); $.isArray(a[0]) ? (a.unshift(["unset", "unset"]), createComponent( "replaceBlockSpec", t, { id: t + "ReplaceBS0", type: "choice", values: a }, 0 )) : (a.unshift("unset"), createComponent( "replaceBlockSpec", t, { id: t + "ReplaceBS0", type: "makeSelect", values: a }, 0 )); } } generateCommand(); } function loadBlockClass(e) { if (-1 != e.indexOf("shulker_box")) return new BlockWithSlots( e, { LootTable: { type: "text", fwClass: "bigTF", format: "string", tip: "chest.LootTable", }, }, 27 ); switch (e) { case "white_banner": case "orange_banner": case "magenta_banner": case "light_blue_banner": case "yellow_banner": case "lime_banner": case "pink_banner": case "gray_banner": case "light_gray_banner": case "cyan_banner": case "purple_banner": case "blue_banner": case "brown_banner": case "green_banner": case "red_banner": case "black_banner": case "white_wall_banner": case "orange_wall_banner": case "magenta_wall_banner": case "light_blue_wall_banner": case "yellow_wall_banner": case "lime_wall_banner": case "pink_wall_banner": case "gray_wall_banner": case "light_gray_wall_banner": case "cyan_wall_banner": case "purple_wall_banner": case "blue_wall_banner": case "brown_wall_banner": case "green_wall_banner": case "red_wall_banner": case "black_wall_banner": return new Banner(e, { BlockEntityTag: { type: "text", fwClass: "bigTF", format: "special", tip: "banner", }, CustomName: { type: "customNameJSON", format: "special", tip: "banner.CustomName", }, }); case "enchanting_table": return new Block(e, { CustomName: { type: "customNameJSON", format: "special", tip: "block.CustomName", }, }); case "beacon": return new Beacon(e); case "bee_nest": case "beehive": return new BeeHiveNest(e); case "chest": case "barrel": case "trapped_chest": return new BlockWithSlots( e, { LootTable: { type: "text", fwClass: "bigTF", format: "string", tip: "chest.LootTable", }, }, 27 ); case "brewing_stand": return new BlockWithSlots( e, { BrewTime: { type: "ticks", tip: e }, Fuel: { type: "text", format: "b", tip: e }, }, 5 ); case "dropper": case "dispenser": return new BlockWithSlots( e, { LootTable: { type: "text", fwClass: "bigTF", format: "string", tip: "chest.LootTable", }, }, 9 ); case "blast_furnace": case "smoker": case "furnace": return new BlockWithSlots( e, { BurnTime: { type: "ticks", tip: e }, CookTime: { type: "ticks", tip: e }, CookTimeTotal: { type: "ticks", tip: e }, }, 3 ); case "soul_campfire": case "campfire": return new campfire(e, {}, 4); case "hopper": return new BlockWithSlots( e, { TransferCooldown: { type: "text", tip: e, format: "short" }, LootTable: { type: "text", fwClass: "bigTF", format: "string", tip: "chest.LootTable", }, }, 5 ); case "comparator": return new Block(e, { OutputSignal: { type: "text", tip: "comparator.OutputSignal", format: "int", }, }); case "command_block": case "repeating_command_block": case "chain_command_block": return new CommandBlock(e); case "end_gateway": return new EndGateway(e, { Age: { type: "text", tip: e, format: "long" }, ExactTeleport: { type: "choice", values: unsetTrueFalse, tip: e, format: "b", }, X: { type: "text", label: "Exit Portal X", tip: "end_gateway.ExitPortal", format: "int", }, Y: { type: "text", format: "int" }, Z: { type: "text", format: "int" }, }); case "jukebox": return new JukeBox(e, { Record: { type: "text", format: "int", tip: e }, RecordItem: { type: "itemselect", forceConstruct: !0, tip: e }, }); case "lectern": return new Lectern(e, { Page: { type: "text", format: "int", tip: e }, Book: { type: "itemselect", forceConstruct: settings.loadItemUI, tip: e, }, }); case "spawner": return new MobSpawner(e); case "piston": return new Block(e, { blockID: { type: "text", format: "int", tip: e }, blockData: { type: "text", format: "int", tip: e }, facing: { type: "choice", values: dunswe, format: "int", tip: e, }, progress: { type: "text", format: "f", tip: e }, extending: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, }, source: { type: "choice", values: unsetTrueFalse, format: "b", tip: e, }, }); case "conduit": return new Block(e, { Target: { type: "UUIDArray", format: "intArray", align: "R", tip: e, }, }); case "jigsaw": return new Block(e, { name: { type: "text", format: "string", fwClass: "bigTF", value: "minecraft:empty", tip: e, }, pool: { type: "text", format: "string", fwClass: "bigTF", value: "minecraft:empty", tip: e, }, final_state: { type: "text", format: "string", fwClass: "bigTF", value: "minecraft:air", tip: e, }, target: { type: "text", format: "string", fwClass: "bigTF", value: "minecraft:empty", tip: e, }, joint: { type: "makeSelect", format: "string", values: ["aligned", "rollable"], fwClass: "bigTF", value: "minecraft:empty", tip: e, }, }); case "oak_sign": case "spruce_sign": case "birch_sign": case "jungle_sign": case "acacia_sign": case "dark_oak_sign": case "crimson_sign": case "warped_sign": case "oak_wall_sign": case "spruce_wall_sign": case "birch_wall_sign": case "jungle_wall_sign": case "acacia_wall_sign": case "dark_oak_wall_sign": case "warped_wall_sign": case "crimson_oak_wall_sign": return new Sign(e, {}); case "structure_block": return new Block(e, structureBlockNBT); default: return new Block(e, {}); } } function buildListOfBlocksWithData() { for (var e = 0; e < tiles.length; e++) { let t = loadBlockClass(tiles[e][0]); Object.keys(t.blockNBT).length && hasBlockData.push(tiles[e][0]); } } $(function () { function e(e, t) { return e[0] < t[0] ? -1 : e[0] > t[0] ? 1 : 0; } (items = items.sort(e)), (tiles = tiles.sort(e)), items.unshift(["-1", "unset"]), tiles.unshift(["-1", "unset"]), (window.onresize = function () { $("#commandOutput").css({ top: 0, left: $(window).width() - 510 }); }), $("#clipBoard-ta").bind("paste", function (e) { clipboard[$("#nbtType").val()] = ( e.originalEvent || e ).clipboardData.getData("text/plain"); }), $(document).mousemove(function (e) { (mouse.x = e.pageX), (mouse.y = e.pageY); }), $("#clipBoard").draggable(), $("#clipBoard").hide(), $("#commandOutput").draggable(), $("#commandOutput").hide(), $("#commandInput").draggable(), $("#commandInput").hide(), $("#community").hide(), (settings = new Settings()), buildListOfBlocksWithData(), $("#toClipBoard").bind("click", function () { copyToClipboard($("#commandOutput-ta").val()); }), $("#parseNBT").bind("click", function () { parseNBT(stripHTMLTags($("#commandInput-ta").val().trim()), "1.16"); }), $("#closeImportBut").bind("click", function () { $("#commandInput").hide(); }), $("#clearNBT").bind("click", function () { $("#commandInput-ta").val(""); }), $("#closeclipBoardBut").bind("click", function () { (clipboard[$("#nbtType").val()] = $("#clipBoard-ta").val()), $("#clipBoard").hide(); }), $("#themeBut").bind("click", function () { $("#themes").html( "Default
Dark Theme" ); }), $("#disableOutput").bind("change", function () { $("#disableOutput").is(":checked") ? $("#commandOutput-ta").val( "Command output is disabled to improve performance. Click refresh to get the command or uncheck 'Disable Output'" ) : generateCommand(); }), loadManagement(); }); var structureBlockNBT = { name: { type: "text", format: "string", tip: "structure_block" }, author: { type: "text", format: "string", tip: "structure_block" }, metadata: { type: "text", format: "string", tip: "structure_block" }, posX: { type: "text", format: "int", tip: "structure_block" }, posY: { type: "text", format: "int", tip: "structure_block" }, posZ: { type: "text", format: "int", tip: "structure_block" }, sizeX: { type: "text", format: "int", tip: "structure_block" }, sizeY: { type: "text", format: "int", tip: "structure_block" }, sizeZ: { type: "text", format: "int", tip: "structure_block" }, rotation: { type: "makeSelect", values: [ "NONE", "CLOCKWISE_90", "CLOCKWISE_180", "COUNTERCLOCKWISE_90", ], format: "string", tip: "structure_block", }, mirror: { type: "makeSelect", values: ["NONE", "LEFT_RIGHT", "FRONT_BACK"], format: "string", tip: "structure_block", }, mode: { type: "makeSelect", values: ["SAVE", "LOAD", "CORNER", "DATA"], format: "string", tip: "structure_block", }, ignoreEntities: { type: "choice", values: unsetTrueFalse, format: "b", tip: "structure_block", }, }; function loadSpawnPotentialFromNBT(e, t, a, o) { for (var n = 0; n < a.length; n++) { addSpawnPotential("SpawnPotential" + o + "Pane"); var s = "SpawnPotentials" == t ? a[n].Entity.val : a[n], i = extractMinecraftID(s.id.val); $("#entity" + entityIndex).val(i), $("#entity" + entityIndex).trigger("change"); var r = entityIndex; e.loadSummonCommand(s, entityIndex), void 0 != a[n].Weight && $("#Weight" + r).val(a[n].Weight.val); } var l = [], c = null, d = 0; $("#SpawnPotential" + o + "Pane > .spawnPotentialContainer").each(function ( e ) { var t = parseInt(this.id.substr(this.id.indexOf("_") + 1)); null == c && (c = t), d++, (l[e] = '{id:"minecraft:' + $("#entity" + t).val() + '"' + entityDescriptors["e" + t].getEntitySpecificCommand(t) + getMotion(t, "Pos") + "}"); }), d >= 2 && l[0] == l[1] && removePassenger("spawnPotentialEntity_" + c, c); } function loadBeeHiveNestFromNBT(e, t, a) { if ( (void 0 != t.FlowerPos && ($("#FlowerPosX0").val(t.FlowerPos.val.X.val), $("#FlowerPosY0").val(t.FlowerPos.val.Y.val), $("#FlowerPosZ0").val(t.FlowerPos.val.Z.val)), void 0 != t.Bees) ) { let n = t.Bees.val; for (var o = 0; o < n.length; o++) addBee("Bees" + a + "Pane"), e.loadSummonCommand(n[o], entityIndex), void 0 != n[o].MinOccupationTicks && $("#MinOccupationTicks" + entityIndex).val( n[o].MinOccupationTicks.val ), void 0 != n[o].TicksInHive && $("#TicksInHive" + entityIndex).val(n[o].TicksInHive.val); } } function updateFallingBlockOptions(e, t) { for ( var a = $("#" + e + t).val(), o = $("#" + e + "_filter" + t) .val() .toLowerCase(), n = [], s = 0; s < tiles.length; s++ ) (0 != o.length && -1 == tiles[s][0].toLowerCase().indexOf(o) && -1 == tiles[s][1].toLowerCase().indexOf(o)) || n.push( '" ); $("#" + e + t).html(n.join("")), a != $(name).val() && $("#" + e + t).trigger("change"); } function updateBlockOptions(e) { for ( var t = $("#" + e).val(), a = $("#" + e + "_filter") .val() .toLowerCase(), o = [], n = 0; n < tiles.length; n++ ) (0 != a.length && -1 == tiles[n][0].toLowerCase().indexOf(a) && -1 == tiles[n][1].toLowerCase().indexOf(a)) || o.push( '" ); $("#" + e).html(o.join("")), t != $("#" + e).val() && (cachedNBT.updateFilterLastUsed(), $("#" + e).trigger("change")); } function makeTeleportPane(e, t) { var a = "
Teleport
Destination" + makeTip("teleport", "type") + "
"; $("#" + e).append(a), teleportEntityChange("entity0"), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), $("#teleporttype").bind("change", function () { changeTeleportType(e); }), changeTeleportType(e); } function teleportEntityChange(e) { $("#" + e + "_ts").html(""), loadTargetSelectorsGeneric( e + "_ts", "player" != $("#" + e).val(), "player" == $("#" + e).val(), e ), $("#" + e + "TSPane").css( "background", "rgba(" + hexToR(bgPalette[1]) + "," + hexToG(bgPalette[1]) + "," + hexToB(bgPalette[1]) + ",0.5)" ), $("#" + e + "_ts br:first").remove(), generateCommand(); } function changeTeleportType() { "block" == $("#target0").val() ? ($("#cmdTypeSpecificContainer").html( makeCoords("Block", "Destination", !0, !0) ), bindGenCom("Block", "keyup")) : ($("#cmdTypeSpecificContainer").html("
"), $("#cmdTypeSpecificContainer br:first").remove(), teleportEntityChange("target0")), generateCommand(); } function makeReplaceItemPane(e, t) { $("#" + e).append( "
Command Type" + makeTip("replaceitem", "type") + "
" ), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), $("#replaceitem").bind("change", function () { changeReplaceItemCommandType(e); }), createComponent( t, "GiveItem", { label: "Replace Item", type: "itemselect", forceConstruct: !0, format: "special", hide: !1, }, 0 ), $("#" + t + " br:first").remove(), changeReplaceItemCommandType(e); } function changeReplaceItemCommandType() { var e; if ("entity" == $("#replaceitem").val()) { (e = "Entity
"), $("#cmdTypeSpecificContainer").html(e), createComponent( "cmdTypeSpecificContainer", "Slot", { type: "choice", values: [], format: "string", tip: "slot" }, 0 ), $("#cmdTypeSpecificContainer br:first").remove(), changeEntType(); } else (e = makeCoords("Block", "Block", !0, !0)), $("#cmdTypeSpecificContainer").html(e), bindGenCom("Block", "keyup"), createComponent( "cmdTypeSpecificContainer", "Slot", { type: "text", format: "short", tip: "slot", label: "Slot Number", }, 0 ); generateCommand(); } function changeEntType() { $("#ts").html(""), loadTargetSelectors( "ts", "player" != $("#entity0").val(), "player" == $("#entity0").val() ), $("#ts br:first").remove(); var e = ""; if ( (("player" != $("#entity0").val() && "armor_stand" != $("#entity0").val() && -1 == spawnEggs.indexOf($("#entity0").val())) || (e += ""), "player" == $("#entity0").val()) ) { for (var t = 0; t < 27; t++) e += ""; for (t = 0; t < 9; t++) e += ""; for (t = 0; t < 27; t++) e += ""; } if ("donkey" == $("#entity0").val() || "mule" == $("#entity0").val()) for (t = 0; t < 15; t++) e += ""; if ( "villager" == $("#entity0").val() || "wandering_trader" == $("#entity0").val() ) for (t = 0; t < 8; t++) e += ""; $("#Slot0").html(e), generateCommand(); } function updateEntityORPlayerTSOptions(e, t) { var a = $(e).val(), o = $(e + "_filter") .val() .toLowerCase(), n = []; (0 != o.length && -1 == "player".indexOf(o)) || n.push(""), (0 != o.length && -1 == "armor_stand".indexOf(o)) || n.push(""); for (var s = 0; s < spawnEggs.length; s++) (0 != o.length && -1 == spawnEggs[s].toLowerCase().indexOf(o)) || n.push( '" ); $(e).html(n.join("")), a != $(e).val() && changeEntType(); } function makeGivePane(e, t) { $("#" + e).append("
"), loadTargetSelectors(t, !0, !0), createComponent( t, "GiveItem", { type: "itemselect", format: "special", hide: !1, tip: "give", forceConstruct: !0, }, 0 ), $("#" + t + " br:first").remove(), $("#targetType0_choice").trigger("change"); } function makeAddEntityAndPlayerPane(e, t, a) { var o = a || !1, n = o ? "spawnPotentialContainer" : "passengerContainer", s = mkShowHide(t, t + "SH") + "
"; (s += "Entity
"), $("#" + e).html().length && (s = "
" + s), $("#" + e).append(s), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChange(entityIndex, o); } function makeAddBeePane(e, t) { var a = ""; (a += mkShowHide(t, t + "SH")), (a += "
"), (a += ""), (a += "CopyPaste
"), (a += "
"), $("#" + e).html().length && (a = "
" + a), $("#" + e).append(a), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChangeSpawnEgg(entityIndex), createComponent( t, "MinOccupationTicks", { label: "MinOccupationTicks", type: "ticks", cssClass: "fLabel100", tip: "bee_nest.MinOccupationTicks", }, entityIndex ), createComponent( t, "TicksInHive", { label: "TicksInHive", type: "ticks", cssClass: "fLabel100", tip: "bee_nest.TicksInHive", }, entityIndex ); } function makeAddEntityPane(e, t, a) { var o = a || !1, n = o ? "spawnPotentialContainer" : "passengerContainer", s = ""; 0 != entityIndex && (s += mkShowHide(t, t + "SH")), (s += "
"), 0 != entityIndex && (s += ""), (s += "CopyPaste
"), (s += "Entity
"), $("#" + e).html().length && (s = "
" + s), $("#" + e).append(s), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChange(entityIndex, o); } function makeAddEntityPaneforSpawnEgg(e, t, a, o) { var n = mkShowHide(t, t + "SH") + "
"; (n += "CopyPaste
"), (n += "Entity' + makeTip("spawn_egg", "override") + "
"), (n += "
"), $("#" + e).html().length && (n = "
" + n), $("#" + e).append(n), $("#entity" + entityIndex).val(o), $("#" + t).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChangeSpawnEgg(entityIndex); } function entityChange(e, t) { if ( ($("#entityPane" + e).html( "
" ), 0 == e && "data merge entity" != currentCommand && "execute if entity" != currentCommand && "kill" != currentCommand) ) $("#entityPane" + e + "L").append( makeCoords("Summon", "Summon", !0, !0) ), bindGenCom("Summon", "keyup"); else if ( ("data merge entity" == currentCommand || "execute if entity" == currentCommand || "kill" == currentCommand) && 0 == e ) { var a = "player" == $("#entity" + e).val(); loadTargetSelectors("entityPane" + e + "L", !a, a); } (entityDescriptors["e" + e] = loadEntityClass($("#entity" + e).val(), e)), null != entityDescriptors["e" + e] && (t && entityDescriptors["e" + e].addSpawnPotentialFields(), entityDescriptors["e" + e].generateForm(), (0 == e && "entitydata" != currentCommand && "data merge entity" != currentCommand) || $("#entityPane" + e + "L br:first").remove(), $("#entityPane" + e + "R br:first").remove()), cachedNBT.loadCachedEntityNBT(e), generateCommand(); } function entityChangeSpawnEgg(e) { $("#entityPane" + e).html( "
" ), (entityDescriptors["e" + e] = loadEntityClass( $("#entity" + e).val(), e )), (entityDescriptors["e" + e].passengersAllowed = !1), entityDescriptors["e" + e].generateForm(), $("#entityPane" + e + "L br:first").remove(), $("#entityPane" + e + "R br:first").remove(), cachedNBT.loadCachedEntityNBT(e), generateCommand(); } function updateEntitySelectOptionsForSpawnEgg(e, t) { for ( var a = $(e).val(), o = $(e + "_filter") .val() .toLowerCase(), n = [], s = 0; s < entities.length; s++ ) (0 != o.length && -1 == entities[s].toLowerCase().indexOf(o)) || n.push( '" ); $(e).html(n.join("")), a != $(e).val() && (cachedNBT.updateFilterLastUsed(), entityChangeSpawnEgg(t)); } class TargetSelector { constructor(e, t, a, o) { var n = void 0 == a ? "" : a; (this.forPlayers = t), (this.forNonPlayerEnts = e), (this.tsNBT = { c: { label: "Limit", type: "text", cssClass: "fLabel150", tip: "target.limit", format: "int", }, sort: { label: "Sort", type: "makeSelect", values: [ "unset", "nearest", "furthest", "random", "arbitrary", ], cssClass: "fLabel150", tip: "target.sort", format: "special", }, x: { type: "text", label: "x", cssClass: "fLabel150", tip: "target.coordinates", format: "int", }, y: { type: "text", label: "y", cssClass: "fLabel150", tip: "target.coordinates", format: "int", }, z: { type: "text", label: "z", cssClass: "fLabel150", tip: "target.coordinates", format: "int", }, tsSelectionArea: { label: "Selection Area", type: "choice", cssClass: "fLabel150", values: [ [0, "Radius"], [1, "Volume"], ], tip: "target.selectionArea", format: "special", }, tsAreaPane: { cssClass: "fLabel150", panelID: n + "tsAreaPane", type: "panel", format: "special", }, rxm: { type: "text", label: "Min Vert Rotation", cssClass: "fLabel150", tip: "target.rxm", format: "int", }, rx: { type: "text", label: "Max Vert Rotation", cssClass: "fLabel150", tip: "target.rx", format: "int", }, rym: { type: "text", label: "Min Horiz Rotation", cssClass: "fLabel150", tip: "target.rym", format: "int", }, ry: { type: "text", label: "Max Horiz Rotation", cssClass: "fLabel150", tip: "target.ry", format: "int", }, team: { type: "choicetext", label: "Team", cssClass: "fLabel150", values: [ [0, "Only this team"], [1, "Not this team"], [2, "Not any team"], [3, "On any team"], ], tip: "target.team", }, name: { type: "choicetext", label: "Name", cssClass: "fLabel150", values: [ [0, "This name"], [1, "Not this name"], ], tip: "target.name", format: "special", }, }), (this.tsRadius = { rm: { type: "text", label: "Min Radius", cssClass: "fLabel150", eventClass: "selectArea", tip: "target.rm", }, r: { type: "text", label: "Max Radius", cssClass: "fLabel150", eventClass: "selectArea", tip: "target.r", }, }), (this.tsVolume = { dx: { type: "text", label: "Positive X Direction", cssClass: "fLabel150", eventClass: "selectArea", tip: "target.dx", }, dy: { type: "text", label: "Positive Y Direction", cssClass: "fLabel150", eventClass: "selectArea", tip: "target.dy", }, dz: { type: "text", label: "Positive Z Direction", cssClass: "fLabel150", eventClass: "selectArea", tip: "target.dz", }, }), (this.tsNBT.nbt = { type: "text", label: "NBT", fwClass: "verybigTF", cssClass: "fLabel150", tip: "target.nbt", format: "special", }), t ? ((this.tsNBT.m = { type: "choice", label: "Game Mode", cssClass: "fLabel150", values: [ ["-1", "Any Mode"], ["survival", "Survival Mode"], ["creative", "Creative Mode"], ["adventure", "Adventure Mode"], ["spectator", "Spectator Mode"], ["!survival", "Not Survival Mode"], ["!creative", "Not Creative Mode"], ["!adventure", "Not Adventure Mode"], ["!spectator", "Not Spectator Mode"], ], tip: "target.m", }), (this.tsNBT.lm = { type: "text", label: "Min XP Level", cssClass: "fLabel150", tip: "target.lm", format: "int", }), (this.tsNBT.l = { type: "text", label: "Max XP Level", cssClass: "fLabel150", tip: "target.l", format: "int", }), (this.tsNBT.advancements = { type: "text", label: "Advancements", fwClass: "bigTF", cssClass: "fLabel150", tip: "target.advancements", format: "special", })) : void 0 != o && o && (this.tsNBT.type = { type: "text", label: "Type", cssClass: "fLabel150", fwClass: "bigTF", tip: "target.type113", format: "special", }), (this.tsNBT.tag = { type: "text", label: "Tags", cssClass: "fLabel150", fwClass: "bigTF", tip: "target.tag113", format: "special", }); } } function loadTargetSelectorsGeneric(e, t, a, o) { var n = void 0 == o ? "" : o; $("#" + e).append( "
Target Selectors" + mkShowHide(n + "TSPane", "TSPaneSH") + "
" ); var s = new TargetSelector(t, a, n, !0); for (var i in (a && (createComponent( n + "TSPane", n + "targetType", { type: "choicetext", value: "@p", label: "Target", cssClass: "fLabel150", values: [ ["@p", "nearest player"], ["@r", "random player"], ["@a", "all players"], ["@s", "the entity executing the command"], ["MC_Name", "A specific players name"], ], tip: "target.targetType", format: "string", eventClass: "tsTargetType", }, 0 ), $(".tsTargetType").bind("change", function () { "MC_Name" != $("#" + n + "targetType0_choice").val() && $("#" + n + "targetType0_txt").val( $("#" + n + "targetType0_choice").val() ), generateCommand(); })), s.tsNBT)) createComponent(n + "TSPane", n + i, s.tsNBT[i], 0); $("#" + n + "TSPane br:first").remove(), loadTSAreaOption(0, n, s), $("#" + n + "tsSelectionArea0").bind("change", function () { loadTSAreaOption($("#" + n + "tsSelectionArea0").val(), n, s), generateCommand(); }), $("#" + n + "TSPane").append( "
Score Objectives+
" ); } function loadTargetSelectors(e, t, a, o, n) { var s = void 0 == o ? "" : o; $("#" + e).append( "
Target Selectors" + mkShowHide(s + "TSPane", "TSPaneSH") + "
" ); var i = new TargetSelector(t, a, s, n); for (var r in (a && (createComponent( s + "TSPane", s + "targetType", { type: "choicetext", value: "@p", label: "Target", cssClass: "fLabel150", values: [ ["@p", "nearest player"], ["@r", "random player"], ["@a", "all players"], ["@s", "the entity executing the command"], ["MC_Name", "A specific players name"], ], tip: "target.targetType", format: "string", eventClass: "tsTargetType", }, 0 ), $(".tsTargetType").bind("change", function () { "MC_Name" != $("#" + s + "targetType0_choice").val() && $("#" + s + "targetType0_txt").val( $("#" + s + "targetType0_choice").val() ), generateCommand(); })), i.tsNBT)) createComponent(s + "TSPane", s + r, i.tsNBT[r], 0); $("#" + s + "TSPane br:first").remove(), loadTSAreaOption(0, s, i), $("#" + s + "tsSelectionArea0").bind("change", function () { loadTSAreaOption($("#" + s + "tsSelectionArea0").val(), s, i), generateCommand(); }), $("#" + s + "TSPane").append( "
Score Objectives+
" ); } function loadTargetSelectorsFromCommandGeneric(e, t) { var a = void 0 == t ? "" : t; if ("@" == e.charAt(0)) { if (-1 == e.indexOf("[")) $("#" + a + "targetType0_choice").val(e); else { $("#" + a + "targetType0_choice").val(e.substr(0, e.indexOf("["))); var o = e.substr(e.indexOf("[") + 1); o = o.substr(0, o.indexOf("]")).split(","); for (var n = 0; n < o.length; n++) for ( ; n + 1 < o.length && occurrences(o[n], "{", !1) != occurrences(o[n], "}", !1); ) (o[n] += "," + o[n + 1]), o.splice(n + 1, 1); var s = { gamemode: "m", limit: "c", x: "x", y: "y", z: "z", sort: "sort", advancements: "advancements", nbt: "nbt", }, i = { x_rotation: ["rxm", "rx"], y_rotation: ["rym", "ry"], distance: ["rm", "r"], level: ["lm", "l"], }; for (n = 0; n < o.length; n++) { var r = o[n].substr(0, o[n].indexOf("=")), l = o[n].substr(o[n].indexOf("=") + 1); if (r in s) $("#" + a + s[r] + "0").val(l); else if (r in i) setRangedTSValues(l, a + i[r][0] + "0", a + i[r][1] + "0"); else if ("dx" == r || "dy" == r || "dz" == r) 0 == $("#" + a + "tsSelectionArea0").val() && ($("#" + a + "tsSelectionArea0").val(1), $("#" + a + "tsSelectionArea0").trigger("change")), $("#" + a + r + "0").val(l); else if ("name" == r) "!" == l.charAt(0) ? ($("#" + a + r + "0_choice").val(1), $("#" + a + r + "0_txt").val( replaceAll('"', "", l.substr(1)) )) : ($("#" + a + r + "0_choice").val(0), $("#" + a + r + "0_txt").val(replaceAll('"', "", l))); else if ("team" == r) "" == l ? $("#" + a + r + "0_choice").val(2) : "!" == l ? $("#" + a + r + "0_choice").val(3) : "!" == l.charAt(0) ? ($("#" + a + r + "0_choice").val(1), $("#" + a + r + "0_txt").val(l.substr(1))) : ($("#" + a + r + "0_choice").val(0), $("#" + a + r + "0_txt").val(l)); else if ("tag" == r) $("#" + a + r + "0").val().length > 0 && $("#" + a + r + "0").val( $("#" + a + r + "0").val() + "," ), $("#" + a + r + "0").val( $("#" + a + r + "0").val() + l ); else if ("type" == r) $("#" + a + r + "0").val().length > 0 && $("#" + a + r + "0").val( $("#" + a + r + "0").val() + "," ), $("#" + a + r + "0").val( $("#" + a + r + "0").val() + l ); else if ("scores" == r) for ( var c = (l = replaceAll( "{", "", replaceAll("}", "", l) )).split(","), d = 0; d < c.length; d++ ) { var p = c[d].split("="); addScoreObjective(a + "tsScore", a); var m = d + 1; $("#" + a + "scoreObjective" + m + "Name0").val(p[0]), setRangedTSValues( p[1], a + "scoreObjective" + m + "Min0", a + "scoreObjective" + m + "Max0" ); } } } $("#" + a + "targetType0_choice").trigger("change"); } else $("#" + a + "targetType0_txt").val(e); } function loadTargetSelectorsFromCommand113(e, t) { var a = void 0 == t ? "" : t; if ("@" == e.charAt(0)) { if (-1 == e.indexOf("[")) $("#" + a + "targetType0_choice").val(e); else { $("#" + a + "targetType0_choice").val(e.substr(0, e.indexOf("["))); var o = e.substr(e.indexOf("[") + 1); o = o.substr(0, o.lastIndexOf("]")).split(","); for (var n = 0; n < o.length; n++) for ( ; n + 1 < o.length && occurrences(o[n], "{", !1) != occurrences(o[n], "}", !1); ) (o[n] += "," + o[n + 1]), o.splice(n + 1, 1); var s = { gamemode: "m", limit: "c", x: "x", y: "y", z: "z", sort: "sort", advancements: "advancements", nbt: "nbt", }, i = { x_rotation: ["rxm", "rx"], y_rotation: ["rym", "ry"], distance: ["rm", "r"], level: ["lm", "l"], }; for (n = 0; n < o.length; n++) { var r = o[n].substr(0, o[n].indexOf("=")), l = o[n].substr(o[n].indexOf("=") + 1); if (r in s) $("#" + a + s[r] + "0").val(l); else if (r in i) setRangedTSValues(l, i[r][0] + "0", i[r][1] + "0"); else if ("dx" == r || "dy" == r || "dz" == r) 0 == $("#" + a + "tsSelectionArea0").val() && ($("#" + a + "tsSelectionArea0").val(1), $("#" + a + "tsSelectionArea0").trigger("change")), $("#" + r + "0").val(l); else if ("type" == r) { if ( !$("#" + a + "entity0 option[value='" + l + "']").length ) throw new MCSException( l + " is not a valid entity in the target selector." ); $("#" + a + "entity0").val(l), $("#" + a + "entity0").trigger("change"); } else if ("name" == r) "!" == l.charAt(0) ? ($("#" + a + r + "0_choice").val(1), $("#" + a + r + "0_txt").val( replaceAll('"', "", l.substr(1)) )) : ($("#" + a + r + "0_choice").val(0), $("#" + a + r + "0_txt").val(replaceAll('"', "", l))); else if ("team" == r) "" == l ? $("#" + a + r + "0_choice").val(2) : "!" == l ? $("#" + a + r + "0_choice").val(3) : "!" == l.charAt(0) ? ($("#" + a + r + "0_choice").val(1), $("#" + a + r + "0_txt").val(l.substr(1))) : ($("#" + a + r + "0_choice").val(0), $("#" + a + r + "0_txt").val(l)); else if ("tag" == r) $("#" + a + r + "0").val().length > 0 && $("#" + a + r + "0").val( $("#" + a + r + "0").val() + "," ), $("#" + a + r + "0").val( $("#" + a + r + "0").val() + l ); else if ("scores" == r) for ( var c = (l = replaceAll( "{", "", replaceAll("}", "", l) )).split(","), d = 0; d < c.length; d++ ) { var p = c[d].split("="); addScoreObjective(a + "tsScore", a); var m = d + 1; $("#" + a + "scoreObjective" + m + "Name0").val(p[0]), setRangedTSValues( p[1], a + "scoreObjective" + m + "Min0", a + "scoreObjective" + m + "Max0" ); } } } $("#" + a + "targetType0_choice").trigger("change"); } else $("#" + a + "targetType0_txt").val(e); } function setRangedTSValues(e, t, a) { var o = e.split(".."); -1 == e.indexOf("..") ? ($("#" + t).val(o[0]), $("#" + a).val(o[0])) : "." == e.charAt(0) ? $("#" + a).val(o[1]) : "." == e.charAt(e.length - 1) ? $("#" + t).val(o[0]) : ($("#" + t).val(o[0]), $("#" + a).val(o[1])); } function loadTargetSelectorsFromCommand(e, t) { var a = void 0 == t ? "" : t; if ("@" == e.charAt(0)) { if (-1 == e.indexOf("[")) $("#" + a + "targetType0_choice").val(e); else { $("#" + a + "targetType0_choice").val(e.substr(0, e.indexOf("["))); var o = e.substr(e.indexOf("[") + 1); o = o.substr(0, o.indexOf("]")).split(","); for ( var n = [ "c", "x", "y", "z", "rxm", "rx", "rym", "ry", "lm", "l", "m", "r", "rm", ], s = [], i = 0; i < o.length; i++ ) { var r, l = o[i].split("=")[0]; try { r = o[i].split("=")[1]; } catch (e) { r = ""; } if (-1 != n.indexOf(l)) $("#" + a + l + "0").val(r); else if ("dx" == l || "dy" == l || "dz" == l) 0 == $("#" + a + "tsSelectionArea0").val() && ($("#" + a + "tsSelectionArea0").val(1), $("#" + a + "tsSelectionArea0").trigger("change")), $("#" + l + "0").val(r); else if ("type" == l) { if ( !$("#" + a + "entity0 option[value='" + r + "']").length ) throw new MCSException( r + " is not a valid entity in the target selector." ); $("#" + a + "entity0").val(r), $("#" + a + "entity0").trigger("change"); } else if ("name" == l) "!" == r.charAt(0) ? ($("#" + a + l + "0_choice").val(1), $("#" + a + l + "0_txt").val(r.substr(1))) : ($("#" + a + l + "0_choice").val(0), $("#" + a + l + "0_txt").val(r)); else if ("team" == l || "tag" == l) "" == r ? $("#" + a + l + "0_choice").val(2) : "!" == r ? $("#" + a + l + "0_choice").val(3) : "!" == r.charAt(0) ? ($("#" + a + l + "0_choice").val(1), $("#" + a + l + "0_txt").val(r.substr(1))) : ($("#" + a + l + "0_choice").val(0), $("#" + a + l + "0_txt").val(r)); else if (-1 != l.indexOf("score_")) { var c = l.split("_"); -1 == s.indexOf(c[1]) && (addScoreObjective(a + "tsScore", a), s.push(c[1])), (scoreIndex = s.indexOf(c[1]) + 1), $( "#" + a + "scoreObjective" + scoreIndex + "Name0" ).val(c[1]), 2 == c.length ? $( "#" + a + "scoreObjective" + scoreIndex + "Max0" ).val(r) : $( "#" + a + "scoreObjective" + scoreIndex + "Min0" ).val(r); } } } $("#" + a + "targetType0_choice").trigger("change"); } else $("#" + a + "targetType0_txt").val(e); } function getTargetSelectorStringGeneric(e) { var t, a; t = void 0 == e ? "" : e; var o = $("#" + t).length > 0 && "player" != $("#" + t).val(), n = ($("#" + t).length && "player" == $("#" + t).val()) || !$("#" + t).length; a = new TargetSelector(o, n, t); var s = ""; if ( ($("#" + t + "m0").length && -1 != $("#" + t + "m0").val() && (s += ",gamemode=" + $("#" + t + "m0").val()), (s += getTSRange("level", t + "lm0", t + "l0")), (s += getTSRange("x_rotation", t + "rxm0", t + "rx0")), (s += getTSRange("y_rotation", t + "rym0", t + "ry0")), "" != $("#" + t + "c0").val() && (s += ",limit=" + $("#" + t + "c0").val()), $("#" + t + "sort0").length && "unset" != $("#" + t + "sort0").val() && (s += ",sort=" + $("#" + t + "sort0").val()), "" != $("#" + t + "x0").val() && (s += ",x=" + $("#" + t + "x0").val()), "" != $("#" + t + "y0").val() && (s += ",y=" + $("#" + t + "y0").val()), "" != $("#" + t + "z0").val() && (s += ",z=" + $("#" + t + "z0").val()), 0 == $("#" + t + "tsSelectionArea0").val() ? (s += getTSRange("distance", t + "rm0", t + "r0")) : ((s += replaceAll( ":", "=", getNBTforKey(t + "dx", a.tsVolume.dx, 0) )), (s += replaceAll( ":", "=", getNBTforKey(t + "dy", a.tsVolume.dy, 0) )), (s += replaceAll( ":", "=", getNBTforKey(t + "dz", a.tsVolume.dz, 0) ))), 2 == $("#" + t + "team0_choice").val() ? (s += ",team=") : 3 == $("#" + t + "team0_choice").val() ? (s += ",team=!") : $("#" + t + "team0_txt").val().length && ((s += ",team="), 1 == $("#" + t + "team0_choice").val() && (s += "!"), (s += $("#" + t + "team0_txt").val())), $("#" + t + "tag0").val().length) ) { for ( var i = $("#" + t + "tag0") .val() .split(","), r = "", l = 0; l < i.length; l++ ) r += ",tag=" + i[l]; s += r; } $("#" + t + "advancements0").length && $("#" + t + "advancements0").val().length && (s += ",advancements=" + $("#" + t + "advancements0").val()), $("#" + t + "nbt0").val().length && (s += ",nbt=" + $("#" + t + "nbt0").val()); var c = ""; if ( ($("#" + t + "tsScore > .score").each(function (e) { if ($("#" + this.id + "Name0").val().length) { var t = $("#" + this.id + "Name0").val(); c += getTSRange(t, this.id + "Min0", this.id + "Max0"); } }), c.length && (s += ",scores={" + c.substr(1) + "}"), $("#" + t + "name0_txt").val().length && ((s += ",name="), 1 == $("#" + t + "name0_choice").val() && (s += "!"), (s += '"' + $("#" + t + "name0_txt").val() + '"')), (s = replaceAll(t, "", s)), o) ) { if ($("#" + t + "type0").val().length) { for ( i = $("#" + t + "type0") .val() .split(","), r = "", l = 0; l < i.length; l++ ) r += ",type=" + i[l]; s += r; } return s.length ? "@e[" + s.substr(1) + "]" : "@e"; } return ( s.length && (s = "[" + s.substr(1) + "]"), $("#" + t + "targetType0_txt").val() + s ); } function getTargetSelectorString1p13(e) { var t, a; t = void 0 == e ? "" : e; var o = $("#" + t + "entity0").length > 0 && "player" != $("#" + t + "entity0").val(), n = ($("#" + t + "entity0").length && "player" == $("#" + t + "entity0").val()) || !$("#" + t + "entity0").length; a = new TargetSelector(o, n, t); var s = ""; if ( ($("#" + t + "m0").length && -1 != $("#" + t + "m0").val() && (s += ",gamemode=" + $("#" + t + "m0").val()), (s += getTSRange("level", t + "lm0", t + "l0")), (s += getTSRange("x_rotation", t + "rxm0", t + "rx0")), (s += getTSRange("y_rotation", t + "rym0", t + "ry0")), "" != $("#" + t + "c0").val() && (s += ",limit=" + $("#" + t + "c0").val()), $("#" + t + "sort0").length && "unset" != $("#" + t + "sort0").val() && (s += ",sort=" + $("#" + t + "sort0").val()), "" != $("#" + t + "x0").val() && (s += ",x=" + $("#" + t + "x0").val()), "" != $("#" + t + "y0").val() && (s += ",y=" + $("#" + t + "y0").val()), "" != $("#" + t + "z0").val() && (s += ",z=" + $("#" + t + "z0").val()), 0 == $("#" + t + "tsSelectionArea0").val() ? (s += getTSRange("distance", t + "rm0", t + "r0")) : ((s += replaceAll( ":", "=", getNBTforKey(t + "dx", a.tsVolume.dx, 0) )), (s += replaceAll( ":", "=", getNBTforKey(t + "dy", a.tsVolume.dy, 0) )), (s += replaceAll( ":", "=", getNBTforKey(t + "dz", a.tsVolume.dz, 0) ))), 2 == $("#" + t + "team0_choice").val() ? (s += ",team=") : 3 == $("#" + t + "team0_choice").val() ? (s += ",team=!") : $("#" + t + "team0_txt").val().length && ((s += ",team="), 1 == $("#" + t + "team0_choice").val() && (s += "!"), (s += $("#" + t + "team0_txt").val())), $("#" + t + "tag0").val().length) ) { for ( var i = $("#" + t + "tag0") .val() .split(","), r = "", l = 0; l < i.length; l++ ) r += ",tag=" + i[l]; s += r; } $("#" + t + "advancements0").length && $("#" + t + "advancements0").val().length && (s += ",advancements=" + $("#" + t + "advancements0").val()), $("#" + t + "name0_txt").val().length && ((s += ",name="), 1 == $("#" + t + "name0_choice").val() && (s += "!"), (s += '"' + $("#" + t + "name0_txt").val() + '"')), (s = replaceAll(t, "", s)); var c = ""; return ( $("#" + t + "tsScore > .score").each(function (e) { if ($("#" + this.id + "Name0").val().length) { var t = $("#" + this.id + "Name0").val(); c += getTSRange(t, this.id + "Min0", this.id + "Max0"); } }), c.length && (s += ",scores={" + c.substr(1) + "}"), $("#" + t + "nbt0").val().length && (s += ",nbt=" + $("#" + t + "nbt0").val()), o ? "@e[type=" + $("#" + t + "entity0").val() + s + "]" : (s.length && (s = "[" + s.substr(1) + "]"), $("#" + t + "targetType0_txt").val() + s) ); } function getTSRange(e, t, a) { if (!$("#" + t).length && !$("#" + a).length) return ""; var o = $("#" + t).val(), n = $("#" + a).val(); return o == n && "" == o ? "" : o == n ? "," + e + "=" + o : "" != o && "" != n ? "," + e + "=" + o + ".." + n : "" != o ? "," + e + "=" + o + ".." : "" != n ? "," + e + "=.." + n : ""; } function addScoreObjective(e, t) { var a = t + "scoreObjective" + ++tsScoreObjectiveCount; $("#" + e).append( "" ), createComponent( a, a + "Name", { label: "Objective Name", type: "text", cssClass: "fLabel100", eventClass: "scoreObjective", tip: "target.objectiveName", }, 0 ), createComponent( a, a + "Min", { label: "Min Score", type: "text", cssClass: "fLabel100", eventClass: "scoreObjective", tip: "target.scoreMin", }, 0 ), createComponent( a, a + "Max", { label: "Max Score", type: "text", cssClass: "fLabel100", eventClass: "scoreObjective", tip: "target.scoreMax", }, 0 ), $(".scoreObjective").bind("keyup", function () { generateCommand(); }), generateCommand(); } function loadTSAreaOption(e, t, a) { $("#" + t + "tsAreaPane").html(""), 0 == e ? (createComponent(t + "tsAreaPane", t + "rm", a.tsRadius.rm, 0), createComponent(t + "tsAreaPane", t + "r", a.tsRadius.r, 0)) : (createComponent(t + "tsAreaPane", t + "dx", a.tsVolume.dx, 0), createComponent(t + "tsAreaPane", t + "dy", a.tsVolume.dy, 0), createComponent(t + "tsAreaPane", t + "dz", a.tsVolume.dz, 0)), $(".selectArea").bind("keyup", function () { generateCommand(); }), $("#" + t + "tsAreaPane br:first").remove(); } function removePassenger(e, t) { $("#" + e) .parent() .children("br:first") .remove(), $("#" + e).remove(), $("#" + e + "SH").remove(), delete entityDescriptors["e" + t], generateCommand(); } function showClipboard() { $("#clipBoard").css({ top: mouse.y + 200, left: mouse.x }), $("#clipBoard").show(), $("#clipBoard-ta").val(clipboard[$("#nbtType").val()]); } function copyEntityNBT(e) { (clipboard[1] = '{id:"minecraft:' + $("#entity" + e).val() + '"' + entityDescriptors["e" + e].getEntitySpecificCommand(e) + "}"), copyToClipboard(clipboard[1]), $("#nbtType").val(1), $("#clipBoard-ta").val(clipboard[1]); } function pasteEntityNBT(e) { try { let o = new CMDParser(""); var t = o.parseCompound( extractSegment( "{", "}", clipboard[1].indexOf("{"), clipboard[1] ) ), a = extractMinecraftID(t.id.val); $("#entity" + e + "_filter").val(""), $("#entity" + e + "_filter").trigger("keyup"), $("#entity" + e).val(a), $("#entity" + e).trigger("change"), o.loadSummonCommand(t, e), generateCommand(); } catch (e) { alertify.alert( "Error Can't load in this NBT:
" + clipboard[1] + "
" + e.toString() ); } } function copyItemNBT(e) { (clipboard[0] = getItemNBT(e)), copyToClipboard(clipboard[0]), $("#nbtType").val(0), $("#clipBoard-ta").val(clipboard[0]); } function getTradeNBT(e) { let t = ""; -1 != $("#" + e + "rewardExp").val() && (t += ",rewardExp:" + $("#" + e + "rewardExp").val() + "b"), $("#" + e + "maxUses").val().length && (t += ",maxUses:" + $("#" + e + "maxUses").val()), $("#" + e + "uses").val().length && (t += ",uses:" + $("#" + e + "uses").val()), $("#" + e + "xp").val().length && (t += ",xp:" + $("#" + e + "xp").val()), $("#" + e + "priceMultiplier").val().length && (t += ",priceMultiplier:" + $("#" + e + "priceMultiplier").val() + "f"), $("#" + e + "specialPrice").val().length && (t += ",specialPrice:" + $("#" + e + "specialPrice").val()), $("#" + e + "demand").val().length && (t += ",demand:" + $("#" + e + "demand").val()); var a = getItemNBT(e + "buy"); return ( "{}" != a && (t += ",buy:" + a), "{}" != (a = getItemNBT(e + "buyB")) && (t += ",buyB:" + a), "{}" != (a = getItemNBT(e + "sell")) && (t += ",sell:" + a), t ); } function addTradeFromNBT(e, t, a) { void 0 != e.rewardExp && $("#" + t + "rewardExp").val(parseInt(e.rewardExp.val)), void 0 != e.uses && $("#" + t + "uses").val(parseInt(e.uses.val)), void 0 != e.maxUses && $("#" + t + "maxUses").val(parseInt(e.maxUses.val)), void 0 != e.xp && $("#" + t + "xp").val(parseInt(e.xp.val)), void 0 != e.priceMultiplier && $("#" + t + "priceMultiplier").val( parseFloat(e.priceMultiplier.val) ), void 0 != e.specialPrice && $("#" + t + "specialPrice").val(parseInt(e.specialPrice.val)), void 0 != e.demand && $("#" + t + "demand").val(parseInt(e.demand.val)), void 0 != e.buy && setupItemTradeSlotForNBT(t + "buy", e.buy.val, a), void 0 != e.buyB && setupItemTradeSlotForNBT(t + "buyB", e.buyB.val, a), void 0 != e.sell && setupItemTradeSlotForNBT(t + "sell", e.sell.val, a); } function setupItemTradeSlotForNBT(e, t, a) { if (void 0 != t.id) { var o = extractMinecraftID(t.id.val); if ( (void 0 != t.Damage && $("#" + e + " option[value='" + o + ":" + t.Damage.val + "']") .length && (o += ":" + t.Damage.val), $("#" + e).length) ) $("#" + e).val(o), $("#" + e).trigger("change"), loadItemNBTIntoSlot(t, o, e, a); else { var n = a.traverseObjectToNBT(t, ""); (n = replaceAll(",tag{}", "", (n = attribConverter(n)))), cachedNBT.setNBT(e, "," + n), $("#" + e + "Pane > .itemNBT").remove(), $("#" + e + "Pane").append( "
{" + n + "}
" ); } } } function copyTradeNBT(e) { $("#closeItemUI_" + e + "buy").trigger("click"), $("#closeItemUI_" + e + "buyB").trigger("click"), $("#closeItemUI_" + e + "sell").trigger("click"), (clipboard[2] = getTradeNBT(e)), clipboard[2].length && (clipboard[2] = "{" + clipboard[2].substr(1) + "}"), copyToClipboard(clipboard[2]), $("#nbtType").val(2), $("#clipBoard-ta").val(clipboard[2]); } function pasteTradeNBT(e) { $("#closeItemUI_" + e + "buy").trigger("click"), $("#closeItemUI_" + e + "buyB").trigger("click"), $("#closeItemUI_" + e + "sell").trigger("click"); try { let t = new CMDParser(""); addTradeFromNBT( t.parseCompound( extractSegment( "{", "}", clipboard[2].indexOf("{"), clipboard[2] ) ), e, t ), generateCommand(); } catch (e) { alertify.alert( "Error Can't load in this Trade:
" + clipboard[2] + "
" + e.toString() ); } } function moveTrade(e, t) { let a = e.substr(0, e.indexOf("_")), o = []; $("#" + a + " > .trade").each(function (e) { o.push(this.id); }); let n = o.indexOf(e); if ((1 == t && n < o.length - 1) || (-1 == t && n > 0)) { let e = n + t; $("#closeItemUI_" + o[n] + "buy").trigger("click"), $("#closeItemUI_" + o[n] + "buyB").trigger("click"), $("#closeItemUI_" + o[n] + "sell").trigger("click"), $("#closeItemUI_" + o[e] + "buy").trigger("click"), $("#closeItemUI_" + o[e] + "buyB").trigger("click"), $("#closeItemUI_" + o[e] + "sell").trigger("click"); let a = getTradeNBT(o[n]); (aNBT = getTradeNBT(o[e])), (bNBT = a), aNBT.length && (aNBT = "{" + aNBT.substr(1) + "}"), bNBT.length && (bNBT = "{" + bNBT.substr(1) + "}"); let s = new CMDParser(""), i = s.parseCompound( extractSegment("{", "}", aNBT.indexOf("{"), aNBT) ); addTradeFromNBT(i, o[n], s), addTradeFromNBT( (i = s.parseCompound( extractSegment("{", "}", bNBT.indexOf("{"), bNBT) )), o[e], s ), generateCommand(); } } function pasteItemNBT(e) { try { let o = new CMDParser(""); var t = o.parseCompound( extractSegment( "{", "}", clipboard[0].indexOf("{"), clipboard[0] ) ), a = extractMinecraftID(t.id.val); if ( ($("#" + e + "_filter").val(""), updateItemSelectOptions("#" + e), !$("#" + e + " option[value='" + a + "']").length) ) throw new MCSException(a + " is not a valid item id"); $("#" + e).val(a), $("#" + e).trigger("change"), loadItemNBTIntoSlot(t, a, e, o), generateCommand(); } catch (e) { alertify.alert( "Error Can't load in this Item:
" + clipboard[0] + "
" + e.toString() ); } } function loadCBType() { $("#clipBoard-ta").val(clipboard[parseInt($("#nbtType").val())]); } function removeSpawnPotential(e) { $("#spawnPotentialEntity_" + e) .parent() .children("br:first") .remove(), $("#spawnPotentialEntity_" + e).remove(), $("#spawnPotentialEntity_" + e + "SH").remove(), delete entityDescriptors["e" + e], generateCommand(); } function copyToClipboard(e) { var t = $(""); $("body").append(t), t.val(e).select(), document.execCommand("copy"), t.remove(); } function getExecuteString() { return $("#exeString").val() + " "; } function generateCommand() { if ( !deferJSONOutput && !deferOutput && !$("#disableOutput").is(":checked") ) { if ( ($("#commandOutput").show(), (parseInt($("#commandOutput").css("top")) < 0 || parseInt($("#commandOutput").css("top")) > $(window).height() || parseInt($("#commandOutput").css("left")) < 0 || parseInt($("#commandOutput").css("left")) > $(window).width()) && $("#commandOutput").css({ top: 0, left: $(window).width() - 510, }), "loot_table" == currentCommand) ) return ( $("#commandOutput-ta").val(generateLootTable()), $("#commandString").val($("#commandOutput-ta").val()), void outputCharacterCount("") ); var e = settings.removeSlash ? "" : "/"; try { if ( ($("#exeString").length && (e += getExecuteString()), (e += currentCommand + " "), "summon" == currentCommand) ) { var t = getCoordsString("Summon"); settings.namespace.length && (e += settings.namespace + ":"), (e += $("#entity0").val() + " " + t[0] + " " + t[1] + " " + t[2]); var a = entityDescriptors.e0.getEntitySpecificCommand(0); cachedNBT.setNBT("e0", a), a.length > 0 && (e += " {" + a.substring(1) + "}"); } else if ( "execute if entity" == currentCommand || "kill" == currentCommand ) { a = entityDescriptors.e0.getEntitySpecificCommand(0); cachedNBT.setNBT("e0", a), a.length > 0 && $("#nbt0").val("{" + a.substring(1) + "}"), (e += getTargetSelectorString1p13()); } else if ("give" == currentCommand) { (e += getTargetSelectorString1p13()), (a = getItemNBTForGive1p13("GiveItem0")).length > 0 && (e += a); } else if ("teleport" == currentCommand) { if ( ((e += getTargetSelectorStringGeneric("entity0") + " "), "block" == $("#target0").val()) ) e += (t = getCoordsString("Block"))[0] + " " + t[1] + " " + t[2]; else e += getTargetSelectorStringGeneric("target0"); } else if ("replaceitem" == currentCommand) { if ("entity" == $("#replaceitem").val()) e += "entity " + getTargetSelectorString1p13() + " " + $("#Slot0").val(); else (e += "block " + (t = getCoordsString("Block"))[0] + " " + t[1] + " " + t[2]), $("#Slot0").val().length ? (e += " container." + $("#Slot0").val()) : (e += " container.0"); (a = getItemNBTForGive1p13("GiveItem0")).length > 0 && (e += a); } else if ("setblock" == currentCommand) { (e += (t = getCoordsString("Block"))[0] + " " + t[1] + " " + t[2] + " "), settings.namespace.length && (e += settings.namespace + ":"); let a = block.getBlockNBT(); (e += $("#block").val() + getBlockStates($("#block").val(), "BS0") + a), cachedNBT.setBlockNBT("BS0", a), (e += " " + $("#blockHandle").val()); } else if ("fill" == currentCommand) { (e += (t = getCoordsString("Corner"))[0] + " " + t[1] + " " + t[2]), (e += " " + (t = getCoordsString("Opposite"))[0] + " " + t[1] + " " + t[2] + " "), settings.namespace.length && (e += settings.namespace + ":"); let a = block.getBlockNBT(); (e += $("#block").val() + getBlockStates($("#block").val(), "BS0") + a), cachedNBT.setBlockNBT("BS0", a), (e += " " + $("#blockHandle").val()), -1 != $("#replaceblock").val() && ((e += " "), settings.namespace.length && (e += settings.namespace + ":"), (e += $("#replaceblock").val() + getBlockStates( $("#replaceblock").val(), "ReplaceBS0" ))); } else if ("loot" == currentCommand) { if ( ((e += $("#targetType").val()), "spawn" == $("#targetType").val() || "insert" == $("#targetType").val() || "replace block" == $("#targetType").val() ? (e += " " + (t = getCoordsString("Loot"))[0] + " " + t[1] + " " + t[2]) : ("give" != $("#targetType").val() && "replace entity" != $("#targetType").val()) || (e += " " + getTargetSelectorStringGeneric("entity0")), ("replace entity" != $("#targetType").val() && "replace block" != $("#targetType").val()) || (e += " " + $("#slot").val()), (e += " " + $("#sourceType").val()), "loot" == $("#sourceType").val() || "fish" == $("#sourceType").val()) ) { if ( ((e += " " + $("#LootTable").val()), "fish" == $("#sourceType").val()) ) (e += " " + (t = getCoordsString("Fishing"))[0] + " " + t[1] + " " + t[2]), (e += (a = getItemNBTForGive1p13( "FishingTool0" )).substr(0, a.lastIndexOf(" "))); } else if ("mine" == $("#sourceType").val()) { (e += " " + (t = getCoordsString("Mining"))[0] + " " + t[1] + " " + t[2]), (e += (a = getItemNBTForGive1p13("MiningTool0")).substr( 0, a.lastIndexOf(" ") )); } else "kill" == $("#sourceType").val() && (e += " " + getTargetSelectorStringGeneric("kill0")); } else if ("bossbar" == currentCommand) (e += $("#action").val() + " " + $("#ID0").val().toLowerCase()), "set" == $("#action").val() ? ((e += " " + $("#set").val()), "name" == $("#set").val() ? (e += " " + tellrawJson.getJsonForTellraw( "bossbarPane" )) : "players" == $("#set").val() && (e += " " + getVersionSpecificTargetSelectorString())) : (e += " " + tellrawJson.getJsonForTellraw("bossbarPane")); else if ("team" == currentCommand) (e += $("#add_modify").val() + " " + ($("#team").val() || "TeamName") + " "), "modify" == $("#add_modify").val() && (e += $("#Part0").val() + " "), (e += tellrawJson.getJsonForTellraw("teamPane")); else if ("scoreboard" == currentCommand) (e += "objectives " + $("#add_modify").val() + " " + ($("#objective").val() || "ObjectiveName") + " "), "add" == $("#add_modify").val() ? (e += $("#Criteria0").val() || "dummy") : (e += "displayname"), (e += " " + tellrawJson.getJsonForTellraw("scoreboardPane")); else if ("tellraw" == currentCommand || "title" == currentCommand) (e += getVersionSpecificTargetSelectorString()), "title" == currentCommand && (e += " " + $("#titleType").val()), (e += " " + tellrawJson.getJsonForTellraw("tellrawPane")); else if ("playsound" == currentCommand) { e += $("#sound").val() + " " + $("#source").val() + " " + getVersionSpecificTargetSelectorString(); var o = (t = getCoordsString("Position"))[0] + " " + t[1] + " " + t[2]; $("#Position").val().length && ((e += " " + o), $("#volume").val().length && ((e += " " + $("#volume").val()), $("#pitch").val().length && ((e += " " + $("#pitch").val()), $("#minvolume").val().length && (e += " " + $("#minvolume").val())))); } else if ("effect" == currentCommand) (e += "give " + getTargetSelectorStringGeneric("entity0") + " "), settings.namespace.length && (e += settings.namespace + ":"), (e += statuseffects1p13[$("#effect").val()]), $("#seconds").val().length && ((e += " " + $("#seconds").val()), $("#amplifier").val().length && ((e += " " + $("#amplifier").val()), "true" == $("#hideParticles").val() && (e += " true"))); else if ("data merge block" == currentCommand) { t = getCoordsString("Block"); let a = block.getBlockNBT(); cachedNBT.setBlockNBT("BS0", a), (e += t[0] + " " + t[1] + " " + t[2] + " " + a); } else if ("data merge entity" == currentCommand) { e += getTargetSelectorString1p13(); a = entityDescriptors.e0.getEntitySpecificCommand(0); cachedNBT.setNBT("e0", a), a.length > 0 && (e += " {" + a.substr(1) + "}"); } else if ("particle" == currentCommand) { e += $("#name").val(); var n = getCoordsString("Location"); n = n[0] + " " + n[1] + " " + n[2]; var s = getCoords("xd", "yd", "zd", !1), i = " " + s[0] + " " + s[1] + " " + s[2]; if ("dust" == $("#name").val()) { var r = $("#mobSpell_color").val(); e += " " + parseFloat(hexToR(r) / 255).toFixed(3) + " " + parseFloat(hexToG(r) / 255).toFixed(3) + " " + parseFloat(hexToB(r) / 255).toFixed(3) + " " + $("#dustSize").val() + " " + n + i; } else "falling_dust" == $("#name").val() || "block" == $("#name").val() ? (e += " " + $("#block").val() + getBlockStates($("#block").val(), "BS0")) : "item" == $("#name").val() && (e += " " + $("#item0").val()), (e += " " + n + i); (e += " " + $("#speed").val()), $("#count").val().length && ((e += " " + $("#count").val() + " " + $("#mode").val()), $("#TSPane").is(":visible") && (e += " " + getVersionSpecificTargetSelectorString())); } outputCharacterCount(e), $("#commandOutput-ta").val(e), $("#commandString").val(e); } catch (e) { $("#commandOutput-ta").val( "Could not generate command.\n" + e.toString() ); } } } function outputCharacterCount(e) { let t = ""; 0 == e.length ? $("#outputLength").html("Loot Table") : ($("#outputLength").html( "Command Output: " + e.length + " characters" ), (t = e.length <= 256 ? "This command is short enough to run in the chat bar. (<256)" : e.length <= 32500 ? "This command is too long to run in the chat bar. It can only be executed from a command block or function file. (>256)" : "This command is too long to run in the chat bar or a command block. It can only be executed from a function file. (>32500)")), (document.getElementById("outputLength").title = t); } function clearOutputCharacterCount() { (document.getElementById("outputLength").title = ""), $("#outputLength").html("Command Output"); } function getVersionSpecificTargetSelectorString() { return getTargetSelectorString1p13(); } function getDataValue(e, t) { var a = ""; if (e in blockStates) { var o = replaceAll("DataValue", "BS", t), n = blockStates[e]; for (var s in n) "unset" != $("#" + s + o).val() && (a += "," + s + "=" + $("#" + s + o).val()); if (a.length > 0) return a.substr(1); } return ""; } function getBlockStates(e, t) { if (e in blockStates) { var a = blockStates[e], o = ""; for (var n in a) "unset" != $("#" + n + t).val() && (o += "," + n + "=" + $("#" + n + t).val()); return 0 == o.length ? "" : "[" + o.substr(1) + "]"; } return ""; } function getCoordsString(e) { if ( "" == $("#" + e) .val() .trim() ) return ["~", "~", "~"]; var t = $("#" + e) .val() .trim() .split(" "); for (0 == t.length && (t = []); t.length < 3; ) t.push("~"); return t; } function getCoords(e, t, a, o) { return ( $("#" + e).val().length > 0 && $("#" + o).is(":checked") ? (x = "~" + $("#" + e).val()) : $("#" + e).val().length > 0 && !$("#" + o).is(":checked") ? (x = $("#" + e).val()) : 0 == $("#" + e).val().length && $("#" + o).is(":checked") ? (x = "~") : (x = "0"), $("#" + t).val().length > 0 && $("#" + o).is(":checked") ? (y = "~" + $("#" + t).val()) : $("#" + t).val().length > 0 && !$("#" + o).is(":checked") ? (y = $("#" + t).val()) : 0 == $("#" + t).val().length && $("#" + o).is(":checked") ? (y = "~") : (y = "0"), $("#" + a).val().length > 0 && $("#" + o).is(":checked") ? (z = "~" + $("#" + a).val()) : $("#" + a).val().length > 0 && !$("#" + o).is(":checked") ? (z = $("#" + a).val()) : 0 == $("#" + a).val().length && $("#" + o).is(":checked") ? (z = "~") : (z = "0"), [x, y, z] ); } function bindGenCom(e, t) { $("#" + e).bind(t, function () { generateCommand(); }); } function createComponent(e, t, a, o) { var n = a.id || t + o, s = a.eventClass || "", i = a.cssClass || "fLabel200", r = "string" == a.format ? "bigTF" : a.fwClass || "medTF", l = a.label || t, c = a.value || ""; if ( (-1 != e.indexOf("entityPane") && (e += a.align || "L"), "panel" != a.type) ) { if ( ($("#" + e).append("
" + l + ""), "text" == a.type) ) $("#" + e).append( "" ), bindGenCom(n, "keyup", s); else if ("UUIDArray" == a.type) for (let t = 0; t < 4; t++) $("#" + e).append( "" ), bindGenCom(n + t, "keyup", s); else if ("choice" == a.type) { for (var d = "", p = 0; p < a.values.length; p++) d += ""; $("#" + e).append( "" ), bindGenCom(n, "change"); } else if ("ticks" == a.type) $("#" + e).append( "" + mkTicksSecs(n + "TT") ), bindGenCom(n, "keyup"); else if ("choicetext" == a.type) { $("#" + e).append( "" ), bindGenCom(n + "_txt", "keyup"); for (d = "", p = 0; p < a.values.length; p++) $.isArray(a.values[p]) ? (d += "") : (d += ""); $("#" + e).append( "" ), bindGenCom(n + "_choice", "change"); } else if ("jsonFormats" == a.type) { for ( var m = ["unset", "true", "false"], h = [ "bold", "italic", "underlined", "strikethrough", "obfuscated", ], g = ((d = ""), 0); g < h.length; g++ ) { d += ""; for (p = 0; p < m.length; p++) d += ""; $("#" + n + h[g] + m[0]).prop("checked", !0), (d += ""); } (d += "
UnsetTrueFalse
" + (l = h[g].charAt(0).toUpperCase() + h[g].slice(1)) + "
"), $("#" + e).append(d); for (g = 0; g < h.length; g++) $("#" + n + h[g] + m[0]).prop("checked", !0); } else if ("makeSelect" == a.type) { for (d = "", p = 0; p < a.values.length; p++) d += ""; $("#" + e).append( "" ), bindGenCom(n, "change"); } else if ("makeSelectWithIndexAndValues" == a.type) { for (d = "", p = 0; p < a.values.length; p++) d += ""; $("#" + e).append( "" ), bindGenCom(n, "change"); } else if ("makeSelectWithIndexes" == a.type) $("#" + e).append( "" + makeSelectWithIndexes( n, a.values, void 0 != a.hasUnset && a.hasUnset ) ), bindGenCom(n, "change"); else if ("colorChooser" == a.type) { $("#" + e).append( "" ), $("#" + n + "_customcol").bind("change", function () { enableCustomCol(n + "_customcol", n); }), new jscolor.color( document.getElementById(n + "_color"), {} ).fromString("FF0000"), $("#" + n + "_colsettings").hide(); } else if ("cb" == a.type) $("#" + e).append( "" ), bindGenCom(n, "change"); else if ("tileselect" == a.type) { $("#" + e).append( "" ); var _ = "+"), $("#" + n + "Pane").append(_), $("#" + n + "_filter").bind("keyup", function () { updateTileSelectOptions("#" + n); }), $("#" + n).bind("change", function () { generateCommand(); }); } else if ("blockSelect" == a.type) { for (_ = "" + makeTip("tile", "Select")), $("#" + e).append(_), $("#" + n + "_filter").bind("keyup", function () { updateTileSelectOptions("#" + n); }), $("#" + n).bind("change", function () { generateCommand(); }); } else if ("statusEffects" == a.type) $("#" + e).append( mkShowHide(n + "Pane", n + "SH") + "
" ), makeStatusEffects(n + "Pane", n), showHide(n + "Pane", n + "SH"); else if ("stewEffects" == a.type) $("#" + e).append( mkShowHide(n + "Pane", n + "SH") + "
" ), makeStewEffects(n + "Pane", n); else if ("passenger" == a.type) $("#" + e).append( "
+
" ); else if ("spawnPotential" == a.type) $("#" + e).append( "+
" ); else if ("customNameJSON" == a.type) $("#" + e).append( mkShowHide(n + "EntityName", n + "EntityNameSH") + "
" ), createTellrawForm(n, o, "EntityName", !0), showHide(n + "EntityName", n + "EntityNameSH"), $("#" + n + "EntityName br:first").remove(), $("#" + n + "EntityName br:first").remove(); else if ("multiitem" == a.type) $("#" + e).append( mkShowHide(n + "MultiItemPane", n + "SH") + "
" ), $("#" + n + "MultiItemPane").append( makeButton( "Add Item", "addMultiItem('" + n + "MultiItemPane'," + (a.slotNumbers ? 1 : 0) + ")", "Targeted player must have all of these selected items in their inventory." ) ), a.hide && showHide(n + "MultiItemPane", n + "SH"); else if ("itemselect" == a.type) $("#" + e).append( mkShowHide(n + "Pane", n + "SH") + "
" ), a.forceConstruct || settings.loadItemUI ? (createItemSelectComponent( n, a, r, s, o, a.forceConstruct ), void 0 != cachedNBT.getNBT(n) && ($("#" + n).val(cachedNBT.getItemType(n)), $("#" + n).trigger("change"))) : closeItemSelectComponent(n, a, r, s, o), a.hide && showHide(n + "Pane", n + "SH"); else if ("fwExplosion" == a.type) $("#" + e).append( "+
" ); else if ("villTrade" == a.type) $("#" + e).append( "+
" ); else if ("gossips" == a.type) $("#" + e).append( "+
" ); else if ("memories" == a.type) { $("#" + e).append( "" + mkShowHide(n + "Pane", n + "PaneSH") + "
" ), showHide(n + "Pane", n + "MemoriesSH"); var u = ["meeting_point", "home", "job_site"]; for (p = 0; p < u.length; p++) { var b = n + u[p]; $("#" + n + "Pane").append( "
" + u[p] + "
" ), createComponent( b, "dimension", { id: b + "Dim", type: "makeSelect", values: ["overworld", "the_end", "the_nether"], format: "special", cssClass: "fLabel70", tip: "memories", align: "R", }, o ), createComponent( b, "X", { id: b + "X", type: "text", format: "int", cssClass: "fLabel70", tip: "memories", }, o ), createComponent( b, "Y", { id: b + "Y", type: "text", format: "int", cssClass: "fLabel70", }, o ), createComponent( b, "Z", { id: b + "Z", type: "text", format: "int", cssClass: "fLabel70", }, o ); } } else if ("beeforHive" == a.type) $("#" + e).append( "+
" ); else if ("itemForRecipes" == a.type) { $("#" + e).append( "" ); for ( _ = "+"), $("#" + n + "Pane").append(_), $("#" + n + "_filter").bind("keyup", function () { updateItemSelectForRecipes("#" + n); }); } void 0 != a.tip && $("#" + e).append(makeTip(a.tip, t)); } else { var f = a.showHide ? mkShowHide(a.panelID, a.panelID + "SH") : ""; a.label ? $("#" + e).append( "
" + l + "" + f + "" ) : $("#" + e).append( "
" + f + "" ); } } function jsonHexColorUpdate(e, t) { "Hex Code" == $("#" + e + "color").val() ? $("#" + e + "_colsettings").show() : $("#" + e + "_colsettings").hide(), "book" == t ? bookUpdate(e) : "sign" == t ? signUpdate(e) : tellrawUpdate(e); } function addMultiItem(e, t) { for (var a = 0; $("#" + e + "_" + a).length; ) a++; var o = e + "_" + a; createComponent( e, o + "Slot", { type: "itemselect", format: "special", cssClass: "fLabel40", label: "Item", id: o, forceConstruct: !0, hasSlot: t, }, -1 ); } function closeItemSelectComponent(e, t, a, o, n) { $("#" + e + "Pane").html( "" ), $("#createItemUI_" + e).bind("click", function () { createItemSelectComponent(e, t, a, o, n, !1), void 0 != cachedNBT.getNBT(e) && ($("#" + e).val(cachedNBT.getItemType(e)), $("#" + e).trigger("change")); }); let s = cachedNBT.getNBT(e); void 0 != s && ($("#" + e + "Pane").append("
" + s + "
"), void 0 != cachedNBT.dropChance[e] && $("#" + e + "Pane").append( "
Drop Chance=" + cachedNBT.dropChance[e] )); } function createItemSelectComponent(e, t, a, o, n, s) { cachedNBT.setMetaForNBT(e, t, a, o, n); var i = "ItemCopyPaste"), s || (i += ""), (i += "
"), $("#" + e + "Pane").html(i), s || $("#closeItemUI_" + e).bind("click", function () { cachedNBT.setMetaForNBT(e, t, a, o, n); getItemNBT(e); closeItemSelectComponent(e, t, a, o, n); }), $("#" + e + "_filter").bind("keyup", function () { updateItemSelectOptions("#" + e); }), $("#" + e).bind("change", function () { if (($("#" + e + "ItemPane").html(""), "-1" != $("#" + e).val())) { let l = cachedNBT.getNBT(e); $("#" + e + "ItemPane").append( "Name" + mkShowHide(e + "ItemName", e + "ItemNameSH") + "
" ), createTellrawForm(e, n, "ItemName", !0, "ItemName"), showHide(e + "ItemName", e + "ItemNameSH"), $("#" + e + "ItemName br:first").remove(), $("#" + e + "ItemName br:first").remove(), $("#" + e + "ItemPane").append( "
Lore" + mkShowHide(e + "Lore", e + "LoreSH") + "
" ), createTellrawForm(e, n, "Lore", !0, "Lore"), showHide(e + "Lore", e + "LoreSH"), $("#" + e + "Lore br:first").remove(), $("#" + e + "Lore br:first").remove(), isDurable($("#" + e).val()) && (createComponent( e + "ItemPane", "Damage", { id: e + "Damage", type: "text", cssClass: "fLabel100", tip: "item.Damage", }, n ), createComponent( e + "ItemPane", "RepairCost", { id: e + "RepairCost", type: "text", cssClass: "fLabel100", tip: "item.RepairCost", }, n ), createComponent( e + "ItemPane", "Unbreakable", { id: e + "Unbreakable", type: "choice", values: unsetTrueFalse, format: "b", cssClass: "fLabel100", tip: "item.Unbreakable", }, n )), void 0 != t.doDropChance && t.doDropChance && (createComponent( e + "ItemPane", "DropChance", { id: e + "DropChance", type: "text", cssClass: "fLabel100", tip: "item.DropChance", }, n ), void 0 != cachedNBT.dropChance[e] && $("#" + e + "DropChance").val( cachedNBT.dropChance[e] )), void 0 == t.noCount && createComponent( e + "ItemPane", "Count", { id: e + "Count", type: "text", cssClass: "fLabel100", tip: "item.Count", }, n ), 1 == t.hasSlot && createComponent( e + "ItemPane", "Slot", { id: e + "Slot", type: "text", cssClass: "fLabel100", tip: "item.Slot", }, n ), createComponent( e + "ItemPane", "CustomModelData", { id: e + "CustomModelData", type: "text", cssClass: "fLabel100", tip: "item.CustomModelData", fwClass: "verybigTF", }, n ), createComponent( e + "ItemPane", "CustomTags", { id: e + "CustomTags", type: "text", cssClass: "fLabel100", tip: "item.CustomTags", fwClass: "verybigTF", }, n ), createComponent( e + "ItemPane", "CanPlaceOn", { id: e + "CanPlaceOn", type: "tileselect", cssClass: "fLabel100", tip: "item.CanPlaceOn", }, n ), createComponent( e + "ItemPane", "CanDestroy", { id: e + "CanDestroy", type: "tileselect", cssClass: "fLabel100", tip: "item.CanDestroy", }, n ), $("#" + e + "ItemPane").append( "
HideFlags" + mkShowHide(e + "HideFlags", e + "HideFlagsSH") + "
" + makeTip("item.HideFlags") ); for (var a = 0; a < flags.length; a++) $("#" + e + "HideFlags").append( "" + flags[a] + "" ), bindGenCom(e + "HF" + flags[a], "change"); if ( (showHide(e + "HideFlags", e + "HideFlagsSH"), $("#" + e + "ItemPane").append( "
Enchantments" + mkShowHide( e + "Enchantments", e + "EnchantmentsSH" ) + "
" + makeTip("item.Enchantments") ), makeEnchantments(e + "Enchantments", !1, $("#" + e).val()), showHide(e + "Enchantments", e + "EnchantmentsSH"), $("#" + e + "ItemPane").append( "
Modifiers" + mkShowHide(e + "AM", e + "AMSH") + "
" + makeTip("item.AttributeModifiers") ), makeAMUI(e + "AM"), showHide(e + "AM", e + "AMSH"), $("#" + e).val() in blockStates) ) { $("#" + e + "ItemPane").append( "
Block States" + mkShowHide(e + "BlockStates", e + "BlockStatesSH") + "
" + makeTip("item.BlockStates") ), showHide(e + "BlockStates", e + "BlockStatesSH"); var s = blockStates[$("#" + e).val()]; for (var i in s) { var r = s[i].slice(); $.isArray(r[0]) ? (r.unshift(["unset", "unset"]), createComponent( e + "BlockStates", i, { id: i + e, cssClass: "fLabel100", type: "choice", values: r, }, 0 )) : (r.unshift("unset"), createComponent( e + "BlockStates", i, { id: i + e, cssClass: "fLabel100", type: "makeSelect", values: r, }, 0 )); } $("#" + e + "BlockStates br:first").remove(); } loadItemSpecificOptions(e, n), void 0 != l && ((cachedNBT.nbt[e] = l), cachedNBT.loadCachedItemNBT(e)); } else delete cachedNBT.nbt[e]; generateCommand(); }); } function unsetItem(e) { $("#" + e).val("-1"), $("#" + e).trigger("change"); } function loadItemNBTIntoSlot(e, t, a, o) { if ( (void 0 != e.Count && $("#" + a + "Count").val(parseInt(e.Count.val)), void 0 != e.Damage && $("#" + a + "Damage").val(parseInt(e.Damage.val)), void 0 != e.tag) ) { for ( var n = e.tag.val, s = ["CanPlaceOn", "CanDestroy"], i = 0; i < s.length; i++ ) if (($("#" + a + s[i] + "TilePane").html(""), void 0 != n[s[i]])) for (var r = 0; r < n[s[i]].val.length; r++) addTileFromNBTLoad( a + s[i], extractMinecraftID(n[s[i]].val[r]) ); var l = [ "display", "HideFlags", "Damage", "RepairCost", "Unbreakable", "CustomModelData", "Enchantments", "AttributeModifiers", "BlockStateTag", "CanPlaceOn", "CanDestroy", "StoredEnchantments", "SkullOwner", "title", "author", "generation", "resolved", "pages", "BlockEntityTag", "map", "Fireworks", "Explosion", "EntityTag", "CustomPotionEffects", "Potion", "CustomPotionColor", "ChargedProjectiles", "Effects", "BlockStateTag", "Recipes", "Charged", "LodestoneDimension", "LodestonePos", "LodestoneTracked", ], c = ""; for (key in n) -1 == l.indexOf(key) && (n[key].val instanceof Object ? (c += "," + key + ":" + compoundToNBTString(n[key].val)) : (c += "," + key + ":" + n[key].val)); if ( (c.length && $("#" + a + "CustomTags").val(c.substr(1)), void 0 != n.display) ) { var d = n.display.val; if (void 0 != d.Name) { (deferJSONOutput = !0), (deferOutput = !0), tellrawJson.makeNewTellraw(a + "ItemName"); try { p = JSON.parse(JSON.parse('"' + d.Name.val + '"')); } catch (b) { p = JSON.parse( JSON.parse( '"' + d.Name.val .replace(/"/g, '\\"') .replace(/\\'/g, "'") + '"' ) ); } importTellrawJSON(a + "ItemName", p), showHide(a + "ItemName", a + "ItemNameSH"), (deferJSONOutput = !1), (deferOutput = !1), tellrawUpdate(a + "ItemName"); } if (void 0 != d.Lore) { var p; (deferJSONOutput = !0), (deferOutput = !0), tellrawJson.makeNewTellraw(a + "Lore"); try { loadLoreFromNBT(a + "Lore", d.Lore.val); } catch (b) { p = []; for (r = 0; r < d.Lore.val.length; r++) p.push({ text: d.Lore.val[r] + " " }); importTellrawJSON(a + "Lore", p); } showHide(a + "Lore", a + "LoreSH"), (deferJSONOutput = !1), (deferOutput = !1), tellrawUpdate(a + "Lore"); } void 0 != d.color && loadColorIntNBT(a + "Color", d.color.val); } if (void 0 != n.HideFlags) { showHide(a + "HideFlags", a + "HideFlagsSH"); var m = [], h = 1; m.push(0); for (r = 0; r < flags.length; r++) m.push(h), (h *= 2); var g = n.HideFlags.val; for (r = flags.length - 1; r >= 0; r--) g >= m[r + 1] && ((g -= m[r + 1]), $("#" + a + "HF" + flags[r]).prop("checked", !0)); } if ( (void 0 != n.Damage && $("#" + a + "Damage").val(parseInt(n.Damage.val)), void 0 != n.RepairCost && $("#" + a + "RepairCost").val(parseInt(n.RepairCost.val)), void 0 != n.Unbreakable && $("#" + a + "Unbreakable").val(parseInt(n.Unbreakable.val)), void 0 != n.CustomModelData && $("#" + a + "CustomModelData").val(n.CustomModelData.val), void 0 != n.Enchantments) ) { showHide(a + "Enchantments", a + "EnchantmentsSH"); var _ = n.Enchantments.val; for (r = 0; r < _.length; r++) { if (void 0 != (b = _[r]).id) { var u = getEnchantNumFromString(b.id.val); if (!$("#" + a + "Enchantments_enc_" + u).length) { $("#" + a + "Enchantments_enc_showAll").prop( "checked", !0 ), makeEnchantments(a + "Enchantments", !0, t); break; } } else $("#" + a + "Enchantments_enc_glintOnly").prop( "checked", !0 ); } if (void 0 != b.id) for (r = 0; r < _.length; r++) { var b; u = getEnchantNumFromString((b = _[r]).id.val); $("#" + a + "Enchantments_enc_" + u).prop("checked", !0), $( "#" + a + "Enchantments_enc_" + u + "_lvl_span" ).show(), $("#" + a + "Enchantments_enc_" + u + "_lvl").val( parseInt(b.lvl.val) ); } } if (void 0 != n.AttributeModifiers) { $("#" + a + "AMtable") .find(".amRow") .remove(), showHide(a + "AM", a + "AMSH"); var f = n.AttributeModifiers.val; for (r = 0; r < f.length; r++) { var k = f[r], v = k.AttributeName.val; (name = v.substr(v.indexOf(".") + 1)), -1 == attributeModifiers116.indexOf(name) && (name = attributeModifiers116[ attributeModifiers.indexOf(name) ]); var y = a + "AM_" + addAM(a + "AM", !0); $("#" + y + "_mods").val(name), void 0 != k.Amount && $("#" + y + "_amount").val(k.Amount.val), void 0 != k.Operation && $("#" + y + "_operation").val(k.Operation.val), void 0 != k.Slot && $("#" + y + "_slot").val(k.Slot.val), void 0 != k.UUIDLeast && void 0 != k.UUIDMost && convertLeastMostToArray( y + "_UUID", k.UUIDLeast.val, k.UUIDMost.val ), void 0 != k.UUID && loadUUIDArrayNBT(y + "_UUID", k.UUID.val); } checkAMconflicts(a + "AM"); } if (void 0 != n.BlockStateTag) { showHide(a + "BlockStates", a + "BlockStatesSH"); var w = n.BlockStateTag.val; for (key in w) $("#" + key + a).val(w[key].val); } } void 0 != n && loadItemSpecificNBT(n, t, a, o); } function convertHexUUIDToArray(e, t) { const a = new DataView(new ArrayBuffer(16)); let o = [8, 4, 4, 4, 12]; const n = t .split("-") .map((e, t) => e.padStart(o[t], "0")) .join(""); a.setBigUint64(0, BigInt("0x" + n.substring(0, 16)), !1), a.setBigUint64(8, BigInt("0x" + n.substring(16)), !1), $("#" + e + 0).val(a.getInt32(0)), $("#" + e + 1).val(a.getInt32(4)), $("#" + e + 2).val(a.getInt32(8)), $("#" + e + 3).val(a.getInt32(12)); } function convertLeastMostToArray(e, t, a) { const o = new DataView(new ArrayBuffer(16)); o.setBigInt64(0, BigInt(parseInt(a)), !1), o.setBigInt64(8, BigInt(parseInt(t)), !1), $("#" + e + 0).val(o.getInt32(0)), $("#" + e + 1).val(o.getInt32(4)), $("#" + e + 2).val(o.getInt32(8)), $("#" + e + 3).val(o.getInt32(12)); } function convertMostToArray(e, t) { const a = new DataView(new ArrayBuffer(16)); a.setBigInt64(0, BigInt(parseInt(t)), !1), $("#" + e + 0).val(a.getInt32(0)), $("#" + e + 1).val(a.getInt32(4)); } function convertLeastToArray(e, t) { const a = new DataView(new ArrayBuffer(16)); a.setBigInt64(8, BigInt(parseInt(t)), !1), $("#" + e + 2).val(a.getInt32(8)), $("#" + e + 3).val(a.getInt32(12)); } function loadColorIntNBT(e, t) { $("#" + e + "_customcol").prop("checked", !0), $("#" + e + "_customcol").trigger("change"), new jscolor.color(document.getElementById(e + "_color"), {}).fromString( getHexColor(t) ); } function getHexColor(e) { return ("000000" + (e >>> 0).toString(16)).slice(-6).toUpperCase(); } function extractMinecraftID(e) { return -1 != e.indexOf(":") && (e = e.substr(e.indexOf(":") + 1)), e.trim(); } function extractMinecraftID113(e) { if (-1 != e.indexOf("{") || -1 != e.indexOf("[")) { let t = e.indexOf("{"); (-1 == t || (-1 != e.indexOf("[") && e.indexOf("[") < t)) && (t = e.indexOf("[")), e.indexOf(":") < t && (settings.modifyNamespace(e.substr(0, e.indexOf(":"))), (e = e.substr(e.indexOf(":") + 1))); } else settings.modifyNamespace(e.substr(0, e.indexOf(":"))), (e = e.substr(e.indexOf(":") + 1)); for ( var t = "", a = 0; a < e.length && -1 == "{[ ".indexOf(e.charAt(a)); a++ ) t += e.charAt(a); return t; } function getTargetCompound(e, t) { if ( $("#" + t + "X" + e).val().length && $("#" + t + "Y" + e).val().length && $("#" + t + "Z" + e).val().length ) { var a = "," + t + ":{X:" + $("#" + t + "X" + e).val(); return ( (a += ",Y:" + $("#" + t + "Y" + e).val()), (a += ",Z:" + $("#" + t + "Z" + e).val()) + "}" ); } return ""; } function makeTip(e, t) { return ( "?" ); } function showTip(e) { $("#dialogbox").load("tips/en/" + e + ".txt", function (t, a) { if ("success" == a) { $("#dialogbox").prepend("" + e.split(".")[1] + "
"); var o = $("#dialogbox").height() > 200 ? 200 : $("#dialogbox").height(); $("#dialogbox").css({ "top": mouse.y - o, "left": mouse.x, "max-height": 200, "overflow-y": "auto", }), $("#dialogbox").show(); var n = $("#dialogbox").has("a").length; $("#dialogbox").append( "OK" ), n || ($("#dialogbox").focus(), $("#dialogbox").blur(function () { $("#dialogbox").hide(); })); } else $("#dialogbox").hide(); }); } function hideTip() { $("#dialogbox").hide(); } function addTrade(e) { for (var t = 0; $("#" + e + "_Trade_" + t).length; ) t++; var a = e + "_Trade_" + t; $("#" + e).append( "" ), createComponent( a, "rewardExp", { id: a + "rewardExp", type: "choice", values: [ [-1, "unset"], ["1", "Yes"], ["0", "No"], ], format: "b", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "maxUses", { id: a + "maxUses", type: "text", format: "int", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "uses", { id: a + "uses", type: "text", format: "int", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "xp", { id: a + "xp", type: "text", format: "int", cssClass: "fLabel70", tip: "villager.xp_", }, -1 ), createComponent( a, "priceMultiplier", { id: a + "priceMultiplier", type: "text", format: "int", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "specialPrice", { id: a + "specialPrice", type: "text", format: "int", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "demand", { id: a + "demand", type: "text", format: "int", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "buy", { id: a + "buy", type: "itemselect", format: "special", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "buyB", { id: a + "buyB", type: "itemselect", format: "special", cssClass: "fLabel70", tip: "villager", }, -1 ), createComponent( a, "sell", { id: a + "sell", type: "itemselect", format: "special", cssClass: "fLabel70", tip: "villager", }, -1 ), generateCommand(); } function addGossip(e) { for (var t = 0; $("#" + e + "_" + t).length; ) t++; var a = e + "_" + t; $("#" + e).append( "" ), createComponent( a, "Type", { id: a + "Type", type: "makeSelect", values: [ "major_negative", "minor_negative", "major_positive", "minor_positive", "trading", "golem", ], format: "special", cssClass: "fLabel70", tip: "gossip", }, -1 ), createComponent( a, "Value", { id: a + "Value", type: "text", format: "int", cssClass: "fLabel70", tip: "gossip", }, -1 ), createComponent( a, "Target", { id: a + "Target", type: "UUIDArray", format: "intArray", cssClass: "fLabel70", tip: "gossip", }, -1 ), generateCommand(); } function addExplosion(e, t) { for (var a = 0; $("#" + e + "_exp_" + a).length; ) a++; var o = e + "_exp_" + a; $("#" + e).append( "
" ), void 0 == t && $("#" + o).append( "" ), createComponent( o, "Type", { id: o + "Type", type: "choice", values: [ [0, "Small Ball"], [1, "Large Ball"], [2, "Star-shaped"], [3, "Creeper-shaped"], [4, "Burst"], ], format: "short", cssClass: "fLabel70", tip: "fireworks_rocket", }, -1 ), createComponent( o, "Flicker", { id: o + "Flicker", type: "cb", format: "b", cssClass: "fLabel70", tip: "fireworks_rocket", }, -1 ), createComponent( o, "Trail", { id: o + "Trail", type: "cb", format: "b", cssClass: "fLabel70", tip: "fireworks_rocket", }, -1 ), $("#" + o).append( "
Colors+
" + makeTip("fireworks_rocket", "Colors") + "
" ), $("#" + o).append( "
FadeColors+
" + makeTip("fireworks_rocket", "FadeColors") + "" ), void 0 != t && $("#" + o + " br:first").remove(), generateCommand(); } function addFWColor(e) { for (var t = 0; $("#" + e + "_col_" + t).length; ) t++; var a = e + "_col_" + t; $("#" + e).append( "" ), new jscolor.color( document.getElementById(a + "_colour"), {} ).fromString("FF0000"), bindGenCom(a + "_colour", "change"), generateCommand(); } function removeContainer(e) { $("#" + e).remove(), generateCommand(); } function getFWColors(e, t) { var a = ""; return ( $("#" + e + t + " > .fwColor").each(function (e) { a += "," + colourConvert($("#" + this.id + "_colour").val()); }), a.length ? "," + t + ":[I;" + a.substr(1) + "]" : a ); } function loadFireworksItemNBT(e, t) { if (void 0 != t.Explosions) for (var a = t.Explosions.val, o = 0; o < a.length; o++) addExplosion(e), loadExplosionNBT(e + "_exp_" + o, a[o]); } function loadExplosionNBT(e, t) { void 0 != t.Type && $("#" + e + "Type").val(t.Type.val); var a = ["Colors", "FadeColors"]; $("#" + e + "Flicker").prop( "checked", void 0 != t.Flicker && "1" == t.Flicker.val.charAt(0) ), $("#" + e + "Trail").prop( "checked", void 0 != t.Trail && "1" == t.Trail.val.charAt(0) ); for (var o = 0; o < a.length; o++) if (void 0 != t[a[o]]) for (var n = t[a[o]].val, s = 0; s < n.length; s++) { addFWColor(e + a[o]), new jscolor.color( document.getElementById( e + a[o] + "_col_" + s + "_colour" ), {} ).fromString(getHexColor(n[s])); } } function getHandAndArmorItmes(e) { var t = "", a = getItemNBT("Holding" + e) + "," + getItemNBT("Offhand" + e); "{},{}" != a && ((t += ",HandItems:[" + a + "]"), hasValue("Holding" + e + "DropChance") || hasValue("Offhand" + e + "DropChance") ? (t += ",HandDropChances:" + constructDropChance([ "Holding" + e + "DropChance", "Offhand" + e + "DropChance", ])) : ((void 0 != cachedNBT.dropChance["Holding" + e] && "" != cachedNBT.dropChance["Holding" + e]) || (void 0 != cachedNBT.dropChance["Offhand" + e] && "" != cachedNBT.dropChance["Offhand" + e])) && (t += ",HandDropChances:" + constructDropChanceFromCache([ cachedNBT.dropChance["Holding" + e], cachedNBT.dropChance["Offhand" + e], ]))); var o = getItemNBT("Boot" + e) + "," + getItemNBT("Leg" + e) + "," + getItemNBT("Body" + e) + "," + getItemNBT("Head" + e); return ( "{},{},{},{}" != o && ((t += ",ArmorItems:[" + o + "]"), hasValue("Boot" + e + "DropChance") || hasValue("Leg" + e + "DropChance") || hasValue("Body" + e + "DropChance") || hasValue("Head" + e + "DropChance") ? (t += ",ArmorDropChances:" + constructDropChance([ "Boot" + e + "DropChance", "Leg" + e + "DropChance", "Body" + e + "DropChance", "Head" + e + "DropChance", ])) : ((void 0 != cachedNBT.dropChance["Boot" + e] && "" != cachedNBT.dropChance["Boot" + e]) || (void 0 != cachedNBT.dropChance["Leg" + e] && "" != cachedNBT.dropChance["Leg" + e]) || (void 0 != cachedNBT.dropChance["Body" + e] && "" != cachedNBT.dropChance["Body" + e]) || (void 0 != cachedNBT.dropChance["Head" + e] && "" != cachedNBT.dropChance["Head" + e])) && (t += ",ArmorDropChances:" + constructDropChanceFromCache([ cachedNBT.dropChance["Boot" + e], cachedNBT.dropChance["Leg" + e], cachedNBT.dropChance["Body" + e], cachedNBT.dropChance["Head" + e], ]))), t ); } function constructDropChance(e) { let t = ""; for (let a = 0; a < e.length; a++) $("#" + e[a]).length && $("#" + e[a]).val().length ? (t += "," + parseFloat($("#" + e[a]).val()).toFixed(3) + "F") : (t += ",0.085F"); return "[" + t.substr(1) + "]"; } function constructDropChanceFromCache(e) { let t = ""; for (let a = 0; a < e.length; a++) "" != e[a] ? (t += "," + parseFloat(e[a]).toFixed(3) + "F") : (t += ",0.085F"); return "[" + t.substr(1) + "]"; } function loadGossips(e, t) { for (var a = 0; a < e.length; a++) addGossip("Gossips" + t + "Pane", t), $("#Gossips" + t + "Pane_" + a + "Type").val(e[a].Type.val), $("#Gossips" + t + "Pane_" + a + "Value").val(e[a].Value.val), void 0 != e[a].TargetLeast && void 0 != e[a].TargetMost ? convertLeastMostToArray( "Gossips" + t + "Pane_" + a + "Target", e[a].TargetLeast.val, e[a].TargetMost.val ) : void 0 != e[a].Target && loadUUIDArrayNBT( "Gossips" + t + "Pane_" + a + "Target", e[a].Target.val ); } function loadInventory(e, t, a) { for (var o = 0; o < e.length; o++) setupItemSlotForNBT(o + "Inv" + t, e[o], a); } function loadMemories(e, t) { if (void 0 != e.memories) { var a = e.memories.val; for (mem in a) { let e = void 0 != a[mem].val.value ? a[mem].val.value : a[mem]; void 0 != e.val.pos && ($("#Memories" + t + extractMinecraftID(mem) + "X").val( e.val.pos.val[0] ), $("#Memories" + t + extractMinecraftID(mem) + "Y").val( e.val.pos.val[1] ), $("#Memories" + t + extractMinecraftID(mem) + "Z").val( e.val.pos.val[2] )), void 0 != e.val.dimension && $("#Memories" + t + extractMinecraftID(mem) + "Dim").val( extractMinecraftID(e.val.dimension.val) ); } showHide("Memories" + t + "Pane", "Memories" + t + "PaneSH"); } } function hasValue(e) { return $("#" + e).length && "" != $("#" + e).val(); } function makeStewEffects(e, t) { var a = ""; for (se in statusEffects) "-1" != statusEffects[se][0] && (a += ""); for (se in ($("#" + e).append(a + "
EffectDuration
" + statusEffects[se][1] + "" + mkTicksSecs(t + "Ticks_" + statusEffects[se][0] + "TT") + "
"), statusEffects)) bindGenCom(t + "Ticks_" + statusEffects[se][0], "keyup"); } function makeStatusEffects(e, t) { var a = ""; for (se in statusEffects) "-1" != statusEffects[se][0] && (a += ""); for (se in ($("#" + e).append(a + "
EffectAmplifier" + makeTip("status_effect", "amplifier") + "Duration" + makeTip("status_effect", "duration") + "Show
Particles" + makeTip("status_effect", "show_particles") + "
" + statusEffects[se][1] + "" + mkTicksSecs(t + "Ticks_" + statusEffects[se][0] + "TT") + "
"), statusEffects)) bindGenCom(t + "Amp_" + statusEffects[se][0], "keyup"), bindGenCom(t + "Ticks_" + statusEffects[se][0], "keyup"), bindGenCom(t + "ShowParticles_" + statusEffects[se][0], "change"); } function getStatusEffectsNBT(e, t) { var a = ""; for (se in statusEffects) if ( "-1" != statusEffects[se][0] && $("#" + t + "Amp_" + statusEffects[se][0]).val().length && $("#" + t + "Ticks_" + statusEffects[se][0]).val().length ) { var o = $("#" + t + "Ticks_" + statusEffects[se][0]).val(); "Seconds" == $("#" + t + "Ticks_" + statusEffects[se][0] + "TT").html() && (o *= 20), (a += ",{Id:" + statusEffects[se][0] + "b,Amplifier:" + $("#" + t + "Amp_" + statusEffects[se][0]).val() + "b,Duration:" + o), -1 != $( "#" + t + "ShowParticles_" + statusEffects[se][0] ).val() && (a += ",ShowParticles:" + $( "#" + t + "ShowParticles_" + statusEffects[se][0] ).val()), (a += "}"); } return a.length ? "," + e + ":[" + a.substr(1) + "]" : a; } function getStewEffectsNBT(e, t) { var a = ""; for (se in statusEffects) if ( -1 != statusEffects[se][0] && $("#" + t + "Ticks_" + statusEffects[se][0]).val().length ) { var o = $("#" + t + "Ticks_" + statusEffects[se][0]).val(); "Seconds" == $("#" + t + "Ticks_" + statusEffects[se][0] + "TT").html() && (o *= 20), (a += ",{EffectId:" + statusEffects[se][0] + "b,EffectDuration:" + o + "}"); } return a.length ? "," + e + ":[" + a.substr(1) + "]" : a; } function mkTicksSecs(e) { return ( "Ticks" ); } function toggleTicks(e) { "Ticks" == $("#" + e).html() ? $("#" + e).html("Seconds") : $("#" + e).html("Ticks"), generateCommand(); } function mkShowHide(e, t) { return ( "H" ); } function showHide(e, t) { $("#" + e).is(":visible") ? ($("#" + e + ", #" + t) .addClass("hiding") .removeClass("shown"), $("#" + e).hide(), $("#" + t).html("S")) : ($("#" + e + ", #" + t) .addClass("shown") .removeClass("hiding"), $("#" + e).show(), $("#" + t).html("H")); } function addPassenger(e) { makeAddEntityPane(e, "passengerEntity_" + ++entityIndex, !1); } function addSpawnPotential(e) { makeAddEntityPane(e, "spawnPotentialEntity_" + ++entityIndex, !0); } function addBee(e) { $("#" + e + " > .spawnPotentialContainer").length < 3 ? makeAddBeePane(e, "beeEntity_" + ++entityIndex) : alertify.alert("A maximum of three bees can be added. "); } function getPassengersNBT(e) { var t = ""; return ( $("#Passengers" + e + "Pane > .passengerContainer").each(function () { var e = parseInt(this.id.substr(this.id.indexOf("_") + 1)); (t += ',{id:"minecraft:' + $("#entity" + e).val() + '"' + entityDescriptors["e" + e].getEntitySpecificCommand(e) + "}"), cachedNBT.setNBT( "e" + e, ',id:"minecraft:' + $("#entity" + e).val() + '"' + entityDescriptors["e" + e].getEntitySpecificCommand(e) ); }), t.length ? ",Passengers:[" + t.substr(1) + "]" : t ); } function getSpawnPotentailsNBT(e, t) { var a = "", o = []; if ( ($("#SpawnPotential" + e + "Pane > .spawnPotentialContainer").each( function (e) { var t = parseInt(this.id.substr(this.id.indexOf("_") + 1)); (o[e] = []), (o[e].entity = '{id:"minecraft:' + $("#entity" + t).val() + '"' + entityDescriptors["e" + t].getEntitySpecificCommand(t) + getMotion(t, "Pos") + "}"), (o[e].weight = $("#Weight" + t).val().length ? $("#Weight" + t).val() : 1), cachedNBT.setNBT( "e" + t, ',id:"minecraft:' + $("#entity" + t).val() + '"' + entityDescriptors["e" + t].getEntitySpecificCommand( t ) + getMotion(t, "Pos") ); } ), o.length > 1 || t) ) { if (o.length > 0) { for (var n = 0; n < o.length; n++) a += ",{Weight:" + o[n].weight + ",Entity:" + o[n].entity + "}"; return ( ",SpawnData:" + o[0].entity + ",SpawnPotentials:[" + a.substr(1) + "]" ); } return a; } return 1 == o.length ? ",SpawnData:" + o[0].entity : a; } function getBeesForHiveNBT(e) { let t = ""; return ( $("#Bees" + e + "Pane > .spawnPotentialContainer").each(function (e) { var a = parseInt(this.id.substr(this.id.indexOf("_") + 1)); let o = getNBTforKey("MinOccupationTicks", { type: "ticks" }, a); (o += getNBTforKey("TicksInHive", { type: "ticks" }, a)), (o += ',EntityData:{id:"minecraft:' + $("#entity" + a).val() + '"' + entityDescriptors["e" + a].getEntitySpecificCommand(a) + "}"), (t += ",{" + o.substr(1) + "}"); }), t.length ? ",Bees:[" + t.substr(1) + "]" : "" ); } function enableCustomCol(e, t) { $("#" + e).is(":checked") ? $("#" + t + "_colsettings").show() : $("#" + t + "_colsettings").hide(), generateCommand(); } function getItemNBT(e, t) { let a = ""; if (-1 != $("#" + e).val() && null != $("#" + e).val()) { if (((a += getItemTag($("#" + e).val())), void 0 == t)) try { (a += ",Count:"), $("#" + e + "Count").val().length > 0 ? (a += $("#" + e + "Count").val() + "b") : (a += "1b"); } catch (e) { a += "1b"; } else "CountOptional" == t && ($("#" + e + "Count").val().length > 0 && (a += ",Count:" + $("#" + e + "Count").val() + "b"), $("#" + e + "Slot").val().length > 0 && (a += ",Slot:" + $("#" + e + "Slot").val() + "b")); (a += getItemTagNBT(e, !0)), cachedNBT.setNBT(e, "," + a), $("#" + e + "DropChance").length && (cachedNBT.dropChance[e] = $("#" + e + "DropChance").val()); } else { let t = cachedNBT.getNBT(e); if (t) return t; } return "{" + a + "}"; } function getItemNBTForGive1p13(e) { var t = " "; if (-1 != $("#" + e).val() && null != $("#" + e).val()) { var a = $("#" + e).val(); settings.namespace.length && (t += settings.namespace + ":"), (t += a.split(":")[0]); let n = ""; var o = getItemTagNBT(e, !1); o.length && (t += "{" + o.substr(1) + "}"); try { $("#" + e + "Count").val().length > 0 ? ((t += " " + $("#" + e + "Count").val()), (n = ",Count:" + $("#" + e + "Count").val())) : (t += " 1"); } catch (e) { t += " 1"; } (n += getItemTagNBT(e, !0)), cachedNBT.setNBT(e, n); } else { let t = cachedNBT.getNBT(e); if (t) return t; } return t; } function getItemTagNBT(e, t) { var a = getCanPlaceOnOrDestroy(e, "CanPlaceOn"); (a += getCanPlaceOnOrDestroy(e, "CanDestroy")), (a += getItemDisplayNBT(e)); for (var o = 0, n = 1, s = 0; s < flags.length; s++) $("#" + e + "HF" + flags[s]).is(":checked") && (o += n), (n *= 2); return ( 0 != o && (a += ",HideFlags:" + o), 0 != $("#" + e + "RepairCost").length && $("#" + e + "RepairCost").val().length && (a += ",RepairCost:" + $("#" + e + "RepairCost").val()), 0 != $("#" + e + "Unbreakable").length && -1 != $("#" + e + "Unbreakable").val() && (a += ",Unbreakable:" + $("#" + e + "Unbreakable").val() + "b"), 0 != $("#" + e + "Damage").length && 0 != $("#" + e + "Damage").val() && (a += ",Damage:" + $("#" + e + "Damage").val()), 0 != $("#" + e + "CustomModelData").length && $("#" + e + "CustomModelData").val().length && (a += ",CustomModelData:" + $("#" + e + "CustomModelData").val()), 0 != $("#" + e + "CustomTags").length && $("#" + e + "CustomTags").val().length && (a += "," + $("#" + e + "CustomTags").val()), (a += getEnchantments(e, "Enchantments")), (a += getItemAttributeModifiers(e)), (a += getItemSpecificNBT(e)), (a += getItemBlockStates(e)).length > 0 && t ? ",tag:{" + a.substr(1) + "}" : a ); } function getItemBlockStates(e) { var t = $("#" + e).val(); if (t in blockStates) { var a = blockStates[t], o = ""; for (var n in a) $("#" + n + e).length && "unset" != $("#" + n + e).val() && (o += "," + n + ':"' + $("#" + n + e).val() + '"'); return 0 == o.length ? "" : ",BlockStateTag:{" + o.substr(1) + "}"; } return ""; } function getItemDisplayNBT(e) { var t = "", a = tellrawJson.getJsonForTellraw(e + "ItemName"); a.length && (t += ",Name:" + jsonConvert(JSON.stringify(a))); var o = tellrawJson.getJsonForLore(e + "Lore"); return ( o.length && (t += ",Lore:[" + o.substr(1) + "]"), isLeatherArmor($("#" + e).val()) ? (t += getColorInteger(e + "Color", "color")) : "filled_map" == $("#" + e).val() && (t += getColorInteger(e + "MapColor", "MapColor")), t.length > 0 ? ",display:{" + t.substr(1) + "}" : t ); } function jsonConvert(e) { var t = e.substr(1, e.length - 2); return ( "'" + (t = replaceAll( "DOUBLE_QUOTE_PLACEHOLDER", '\\"', (t = (t = replaceAll( '\\"', '"', (t = replaceAll('\\\\"', "DOUBLE_QUOTE_PLACEHOLDER", t)) )).replace(/([^\{|:|,])(?:')([^\}|,|:])/g, "$1\\'$2")) )) + "'" ); } function getColorInteger(e, t) { return $("#" + e + "_customcol").is(":checked") ? "," + t + ":" + colourConvert($("#" + e + "_color").val()) : ""; } function colourConvert(e) { return 65536 * hexToR(e) + 256 * hexToG(e) + hexToB(e); } function getCanPlaceOnOrDestroy(e, t) { var a = ""; return ( $("#" + e + t + "TilePane > .anchorButton").each(function () { a += '"minecraft:' + this.innerHTML.split(" ")[0] + '",'; }), a.length > 0 ? "," + t + ":[" + a.substr(0, a.length - 1) + "]" : "" ); } function getEnchantments(e, t) { var a = ""; return ( $("#" + e + t + " .enchantCB").each(function () { if ($("#" + this.id).is(":checked")) { var e = this.id.substr(this.id.lastIndexOf("_") + 1); (a += ',{id:"minecraft:' + replaceAll(" ", "_", enchantables[e][0]).toLowerCase() + '",lvl:'), $("#" + this.id + "_lvl").val().length ? (a += $("#" + this.id + "_lvl").val() + "s}") : (a += "1}"); } }), a.length > 0 ? ",Enchantments:[" + a.substr(1) + "]" : $("#" + e + "Enchantments_enc_glintOnly").is(":checked") ? ",Enchantments:[{}]" : a ); } function getItemAttributeModifiers(e) { var t = ""; return ( $("#" + e + "AMtable .amRow").each(function () { var a = this.id.substr(0, this.id.lastIndexOf("_")); if ($("#" + a + "_amount").val().length) { var o = $("#" + a + "_mods").val(); (t += ',{AttributeName:"generic.' + o + '",Name:"generic.' + o + '",Amount:' + $("#" + a + "_amount").val() + ",Operation:" + $("#" + a + "_operation").val()), $("#" + e + "AMRandomUUID").prop("checked") && convertHexUUIDToArray(a + "_UUID", getRandomUUIDv4()); let n = getUUIDArray(a + "_UUID"); n.length && (t += ",UUID:" + n), "Any" != $("#" + a + "_slot").val() && (t += ',Slot:"' + $("#" + a + "_slot").val() + '"'), (t += "}"); } }), t.length > 0 ? ",AttributeModifiers:[" + t.substr(1) + "]" : t ); } function getItemTag(e) { if (null == e) return ""; var t; return ( -1 != e.indexOf(":") ? ((t = e.split(":")[0]), e.split(":")[1]) : (t = e), 'id:"minecraft:' + t + '"' ); } function getRandomUUIDv4() { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function ( e ) { var t = (16 * Math.random()) | 0; return ("x" == e ? t : (3 & t) | 8).toString(16); }); } function addAM(e, t) { for (var a = 0; $("#" + e + "_" + a + "_rowNum").length; ) a++; for ( var o = e + "_" + a, n = "" + makeSelectWithIndexes( o + "_operation", ["amount", "percentage", "multiplicative"], !1 ) + "" + makeSelect(o + "_slot", [ "Any", "mainhand", "offhand", "feet", "legs", "chest", "head", ]) + ""; for (let e = 0; e < 4; e++) n += ""; (n += ""), $("#" + e + "table > tbody:last-child").append(n), convertHexUUIDToArray(o + "_UUID", getRandomUUIDv4()), $("#" + o + "_mods").bind("change", function () { checkAMconflicts(e); }), $("#" + o + "_amount").bind("keyup", function () { checkAMconflicts(e); }), $("#" + o + "_operation").bind("change", function () { checkAMconflicts(e); }), $("#" + o + "_slot").bind("change", function () { checkAMconflicts(e); }); for (let t = 0; t < 4; t++) $("#" + o + "_UUID" + t).bind("keyup", function () { checkAMconflicts(e); }); if ((checkAMconflicts(e), t)) return a; } function removeAM(e, t) { $("#" + e).remove(), checkAMconflicts(t); } function checkAMconflicts(e) { var t = "", a = {}, o = []; $("#" + e + "table .amRow").each(function () { var e = this.id.substr(0, this.id.lastIndexOf("_")), n = $("#" + e + "_mods").val() + "_" + $("#" + e + "_slot").val(), s = $("#" + e + "_mods").val() + "_Any"; n in a || s in a || (-1 != o.indexOf($("#" + e + "_mods").val()) && "Any" == $("#" + e + "_slot").val()) ? ($("#" + e + "_rowNum").addClass("amErrorRow"), (t = "Attribute Modifiers highlighted in red are in conflict with another modifier. You should not use the same modifier with the same slot as it may cause unpredictable behavior in game.")) : ($("#" + e + "_rowNum").removeClass("amErrorRow"), (a[n] = e + "_rowNum")), o.push($("#" + e + "_mods").val()); }), t.length > 0 ? ($("#" + e + "_errors").html(t), $("#" + e + "_errors").addClass("amErrorMessage")) : ($("#" + e + "_errors").html(""), $("#" + e + "_errors").removeClass("amErrorMessage")), generateCommand(); } function makeAMUI(e) { var t = makeButton( "Add Attribute Modifier", "addAM('" + e + "',false)", "Click to add and Attribute Modifier" ) + " Randomize UUIDs " + makeTip("item.randomUUID") + " "; $("#" + e).append(t + "
AttributeAmountOperationSlotUUID
"), bindGenCom(e + "RandomUUID", "change"); } function makeSelect(e, t) { for (var a = ""; } function makeSelectWithIndexes(e, t, a) { var o = ""; } function makeSelectWithIndexAndValues(e, t) { for (var a = ""; } function getRandomInt(e, t) { return Math.floor(Math.random() * (t - e + 1)) + e; } function enableLevelBox(e, t) { $("#" + e).is(":checked") ? $("#" + t + "_span").show() : $("#" + t + "_span").hide(), generateCommand(); } function getOwnerUUIDNBT(e) { return $("#OwnerUUIDLeast" + e).val().length && $("#OwnerUUIDMost" + e).val().length ? ",Owner:{OwnerUUIDLeast:" + $("#OwnerUUIDLeast" + e).val() + ",OwnerUUIDMost:" + $("#OwnerUUIDMost" + e).val() + "}" : ""; } function makeEnchantments(e, t, a) { var o = t ? " CHECKED" : ""; for (enc in ($("#" + e).html( "Show AllGlint Only" ), $("#" + e + "_enc_showAll").bind("change", function (t) { makeEnchantments(e, $("#" + e + "_enc_showAll").is(":checked"), a); }), $("#" + e + "_enc_glintOnly").bind("change", function (e) { generateCommand(); }), enchantables)) for (i = 0; i < enchantables[enc][1].length; i++) if (t || enchantables[enc][1][i] == a) { $("#" + e).append( "" + enchantables[enc][0] + " LVL " ), $("#" + e + "_enc_" + enc + "_lvl_span").hide(), $("#" + e + "_enc_" + enc + "_lvl").bind( "change keyup", function () { generateCommand(); } ); break; } } function isDurable(e) { for (enc in enchantables) for (i = 0; i < enchantables[enc][1].length; i++) if (enchantables[enc][1][i] == e) return !0; return !1; } function addTile(e) { -1 == $("#" + e).val() || null == $("#" + e).val() || $("#" + e + "_" + $("#" + e).val()).length || ($("#" + e + "TilePane").append( "" + $("#" + e).val() + " " ), generateCommand()); } function addTileFromNBTLoad(e, t) { $("#" + e + "TilePane").append( "" + t + " " ); } function updateItemSelectOptions(e) { for ( var t = $(e).val(), a = $(e + "_filter") .val() .toLowerCase(), o = [], n = 1; n < items.length; n++ ) (0 != a.length && -1 == items[n][0].toLowerCase().indexOf(a) && -1 == items[n][1].toLowerCase().indexOf(a)) || o.push( '" ); o.push('"), $(e).html(o.join("")), t != $(e).val() && (cachedNBT.updateFilterLastUsed(), $(e).trigger("change")); } function updateItemSelectForRecipes(e) { for ( var t = $(e).val(), a = $(e + "_filter") .val() .toLowerCase(), o = [], n = 0; n < knowledgeList.length; n++ ) (0 != a.length && -1 == knowledgeList[n].indexOf(a)) || o.push( '" ); $(e).html(o.join("")), t != $(e).val() && $(e).trigger("change"); } function updateTileSelectOptions(e) { for ( var t = $(e).val(), a = $(e + "_filter") .val() .toLowerCase(), o = [], n = 0; n < tiles.length; n++ ) (0 != a.length && -1 == tiles[n][0].toLowerCase().indexOf(a) && -1 == tiles[n][1].toLowerCase().indexOf(a)) || o.push( '" ); $(e).html(o.join("")), t != $(e).val() && $(e).trigger("change"); } function updateEntitySelectOptions(e, t, a, o) { var n = o || !1, s = $(e).val(), i = $(e + "_filter") .val() .toLowerCase(), r = []; !n || (0 != i.length && -1 == "player".indexOf(i)) || r.push(""); for (var l = 0; l < entities.length; l++) (0 != i.length && -1 == entities[l].toLowerCase().indexOf(i)) || r.push( '" ); $(e).html(r.join("")), s != $(e).val() && (cachedNBT.updateFilterLastUsed(), entityChange(t, a)); } function getUUIDArray(e) { return $("#" + e + 0).val() && $("#" + e + 1).val() && $("#" + e + 2).val() && $("#" + e + 3).val() ? "[I;" + $("#" + e + 0).val() + "," + $("#" + e + 1).val() + "," + $("#" + e + 2).val() + "," + $("#" + e + 3).val() + "]" : ""; } function getAngryAt(e) { let t = getUUIDArray("AngryAt" + e); return t.length ? ",AngryAt:" + t : ""; } function getNBTforKey(e, t, a) { if ("special" == t.format) return ""; var o = ""; if ("text" == t.type) $("#" + e + a).val() && (o = $("#" + e + a).val()); else if ( "choice" == t.type || "makeSelect" == t.type || "makeSelectWithIndexes" == t.type ) -1 != $("#" + e + a).val() && (o = $("#" + e + a).val()); else if ("ticks" == t.type) { if ($("#" + e + a).val()) return ( (o = $("#" + e + a).val()), "Seconds" == $("#" + e + a + "TT").html() ? "," + e + ":" + 20 * o : "," + e + ":" + o ); } else if ("UUIDArray" == t.type) o = getUUIDArray(e + a); else { if ("colorChooser" == t.type) return getColorInteger(e + a, e); if ("blockSelect" == t.type) return ( -1 != $("#" + e + a).val() && (o = "," + e + ":" + $("#" + e + a).val()), o ); } return o.length > 0 ? "b" == t.format ? "," + e + ":" + o + "b" : "f" == t.format ? "," + e + ":" + o + "f" : "string" == t.format ? "," + e + ':"' + o + '"' : "short" == t.format || "long" == t.format || "int" == t.format ? "," + e + ":" + o : "d" == t.format ? "," + e + ":" + o + "d" : "," + e + ":" + o : ""; } function getTargetingTags(e) { var t = ""; return ( $("#Tags" + e).val().length > 0 && (t += ',Tags:["' + $("#Tags" + e) .val() .replace(/,/g, '","') + '"]'), t ); } function getRotation(e) { var t; return ( (t = $("#Yaw" + e).val().length > 0 ? $("#Yaw" + e).val() + "F" : "0F"), $("#Pitch" + e).val().length > 0 ? (t += "," + $("#Pitch" + e).val() + "F") : (t += ",0F"), "0F,0F" != t ? ",Rotation:[" + t + "]" : "" ); } function getMotion(e, t) { if ( 0 != $("#" + t + "X" + e).val().length && 0 != $("#" + t + "Y" + e).val().length && 0 != $("#" + t + "Z" + e).val().length ) { var a = "," + t + ":[" + $("#" + t + "X" + e).val(); return ( -1 == $("#" + t + "X" + e) .val() .indexOf(".") && (a += ".0"), (a += "," + $("#" + t + "Y" + e).val()), -1 == $("#" + t + "Y" + e) .val() .indexOf(".") && (a += ".0"), (a += "," + $("#" + t + "Z" + e).val()), -1 == $("#" + t + "Z" + e) .val() .indexOf(".") && (a += ".0"), a + "]" ); } return ""; } function isLeatherArmor(e) { return ( "leather_helmet" == e || "leather_chestplate" == e || "leather_leggings" == e || "leather_boots" == e || "leather_horse_armor" == e ); } function getPotion(e, t) { return "-1" != $("#" + t).val() ? "," + e + ':"minecraft:' + $("#" + t).val() + '"' : ""; } function hexToR(e) { return parseInt(cutHex(e).substring(0, 2), 16); } function hexToG(e) { return parseInt(cutHex(e).substring(2, 4), 16); } function hexToB(e) { return parseInt(cutHex(e).substring(4, 6), 16); } function cutHex(e) { return "#" == e.charAt(0) ? e.substring(1, 7) : e; } function floatToHex(e) { var t = e >= 1 ? 255 : e <= 0 ? 0 : Math.floor(256 * e), a = t.toString(16); return t < 10 ? "0" + a : a; } function getFireworksItemNBT(e) { var t = ""; $("#" + e + "Flight").val().length && (t += ",Flight:" + $("#" + e + "Flight").val() + "b"); var a = ""; return ( $("#" + e + "ExplosionPane > .explosion").each(function (e) { var t = this.id; a += getExplosionNBT(t); }), a.length && (t += ",Explosions:[" + a.substr(1) + "]"), t.length ? ",Fireworks:{" + t.substr(1) + "}" : "" ); } function getExplosionNBT(e) { var t = ",{Type:" + $("#" + e + "Type").val(); return ( $("#" + e + "Flicker").is(":checked") && (t += ",Flicker:1b"), $("#" + e + "Trail").is(":checked") && (t += ",Trail:1b"), (t += getFWColors(e, "Colors")), (t += getFWColors(e, "FadeColors") + "}") ); } function compoundToNBTString(e) { var t = ""; for (var a in e) { var o = e[a]; if ("raw" == o.type) t += "," + a + ":" + o.val; else if ("string" == o.type) t += "," + a + ':"' + o.val + '"'; else if ("compound" == o.type) t += "," + a + ":" + compoundToNBTString(o.val); else if ("arrayOfVals" == o.type || "arrayOfStrings" == o.type) { t += "," + a + ":["; var n = ""; if ("arrayOfVals" == o.type) for (var s = 0; s < o.val.length; s++) n += "," + o.val[s]; else for (s = 0; s < o.val.length; s++) n += ',"' + o.val[s] + '"'; t += n.substr(1) + "]"; } else if ("arrayOfCompounds" == o.type) { t += "," + a + ":["; for (n = "", s = 0; s < o.val.length; s++) n += "," + compoundToNBTString(o.val[s]); t += n.substr(1) + "]"; } } return "{" + t.substr(1) + "}"; } function importTellrawJSON(e, t) { try { if ((tellrawJson.makeNewTellraw(e), void 0 != t.extra)) { var a = t.extra; delete t.extra, tellrawJson.updateSection(e, t); for (var o = 0; o < a.length; o++) tellrawJson.addSectionFromObject(e, new Section(a[o])); } else if (Array.isArray(t)) { for (var n = 0; n < t.length; n++) tellrawJson.addSectionFromObject(e, new Section(t[n])); tellrawJson.flipSection(e, 1), tellrawJson.deleteSection(e); } else tellrawJson.addSectionFromObject(e, new Section(t)), tellrawJson.flipSection(e, 1), tellrawJson.deleteSection(e); tellrawPreview(e), tellrawJson.flipSection(e, 1); } catch (e) {} } function loadItemSpecificNBT(e, t, a, o) { if ("player_head" == t && void 0 != e.SkullOwner) { let t = e.SkullOwner.val; void 0 != t.Properties && -1 != (t = "SkullOwner:" + compoundToNBTString(t)).indexOf("Id:[") && -1 == t.indexOf("Id:[I;") && (t = replaceAll("Id:[", "Id:[I;", t)), $("#" + a + "SkullOwner").val(t); } else if ("enchanted_book" == t && void 0 != e.StoredEnchantments) for (var n = e.StoredEnchantments.val, s = 0; s < n.length; s++) { var i = n[s], r = getEnchantNumFromString(i.id.val); $("#" + a + "StoredEnchantments_enc_" + r).click(), $("#" + a + "StoredEnchantments_enc_" + r + "_lvl").val( parseInt(i.lvl.val) ); } else if ("written_book" == t) (deferJSONOutput = !0), (deferOutput = !0), loadWrittenBookFromNBT(a + "BookPane", e), (deferJSONOutput = !1), (deferOutput = !1), bookUpdate(a + "BookPane"); else if (-1 != t.indexOf("sign")) { if (void 0 != e.BlockEntityTag) { if ( ((deferJSONOutput = !0), (deferOutput = !0), loadSignFromNBT(a + "SignPane", e.BlockEntityTag.val), void 0 != e.BlockEntityTag.val.CommandStats) ) { var l = e.BlockEntityTag.val.CommandStats.val; for (var c in l) void 0 != l[c] && $("#" + a + c).val(l[c].val); } (deferJSONOutput = !1), (deferOutput = !1), signUpdate(a + "SignPane"); } } else if ( [ "command_block", "repeating_command_block", "chain_command_block", ].includes(t) ) { if (void 0 != e.BlockEntityTag) { var d = e.BlockEntityTag.val; for (var c in d) if ("CommandStats" == c) { l = d[c].val; for (var c in l) $("#" + a + c).val(l[c].val); } else "Command" == c ? $("#" + a + c).val(d[c].val) : $("#" + a + c).val(parseInt(d[c].val)); } } else if ("structure_block" == t && void 0 != e.BlockEntityTag) { var p = e.BlockEntityTag.val; for (var c in p) "ignoreEntities" == c ? $("#" + a + c).val(parseInt(p[c].val)) : $("#" + a + c).val(p[c].val); } else if ("compass" == t) void 0 != e.LodestoneDimension && $("#" + a + "Dim").val( extractMinecraftID(e.LodestoneDimension.val) ), void 0 != e.LodestoneTracked && $("#" + a + "Tracked").val(parseInt(e.LodestoneTracked.val)), void 0 != e.LodestonePos && ($("#" + a + "X").val(e.LodestonePos.val.X.val), $("#" + a + "Y").val(e.LodestonePos.val.Y.val), $("#" + a + "Z").val(e.LodestonePos.val.Z.val)); else if ("filled_map" == t) void 0 != e.map && $("#" + a + "map").val(e.map.val), void 0 != e.display && void 0 != e.display.val.MapColor && loadColorIntNBT(a + "MapColor", e.display.val.MapColor.val); else if ("writable_book" == t && void 0 != e.pages) loadWritableBookFromNBT(a + "BookPane", e.pages.val); else if ( ("firework_rocket" != t && "fireworks" != t) || void 0 == e.Fireworks ) if ("firework_star" == t && void 0 != e.Explosion) loadExplosionNBT(a + "Explosion_exp_0", e.Explosion.val); else if ("armor_stand" == t && void 0 != e.EntityTag) { var m = t.substr(0, t.indexOf("_")); $("#entity" + entityIndex).val(m), $("#entity" + entityIndex).trigger("change"), o.loadSummonCommand(e.EntityTag.val, entityIndex); } else if ( ("tropical_fish_bucket" != t && "cod_bucket" != t && "pufferfish_bucket" != t && "salmon_bucket" != t) || void 0 == e.EntityTag ) { if (-1 != t.indexOf("spawn_egg") && void 0 != e.EntityTag) { m = t.substr(0, t.indexOf("_spawn_egg")); void 0 != e.EntityTag.val.id ? $("#entity" + entityIndex).val( extractMinecraftID(e.EntityTag.val.id.val) ) : $("#entity" + entityIndex).val(m), $("#entity" + entityIndex).trigger("change"), o.loadSummonCommand(e.EntityTag.val, entityIndex); } else if ( "potion" == t || "splash_potion" == t || "lingering_potion" == t || "tipped_arrow" == t ) void 0 != e.CustomPotionEffects && loadCustomEffectsNBT( a + "CustomPotionEffects", e.CustomPotionEffects.val ), void 0 != e.Potion && $("#" + a + "Potion").val( extractMinecraftID(e.Potion.val) ), void 0 != e.CustomPotionColor && loadColorIntNBT( a + "CustomPotionColor", e.CustomPotionColor.val ); else if ("crossbow" == t) { var h = ["Middle", "Left", "Right"]; if (void 0 != e.ChargedProjectiles) { var g = e.ChargedProjectiles.val; for (s = 0; s < g.length && s < 3; s++) if (void 0 != g[s].id) { var _ = extractMinecraftID(g[s].id.val); $("#" + a + h[s] + "Projectile").val(_), $("#" + a + h[s] + "Projectile").trigger( "change" ), "tipped_arrow" == _ ? void 0 != g[s].tag && (void 0 != g[s].tag.val.CustomPotionEffects && loadCustomEffectsNBT( a + h[s] + "ProjectileCustomPotionEffects", g[s].tag.val.CustomPotionEffects .val ), void 0 != g[s].tag.val.Potion && $( "#" + a + h[s] + "ProjectilePotion" ).val( extractMinecraftID( g[s].tag.val.Potion.val ) ), void 0 != g[s].tag.val.CustomPotionColor && loadColorIntNBT( a + h[s] + "ProjectileCustomPotionColor", g[s].tag.val.CustomPotionColor.val )) : "firework_rocket" == _ && void 0 != g[s].tag && (void 0 != g[s].tag.val.Fireworks.val.Flight && $( "#" + a + h[s] + "ProjectileFlight" ).val( parseInt( g[s].tag.val.Fireworks.val .Flight.val ) ), loadFireworksItemNBT( a + h[s] + "ProjectileExplosionPane", g[s].tag.val.Fireworks.val )); } } } else if ("suspicious_stew" == t) void 0 != e.Effects && loadStewEffectsNBT(a + "StewEffects", e.Effects.val); else if ("spawner" == t) { if (void 0 != e.BlockEntityTag) for (var u in (void 0 != e.BlockEntityTag.val.SpawnData && loadSpawnPotentialFromNBT( o, "SpawnData", [e.BlockEntityTag.val.SpawnData.val], a ), void 0 != e.BlockEntityTag.val.SpawnPotentials && loadSpawnPotentialFromNBT( o, "SpawnPotentials", e.BlockEntityTag.val.SpawnPotentials.val, a ), mobSpawnerNBT)) void 0 != e.BlockEntityTag.val[u] && $("#" + u + a).val(e.BlockEntityTag.val[u].val); } else if ("bee_nest" == t || "beehive" == t) void 0 != e.BlockEntityTag && loadBeeHiveNestFromNBT(o, e.BlockEntityTag.val, a); else if ("campfire" == t || "soul_campfire" == t) { if (void 0 != e.BlockEntityTag) { if (void 0 != e.BlockEntityTag.val.CookingTimes) { var b = e.BlockEntityTag.val.CookingTimes.val; for (s = 0; s < 4 && s < b.length; s++) $("#" + a + "CookingTime" + s).val(b[s].trim()); } if (void 0 != e.BlockEntityTag.val.CookingTotalTimes) for ( b = e.BlockEntityTag.val.CookingTotalTimes.val, s = 0; s < 4 && s < b.length; s++ ) $("#" + a + "CookingTotalTime" + s).val( b[s].trim() ); if (void 0 != e.BlockEntityTag.val.Items) { var f = e.BlockEntityTag.val.Items.val; for (s = 0; s < f.length; s++) { setupItemSlotForNBT( a + "Slot" + replaceAll("b", "", f[s].Slot.val), f[s], o ); } } } } else if ("item_frame" == t) { if (void 0 != e.EntityTag) { void 0 != e.EntityTag.val.Item && (setupItemSlotForNBT( a + "ItemInFrame", e.EntityTag.val.Item.val, o ), showHide(a + "ItemInFramePane", a + "ItemInFrameSH")); let t = [ "ItemRotation", "Invulnerable", "Invisible", "Fixed", ]; for (let o = 0; o < t.length; o++) void 0 != e.EntityTag.val[t[o]] && $("#" + a + t[o]).val( parseInt(e.EntityTag.val[t[o]].val) ); } } else if ("lectern" == t) void 0 != e.BlockEntityTag && (void 0 != e.BlockEntityTag.val.Page && $("#" + a + "Page").val(e.BlockEntityTag.val.Page.val), void 0 != e.BlockEntityTag.val.Book && (setupItemSlotForNBT( a + "Book", e.BlockEntityTag.val.Book.val, o ), showHide(a + "BookPane", a + "BookSH"))); else if ("beacon" == t) void 0 != e.BlockEntityTag && (void 0 != e.BlockEntityTag.val.Lock && $("#" + a + "Lock").val(e.BlockEntityTag.val.Lock.val), void 0 != e.BlockEntityTag.val.Levels && $("#" + a + "Levels").val( e.BlockEntityTag.val.Levels.val ), void 0 != e.BlockEntityTag.val.Primary && $("#" + a + "Primary").val( e.BlockEntityTag.val.Primary.val ), void 0 != e.BlockEntityTag.val.Secondary && $("#" + a + "Secondary").val( e.BlockEntityTag.val.Secondary.val )); else if ( -1 != t.indexOf("banner") || "shield" == t || "barrel" == t || "chest" == t || "trapped_chest" == t || "brewing_stand" == t || "dispenser" == t || "dropper" == t || "furnace" == t || "blast_furnace" == t || "smoker" == t || "hopper" == t || -1 != t.indexOf("shulker_box") ) { if (void 0 != e.BlockEntityTag) { if ( (void 0 != e.BlockEntityTag.val.Lock && $("#" + a + "Lock").val( e.BlockEntityTag.val.Lock.val ), -1 != t.indexOf("banner") || "shield" == t) ) { if (void 0 != e.BlockEntityTag.val.Patterns) { let t = compoundToNBTString(e); $("#" + a + "BlockEntityTag").val( "Patterns:" + extractSegment( "[", "]", t.indexOf("Patterns") + 9, t ) ); } } else "barrel" == t || "chest" == t || "trapped_chest" == t || "dispenser" == t || "dropper" == t || "hopper" == t || -1 != t.indexOf("shulker_box") ? (void 0 != e.BlockEntityTag.val.LootTable && $("#" + a + "LootTable").val( e.BlockEntityTag.val.LootTable.val ), "hopper" == t && void 0 != e.BlockEntityTag.val.TransferCooldown && $("#" + a + "TransferCooldown").val( e.BlockEntityTag.val.TransferCooldown.val )) : "brewing_stand" == t ? (void 0 != e.BlockEntityTag.val.BrewTime && $("#" + a + "BrewTime").val( e.BlockEntityTag.val.BrewTime.val ), void 0 != e.BlockEntityTag.val.Fuel && $("#" + a + "Fuel").val( parseInt(e.BlockEntityTag.val.Fuel.val) )) : ("furnace" != t && "blast_furnace" != t && "smoker" != t) || (void 0 != e.BlockEntityTag.val.BurnTime && $("#" + a + "BurnTime").val( e.BlockEntityTag.val.BurnTime.val ), void 0 != e.BlockEntityTag.val.CookTime && $("#" + a + "CookTime").val( e.BlockEntityTag.val.CookTime.val ), void 0 != e.BlockEntityTag.val.CookTimeTotal && $("#" + a + "CookTimeTotal").val( e.BlockEntityTag.val.CookTimeTotal.val )); if (void 0 != e.BlockEntityTag.val.Items) for ( f = e.BlockEntityTag.val.Items.val, s = 0; s < f.length; s++ ) { setupItemSlotForNBT( a + "Slot" + replaceAll("b", "", f[s].Slot.val), f[s], o ); } if (void 0 != e.BlockEntityTag.val.CustomName) { var k; try { k = JSON.parse( JSON.parse( '"' + e.BlockEntityTag.val.CustomName.val + '"' ) ); } catch (i) { k = JSON.parse( JSON.parse( '"' + e.BlockEntityTag.val.CustomName.val .replace(/"/g, '\\"') .replace(/\\'/g, "'") + '"' ) ); } importTellrawJSON(a + "CustomName", k), showHide( a + "CustomNameEntityName", a + "CustomNameEntityNameSH" ); } } } else if ("knowledge_book" == t && void 0 != e.Recipes) for (s = 0; s < e.Recipes.val.length; s++) addTileFromNBTLoad( a + "Recipes", extractMinecraftID(e.Recipes.val[s]) ); } else { var m = t.substr(0, t.indexOf("_bucket")); $("#entity" + entityIndex).val(m), $("#entity" + entityIndex).trigger("change"), o.loadSummonCommand(e.EntityTag.val, entityIndex); } else void 0 != e.Fireworks.val.Flight && $("#" + a + "Flight").val(parseInt(e.Fireworks.val.Flight.val)), loadFireworksItemNBT(a + "ExplosionPane", e.Fireworks.val); } function objectKeyByValue(e, t) { return Object.entries(e).find(e => e[1] === t); } function setupItemSlotForNBT(e, t, a) { if (void 0 != t.id) { var o = extractMinecraftID(t.id.val); if ( (void 0 != t.Damage && $("#" + e + " option[value='" + o + ":" + t.Damage.val + "']") .length && (o += ":" + t.Damage.val), showHide(e + "Pane", e + "SH"), $("#" + e).length) ) $("#" + e).val(o), $("#" + e).trigger("change"), loadItemNBTIntoSlot(t, o, e, a); else { let o = a.traverseObjectToNBT(t, ""); (o = replaceAll(",tag{}", "", (o = attribConverter(o)))), cachedNBT.setNBT(e, "," + o), $("#" + e + "Pane").append( "
{" + o + "}
" ); } } } function attribConverter(e) { let t = [ ["maxHealth", "max_health"], ["followRange", "follow_range"], ["knockbackResistance", "knockback_resistance"], ["movementSpeed", "movement_speed"], ["attackDamage", "attack_damage"], ["attackSpeed", "attack_speed"], ["armorToughness", "armor_toughness"], ["attackKnockback", "attack_knockback"], ["jumpStrength", "jump_strength"], ["spawnReinforcements", "spawn_reinforcements"], ["flyingSpeed", "flying_speed"], ]; for (let a = 0; a < t.length; a++) e = replaceAll(t[a][0], t[a][1], e); return e; } function loadItemSpecificOptions(e, t) { var a = $("#" + e).val(); if (isLeatherArmor(a)) createComponent( e + "ItemPane", "Color", { id: e + "Color", type: "colorChooser", cssClass: "fLabel100", tip: "item.leatherArmor", }, t ); else if ("enchanted_book" == a) $("#" + e + "ItemPane").append( "
StoredEnchantments" + mkShowHide( e + "StoredEnchantments", e + "StoredEnchantmentsSH" ) + "
" + makeTip("item.enchantment_book") ), makeEnchantments(e + "StoredEnchantments", !0, $("#" + e).val()); else if ("player_head" == a) createComponent( e + "ItemPane", "SkullOwner", { id: e + "SkullOwner", type: "text", cssClass: "fLabel100", fwClass: "bigTF", tip: "item.skullOwner", }, t ); else if ("written_book" == a) createWrittenBookForm(e, t); else if (-1 != a.indexOf("sign")) { var o = getCommandStatsFormNBT(); for (var n in o) { var s = { id: e + n }; Object.assign(s, o[n]), createComponent(e + "ItemPane", n, s, t); } createSignForm(e, t); } else if ("structure_block" == a) for (var n in structureBlockNBT) { s = { id: e + n }; Object.assign(s, structureBlockNBT[n]), createComponent(e + "ItemPane", n, s, t); } else if ("compass" == a) createComponent( e + "ItemPane", "LodestoneDimension", { id: e + "Dim", type: "makeSelect", values: ["unset", "overworld", "the_end", "the_nether"], format: "special", cssClass: "fLabel100", tip: a, align: "R", }, t ), createComponent( e + "ItemPane", "LodestoneTracked", { id: e + "Tracked", type: "choice", values: unsetTrueFalse, format: "special", cssClass: "fLabel100", tip: a, align: "R", }, t ), createComponent( e + "ItemPane", "X", { id: e + "X", type: "text", cssClass: "fLabel100", format: "int", fwClass: "medTF", tip: a, }, t ), createComponent( e + "ItemPane", "Y", { id: e + "Y", type: "text", cssClass: "fLabel100", format: "int", fwClass: "medTF", }, t ), createComponent( e + "ItemPane", "Z", { id: e + "Z", type: "text", cssClass: "fLabel100", format: "int", fwClass: "medTF", }, t ); else if ("filled_map" == a) createComponent( e + "ItemPane", "map", { id: e + "map", type: "text", cssClass: "fLabel100", fwClass: "smallTF", format: "int", tip: a, }, t ), createComponent( e + "ItemPane", "MapColor", { id: e + "MapColor", type: "colorChooser", cssClass: "fLabel100", tip: a, }, t ); else if ("writable_book" == a) createWritableBookForm(e, t); else if ("firework_rocket" == a || "fireworks" == a) createComponent( e + "ItemPane", "Flight", { id: e + "Flight", type: "text", cssClass: "fLabel100", format: "b", tip: "rocket", }, t ), createComponent( e + "ItemPane", "Explosion", { type: "fwExplosion", id: e + "Explosion", forItem: !0, entDescID: "e" + entityIndex + "_" + e, format: "special", cssClass: "fLabel100", tip: "fireworks_rocket.Explosion", }, entityIndex ); else if ("firework_star" == a) $("#" + e + "ItemPane").append( "
Explosion
" ), addExplosion(e + "Explosion", !0); else if (-1 != a.indexOf("spawn_egg")) entityIndex++, $("#" + e + "ItemPane").append( "" ), makeAddEntityPaneforSpawnEgg( e + "ItemPane", "spawnEggMob_" + entityIndex, !0, a.substr(0, a.indexOf("_spawn_egg")) ); else if ( "potion" == a || "splash_potion" == a || "lingering_potion" == a || "tipped_arrow" == a ) createComponent( e + "ItemPane", "Potion", { id: e + "Potion", cssClass: "fLabel100", type: "makeSelectWithIndexAndValues", values: potions, format: "string", tip: "potion", }, t ), createComponent( e + "ItemPane", "CustomPotionColor", { id: e + "CustomPotionColor", cssClass: "fLabel100", type: "colorChooser", format: "long", tip: "potion", }, t ), createComponent( e + "ItemPane", "CustomPotionEffects", { id: e + "CustomPotionEffects", cssClass: "fLabel100", type: "statusEffects", format: "special", tip: "potion", }, t ); else if ("crossbow" == a) { var i = [ "unset", "arrow", "tipped_arrow", "spectral_arrow", "firework_rocket", ]; createComponent( e + "ItemPane", "Left Projectile", { id: e + "LeftProjectile", cssClass: "fLabel100", type: "makeSelect", values: i, format: "special", }, t ), $("#" + e + "ItemPane").append( "
" ), createComponent( e + "ItemPane", "Middle Projectile", { id: e + "MiddleProjectile", cssClass: "fLabel100", type: "makeSelect", values: i, format: "special", }, t ), $("#" + e + "ItemPane").append( "
" ), createComponent( e + "ItemPane", "Right Projectile", { id: e + "RightProjectile", cssClass: "fLabel100", type: "makeSelect", values: i, format: "special", }, t ), $("#" + e + "ItemPane").append( "
" ), $("#" + e + "LeftProjectile").bind("change", function () { updateCrossbowForm(e, "LeftProjectile", t); }), $("#" + e + "MiddleProjectile").bind("change", function () { updateCrossbowForm(e, "MiddleProjectile", t); }), $("#" + e + "RightProjectile").bind("change", function () { updateCrossbowForm(e, "RightProjectile", t); }); } else if ("suspicious_stew" == a) createComponent( e + "ItemPane", "Effects", { id: e + "StewEffects", cssClass: "fLabel100", type: "stewEffects", format: "special", tip: "potion", }, t ); else if ("armor_stand" == a) { entityIndex++, $("#" + e + "ItemPane").append( "" ); var r = mkShowHide((l = "armorStand" + entityIndex), l + "SH") + "
"; (r += ""), (r += "
"), $("#" + e + "ItemPane").html().length && (r = "
" + r), $("#" + e + "ItemPane").append(r), $("#" + l).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChangeSpawnEgg(entityIndex); } else if ( "tropical_fish_bucket" == a || "cod_bucket" == a || "pufferfish_bucket" == a || "salmon_bucket" == a ) { let t = a.substr(0, a.indexOf("_bucket")); entityIndex++, $("#" + e + "ItemPane").append( "" ); var l; r = mkShowHide((l = "armorStand" + entityIndex), l + "SH") + "
"; (r += ""), (r += "
"), $("#" + e + "ItemPane").html().length && (r = "
" + r), $("#" + e + "ItemPane").append(r), $("#" + l).css( "background", "rgba(" + hexToR(bgPalette[entityIndex % bgPalette.length]) + "," + hexToG(bgPalette[entityIndex % bgPalette.length]) + "," + hexToB(bgPalette[entityIndex % bgPalette.length]) + ",0.5)" ), entityChangeSpawnEgg(entityIndex); } else if ( [ "command_block", "repeating_command_block", "chain_command_block", ].includes(a) ) { var c = getCommandBlockFieldsFormNBT(); o = getCommandStatsFormNBT(); for (var n in (Object.assign(c, o), c)) { s = { id: e + n }; Object.assign(s, c[n]), createComponent(e + "ItemPane", n, s, t); } } else if ("campfire" == a || "soul_campfire" == a) for (var d = 0; d < 4; d++) createComponent( e + "ItemPane", d + "Slot", { type: "itemselect", format: "special", cssClass: "fLabel100", hide: !0, label: "Slot " + d, id: e + "Slot" + d, }, entityIndex ), createComponent( e + "ItemPane", d + "CookingTime", { type: "ticks", format: "special", cssClass: "fLabel100", tip: "campfire.CookingTime", label: "CookingTime " + d, id: e + "CookingTime" + d, }, entityIndex ), createComponent( e + "ItemPane", d + "CookingTotalTime", { type: "ticks", format: "special", cssClass: "fLabel100", tip: "campfire.CookingTotalTime", label: "CookingTotalTime " + d, id: e + "CookingTotalTime" + d, }, entityIndex ); else if ("item_frame" == a) createComponent( e + "ItemPane", "Item", { id: e + "ItemInFrame", type: "itemselect", forceConstruct: settings.loadItemUI, tip: "item", }, entityIndex ), createComponent( e + "ItemPane", "ItemRotation", { id: e + "ItemRotation", type: "choice", values: [ [-1, "unset"], ["1", "45°"], ["2", "90°"], ["3", "135°"], ["4", "180°"], ["5", "225°"], ["6", "270°"], ["7", "315°"], ], format: "b", tip: "item_frame", }, entityIndex ), createComponent( e + "ItemPane", "Invulnerable", { id: e + "Invulnerable", type: "choice", values: unsetTrueFalse, format: "b", tip: "entity", }, entityIndex ), createComponent( e + "ItemPane", "Invisible", { id: e + "Invisible", type: "choice", values: unsetTrueFalse, format: "b", tip: "item_frame", }, entityIndex ), createComponent( e + "ItemPane", "Fixed", { id: e + "Fixed", type: "choice", values: unsetTrueFalse, format: "b", tip: "item_frame", }, entityIndex ); else if ("lectern" == a) createComponent( e + "ItemPane", "Page", { id: e + "Page", type: "text", format: "int", tip: "lectern" }, entityIndex ), createComponent( e + "ItemPane", "Book", { id: e + "Book", type: "itemselect", forceConstruct: settings.loadItemUI, tip: "lectern", }, entityIndex ); else if ("beacon" == a) { let t = statusEffects.slice(); t.splice(0, 1, [0, "None"]), createComponent( e + "ItemPane", "Lock", { id: e + "Lock", type: "text", format: "string", tip: "block.Lock", }, entityIndex ), createComponent( e + "ItemPane", "Levels", { id: e + "Levels", type: "text", format: "int", tip: "beacon.Levels", }, entityIndex ), createComponent( e + "ItemPane", "Primary", { id: e + "Primary", type: "choice", values: t, format: "int", tip: "beacon.Primary", }, entityIndex ), createComponent( e + "ItemPane", "Secondary", { id: e + "Secondary", type: "choice", values: t, format: "int", tip: "beacon.Secondary", }, entityIndex ); } else if ( "barrel" == a || "chest" == a || "trapped_chest" == a || "brewing_stand" == a || "dispenser" == a || "dropper" == a || "furnace" == a || "blast_furnace" == a || "smoker" == a || "hopper" == a || -1 != a.indexOf("shulker_box") ) { createComponent( e + "ItemPane", "CustomName", { id: e + "CustomName", type: "customNameJSON", format: "special", cssClass: "fLabel100", tip: "block.CustomName", }, entityIndex ), createComponent( e + "ItemPane", "Lock", { id: e + "Lock", type: "text", cssClass: "fLabel100", format: "string", tip: "block.Lock", }, entityIndex ), "barrel" == a || "chest" == a || "trapped_chest" == a || "dispenser" == a || "dropper" == a || "hopper" == a || -1 != a.indexOf("shulker_box") ? (createComponent( e + "ItemPane", "LootTable", { id: e + "LootTable", type: "text", cssClass: "fLabel100", fwClass: "bigTF", format: "string", tip: "chest.LootTable", }, entityIndex ), "hopper" == a && createComponent( e + "ItemPane", "TransferCooldown", { id: e + "TransferCooldown", cssClass: "fLabel100", type: "ticks", format: "short", tip: "hopper.TransferCooldown", }, entityIndex )) : "brewing_stand" == a ? (createComponent( e + "ItemPane", "BrewTime", { id: e + "BrewTime", cssClass: "fLabel100", type: "ticks", tip: "brewing_stand.BrewTime", }, entityIndex ), createComponent( e + "ItemPane", "Fuel", { id: e + "Fuel", cssClass: "fLabel100", type: "text", format: "b", tip: "brewing_stand.Fuel", }, entityIndex )) : ("furnace" != a && "blast_furnace" != a && "smoker" != a) || (createComponent( e + "ItemPane", "BurnTime", { id: e + "BurnTime", cssClass: "fLabel100", type: "ticks", tip: "furnace.BurnTime", }, entityIndex ), createComponent( e + "ItemPane", "CookTime", { id: e + "CookTime", cssClass: "fLabel100", type: "ticks", tip: "furnace.CookTime", }, entityIndex ), createComponent( e + "ItemPane", "CookTimeTotal", { id: e + "CookTimeTotal", cssClass: "fLabel100", type: "ticks", tip: "furnace.CookTimeTotal", }, entityIndex )); var p = { chest: 27, trapped_chest: 27, brewing_stand: 5, dropper: 9, dispenser: 9, blast_furnace: 3, smoker: 3, furnace: 3, hopper: 5, barrel: 27, }[a] || 27; for (d = 0; d < p; d++) createComponent( e + "ItemPane", d + "Slot", { type: "itemselect", format: "special", cssClass: "fLabel100", hide: !0, label: "Slot " + d, id: e + "Slot" + d, }, entityIndex ); } else if ("spawner" == a) for (var n in (initMobSpawnerNBT(), mobSpawnerNBT)) { s = { id: n + e }; Object.assign(s, mobSpawnerNBT[n]), createComponent(e + "ItemPane", n, s, t); } else if ("beehive" == a || "bee_nest" == a) for (var n in (initBeeHiveNestNBT(), beeHiveNestNBT)) { s = { id: n + e }; Object.assign(s, beeHiveNestNBT[n]), createComponent(e + "ItemPane", n, s, t); } else -1 != a.indexOf("_banner") || "shield" == a ? (createComponent( e + "ItemPane", "BlockEntityTag", { id: e + "BlockEntityTag", type: "text", cssClass: "fLabel100", fwClass: "bigTF", tip: "item.bannerShield", }, t ), -1 != a.indexOf("_banner") && createComponent( e + "ItemPane", "CustomName", { id: e + "CustomName", type: "customNameJSON", format: "special", cssClass: "fLabel100", tip: "banner.CustomName", }, entityIndex )) : "knowledge_book" == a && createComponent( e + "ItemPane", "Recipes", { id: e + "Recipes", cssClass: "fLabel100", type: "itemForRecipes", tip: "item.Recipes", }, t ); } function updateCrossbowForm(e, t, a) { $("#" + e + t + "Pane").html(""), "arrow" == $("#" + e + t).val() || "spectral_arrow" == $("#" + e + t).val() || ("tipped_arrow" == $("#" + e + t).val() ? (createComponent( e + t + "Pane", "Potion", { id: e + t + "Potion", cssClass: "fLabel100", type: "makeSelectWithIndexAndValues", values: potions, format: "string", tip: "potion", }, a ), createComponent( e + t + "Pane", "CustomPotionColor", { id: e + t + "CustomPotionColor", cssClass: "fLabel100", type: "colorChooser", format: "long", tip: "potion", }, a ), createComponent( e + t + "Pane", "CustomPotionEffects", { id: e + t + "CustomPotionEffects", cssClass: "fLabel100", type: "statusEffects", format: "special", tip: "potion", }, a )) : "firework_rocket" == $("#" + e + t).val() && (createComponent( e + t + "Pane", "Flight", { id: e + t + "Flight", type: "text", cssClass: "fLabel100", format: "b", tip: "rocket", }, a ), createComponent( e + t + "Pane", "Explosion", { type: "fwExplosion", id: e + t + "Explosion", forItem: !0, entDescID: "e" + entityIndex + "_" + e, format: "special", cssClass: "fLabel100", tip: "fireworks_rocket.Explosion", }, entityIndex ))), $("#" + e + t + "Pane br:first").remove(); } function initMobSpawnerNBT() { void 0 == mobSpawnerNBT && (mobSpawnerNBT = { SpawnCount: { type: "text", format: "short", tip: "mob_spawner" }, SpawnRange: { type: "text", format: "short", tip: "mob_spawner" }, Delay: { type: "ticks", format: "short", tip: "mob_spawner" }, MinSpawnDelay: { type: "ticks", format: "short", tip: "mob_spawner", }, MaxSpawnDelay: { type: "ticks", format: "short", tip: "mob_spawner", }, MaxNearbyEntities: { type: "text", format: "short", tip: "mob_spawner", }, RequiredPlayerRange: { type: "text", format: "short", tip: "mob_spawner", }, SpawnPotential: { type: "spawnPotential", format: "special", tip: "mob_spawner", }, }); } function initBeeHiveNestNBT() { void 0 == beeHiveNestNBT && (beeHiveNestNBT = { FlowerPosX: { type: "text", format: "special", align: "R", tip: "beehive.FlowerPos", }, FlowerPosY: { type: "text", format: "special", align: "R" }, FlowerPosZ: { type: "text", format: "special", align: "R" }, Bees: { type: "beeforHive", format: "special" }, }); } function getItemSpecificNBT(e) { var t = ""; if ("enchanted_book" == (_ = $("#" + e).val())) t += replaceAll( "Enchantments", "StoredEnchantments", getEnchantments(e, "StoredEnchantments") ); else if ("player_head" == _) { (t = $("#" + e + "SkullOwner").val()).length && (t = -1 != t.indexOf("SkullOwner:{Id:") ? "," + (t = (t = (t = (t = t.substr( t.indexOf("SkullOwner:{Id:") )).replace("}]}}}}]}", "}]}}")).replace( "}]}}}", "}]}}" )).replace(" 1", "")) : ',SkullOwner:"' + t + '"'); } else if ("written_book" == _) t = getWrittenBookNBT(e + "BookPane"); else if ( [ "command_block", "repeating_command_block", "chain_command_block", ].includes(_) ) { var a = "", o = getCommandBlockFieldsFormNBT(); for (var n in o) a += getNBTforKey(e + n, o[n], ""); a = replaceAll(e, "", a); var s = getCommandStatsFormNBT(), i = ""; for (var n in s) i += getNBTforKey(e + n, s[n], ""); i.length && (a += ",CommandStats:{" + replaceAll(e, "", i.substr(1)) + "}"), a.length && (t = ",BlockEntityTag:{" + a.substr(1) + "}"); } else if (-1 != _.indexOf("sign")) { (s = getCommandStatsFormNBT()), (i = ""); for (var n in s) i += getNBTforKey(e + n, s[n], ""); i.length && (t += ",CommandStats:{" + replaceAll(e, "", i.substr(1)) + "}"), (t = ",BlockEntityTag:{" + (t += signJson.getJsonForSign(e + "SignPane")).substr(1) + "}"); } else if ("structure_block" == _) { var r = ""; for (var n in structureBlockNBT) r += getNBTforKey(e + n, structureBlockNBT[n], ""); r.length && (t += ",BlockEntityTag:{" + replaceAll(e, "", r.substr(1)) + "}"); } else if ("compass" == _) "unset" != $("#" + e + "Dim").val() && ((t += ',LodestoneDimension:"minecraft:' + $("#" + e + "Dim").val() + '"'), -1 != $("#" + e + "Tracked").val() && (t += ",LodestoneTracked:" + $("#" + e + "Tracked").val() + "b"), $("#" + e + "X").val().length && $("#" + e + "Y").val().length && $("#" + e + "Z").val().length && (t += ",LodestonePos:{X:" + $("#" + e + "X").val() + ",Y:" + $("#" + e + "Y").val() + ",Z:" + $("#" + e + "Z").val() + "}")); else if ("filled_map" == _) $("#" + e + "map").val().length && (t += ",map:" + $("#" + e + "map").val()); else if ("writable_book" == _) t = getWritableBookNBT(e + "BookPane"); else if ("firework_rocket" == _ || "fireworks" == _) t = getFireworksItemNBT(e); else if ("firework_star" == _) t = ",Explosion:" + getExplosionNBT(e + "Explosion_exp_0").substr(1); else if ("armor_stand" == _) { var l = $("#" + e + "_entID").val(); (t = entityDescriptors["e" + l].getEntitySpecificCommand(l)), cachedNBT.setNBT("e" + l, t), t.length > 0 && (t = ",EntityTag:{" + t.substr(1) + "}"); } else if ( "tropical_fish_bucket" == _ || "cod_bucket" == _ || "pufferfish_bucket" == _ || "salmon_bucket" == _ ) { l = $("#" + e + "_entID").val(); (t = entityDescriptors["e" + l].getEntitySpecificCommand(l)), cachedNBT.setNBT("e" + l, t), t.length > 0 && (t = ",EntityTag:{" + t.substr(1) + "}"); } else if (-1 != _.indexOf("spawn_egg")) { l = $("#" + e + "_entID").val(); _.substr(0, _.indexOf("_spawn_egg")) != $("#entity" + l).val() && (t += ',id:"minecraft:' + $("#entity" + l).val() + '"'), (t += entityDescriptors["e" + l].getEntitySpecificCommand(l)), cachedNBT.setNBT("e" + l, t), t.length > 0 && (t = ",EntityTag:{" + t.substr(1) + "}"); } else if ( "potion" == _ || "splash_potion" == _ || "lingering_potion" == _ || "tipped_arrow" == _ ) (t += getStatusEffectsNBT( "CustomPotionEffects", e + "CustomPotionEffects" )), (t += getPotion("Potion", e + "Potion")), (t += getColorInteger( e + "CustomPotionColor", "CustomPotionColor" )); else if ("crossbow" == _) { var c = getProjectile(e, "MiddleProjectile") + getProjectile(e, "LeftProjectile") + getProjectile(e, "RightProjectile"); ",{},{},{}" != c && (t += ",ChargedProjectiles:[" + c.substr(1) + "],Charged:1b"); } else if ("suspicious_stew" == _) t += getStewEffectsNBT("Effects", e + "StewEffects"); else if ("campfire" == _ || "soul_campfire" == _) { for (var d = "", p = "", m = "", h = "", g = 0; g < 4; g++) { "{}" != (b = getItemNBT(e + "Slot" + g)) && (h += ",{Slot:" + g + "b," + b.substr(1)); } h.length && (d = ",Items:[" + h.substr(1) + "]"); for (g = 0; g < 4; g++) $("#" + e + "CookingTime" + g).val().length ? (p += "," + $("#" + e + "CookingTime" + g).val()) : (p += ",0"), $("#" + e + "CookingTotalTime" + g).val().length ? (m += "," + $("#" + e + "CookingTotalTime" + g).val()) : (m += ",0"); ",0,0,0,0" != p && (d += ",CookingTimes:[I;" + p.substr(1) + "]"), ",0,0,0,0" != m && (d += ",CookingTotalTimes:[I;" + m.substr(1) + "]"), d.length && (t += ",BlockEntityTag:{" + d.substr(1) + "}"); } else if ("item_frame" == _) { let a = ""; "{}" != (_ = getItemNBT(e + "ItemInFrame")) && (a += ",Item:" + _); let o = ["ItemRotation", "Invulnerable", "Invisible", "Fixed"]; for (let t = 0; t < o.length; t++) -1 != $("#" + e + o[t]).val() && (a += "," + o[t] + ":" + $("#" + e + o[t]).val() + "b"); a.length && (t += ",EntityTag:{" + a.substr(1) + "}"); } else if ("lectern" == _) { let a = ""; var _; "{}" != (_ = getItemNBT(e + "Book")) && (a += ",Book:" + _), $("#" + e + "Page").val().length && (a += ",Page:" + $("#" + e + "Page").val()), a.length && (t += ",BlockEntityTag:{" + a.substr(1) + "}"); } else if ("beacon" == _) { let a = ""; $("#" + e + "Lock").val().length && (a += ',Lock:"' + $("#" + e + "Lock").val() + '"'), $("#" + e + "Levels").val().length && (a += ",Levels:" + $("#" + e + "Levels").val()), 0 != $("#" + e + "Primary").val() && (a += ",Primary:" + $("#" + e + "Primary").val()), 0 != $("#" + e + "Secondary").val() && (a += ",Secondary:" + $("#" + e + "Secondary").val()), a.length && (t += ",BlockEntityTag:{" + a.substr(1) + "}"); } else if ( "barrel" == _ || "chest" == _ || "trapped_chest" == _ || "brewing_stand" == _ || "dispenser" == _ || "dropper" == _ || "furnace" == _ || "blast_furnace" == _ || "smoker" == _ || "hopper" == _ || -1 != _.indexOf("shulker_box") ) { h = ""; var u = { chest: 27, trapped_chest: 27, brewing_stand: 5, dropper: 9, dispenser: 9, blast_furnace: 3, smoker: 3, furnace: 3, hopper: 5, barrel: 27, }[_] || 27; for (g = 0; g < u; g++) { var b; "{}" != (b = getItemNBT(e + "Slot" + g)) && (h += ",{Slot:" + g + "b," + b.substr(1)); } h.length && (t = ",Items:[" + h.substr(1) + "]"), $("#" + e + "Lock").val().length && (t += ',Lock:"' + $("#" + e + "Lock").val() + '"'), "barrel" == _ || "chest" == _ || "trapped_chest" == _ || "dispenser" == _ || "dropper" == _ || "hopper" == _ || -1 != _.indexOf("shulker_box") ? ($("#" + e + "LootTable").val().length && (t += ',LootTable:"' + $("#" + e + "LootTable").val() + '"'), "hopper" == _ && $("#" + e + "TransferCooldown").val().length && (t += ",TransferCooldown:" + $("#" + e + "TransferCooldown").val())) : "brewing_stand" == _ ? ($("#" + e + "BrewTime").val().length && (t += ",BrewTime:" + $("#" + e + "BrewTime").val()), $("#" + e + "Fuel").val().length && (t += ",Fuel:" + $("#" + e + "Fuel").val() + "b")) : ("furnace" != _ && "blast_furnace" != _ && "smoker" != _) || ($("#" + e + "BurnTime").val().length && (t += ",BurnTime:" + $("#" + e + "BurnTime").val()), $("#" + e + "CookTime").val().length && (t += ",CookTime:" + $("#" + e + "CookTime").val()), $("#" + e + "CookTimeTotal").val().length && (t += ",CookTimeTotal:" + $("#" + e + "CookTimeTotal").val())), (v = jsonConvert( JSON.stringify(tellrawJson.getJsonForTellraw(e + "CustomName")) )).length > 2 && (t += ",CustomName:" + v), t.length > 0 && (t = ",BlockEntityTag:{" + t.substr(1) + "}"); } else if ("spawner" == _) { initMobSpawnerNBT(); var f = ""; for (var n in mobSpawnerNBT) { var k = { id: n + e }; Object.assign(k, mobSpawnerNBT[n]), (f += getNBTforKey(n, k, e)); } (f += getSpawnPotentailsNBT(e, !0)).length && (t += ",BlockEntityTag:{" + f.substr(1) + "}"); } else { if ("beehive" == _ || "bee_nest" == _) { let t = getFlowerCoords("FlowerPos", e); return (t += getBeesForHiveNBT(e)).length ? ",BlockEntityTag:{" + t.substr(1) + "}" : t; } var v; if (-1 != _.indexOf("banner") || "shield" == _) return ( (t = $("#" + e + "BlockEntityTag").val()).length && (-1 != t.indexOf("BlockEntityTag:") && (t = (t = (t = t.substr( t.indexOf("BlockEntityTag:{") )).replace("BlockEntityTag:{", "")).replace("}}", "")), (t = "," + t)), -1 != _.indexOf("banner") && (t += getCustomNameAndColor("#" + e + "CustomName", 0)), (v = jsonConvert( JSON.stringify( tellrawJson.getJsonForTellraw(e + "CustomName") ) )).length > 2 && (t += ",CustomName:" + v), t.length > 0 && (t = ",BlockEntityTag:{" + t.substr(1) + "}"), t ); "knowledge_book" == _ && (t = getCanPlaceOnOrDestroy(e, "Recipes")); } return t; } function getFlowerCoords(e, t) { return $("#" + e + "X" + t).val().length && $("#" + e + "Y" + t).val().length && $("#" + e + "Z" + t).val().length ? "," + e + ":{X:" + $("#" + e + "X" + t).val() + ",Y:" + $("#" + e + "Y" + t).val() + ",Z:" + $("#" + e + "Z" + t).val() + "}" : ""; } function getProjectile(e, t) { try { if ( "arrow" == $("#" + e + t).val() || "spectral_arrow" == $("#" + e + t).val() ) return ',{id:"minecraft:' + $("#" + e + t).val() + '",Count:1b}'; if ("tipped_arrow" == $("#" + e + t).val()) { var a = getStatusEffectsNBT( "CustomPotionEffects", e + t + "CustomPotionEffects" ) + getPotion("Potion", e + t + "Potion") + getColorInteger( e + t + "CustomPotionColor", "CustomPotionColor" ); return 0 == a.length ? ',{id:"minecraft:tipped_arrow",Count:1b}' : ',{id:"minecraft:tipped_arrow",Count:1b,tag:{' + a.substr(1) + "}}"; } if ("firework_rocket" == $("#" + e + t).val()) { var o = getFireworksItemNBT(e + t); return 0 == o.length ? ',{id:"minecraft:firework_rocket",Count:1b}' : ',{id:"minecraft:firework_rocket",Count:1b,tag:{' + o.substr(1) + "}}"; } } catch (e) {} return ",{}"; } function getEnchantNumFromString(e) { var t = extractMinecraftID(e); for (enc in enchantables) if (replaceAll(" ", "_", enchantables[enc][0]).toLowerCase() == t) return enc; return -1; } var signedIn = !1, sortField = "title", sortOrder = "a", gRowIndex = 0, userToken = "", commandID = -1, mcfunctions = [], currentFunctionEdit = -1, ttNewPassword = "The supplied password must be between 6 and 64 characters and can only contain numbers, letters, dashes, or underscores.", llPasswordReset = "Password Reset", llEnterEmail = "Enter the email that you supplied when you created your account. MCStacker will reset your password and email it to you.", monthNames = new Array( "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ); function mkTT(e) { return ' title="' + e + '"'; } function getCookie(e) { for ( var t = e + "=", a = document.cookie.split(";"), o = 0; o < a.length; o++ ) { for (var n = a[o]; " " == n.charAt(0); ) n = n.substring(1); if (0 == n.indexOf(t)) return n.substring(t.length, n.length); } return ""; } function setCookie(e, t, a) { var o = ""; if (a) { var n = new Date(); n.setTime(n.getTime() + 24 * a * 60 * 60 * 1e3), (o = "; expires=" + n.toUTCString()); } document.cookie = e + "=" + (t || "") + o + "; path=/"; } function loadManagement() { (userToken = getCookie("userToken")), loadNavPane(); var e = window.location.hash; "#" == e.charAt(0) && $.isNumeric(e.substr(2)) && (showCommunity(), showDetails(e.substr(2), !0)); } function hashpword(e) { return ( (tmp = MD5( e + "This is the client side salt. There is more robust seasoning at the server side" )), tmp ); } function loadNavPane() { $("#navPane").html( makeNavButton( "Search", "showSearch()", "Search and Browser commands savesd by others" ) ), $.post( "mcstacker2.php", { op: "isSignedIn", userToken: userToken }, function (e, t) { var a = ""; "signedIn" == $(e).find("action").text() ? ($("#navPane").append( makeNavButton( "My Commands", "showAccount('title', 'a', 0)" ) + makeNavButton( "Favorites", "showMyLikes('title','a',0)" ) + makeNavButton( "Discuss", "showDiscussions('title','a',0)" ) + makeNavButton( "Account Settings", "showAccountSettings()" ) + makeNavButton("Sign Out", "signOut()") + "" + $(e).find("username").text() + a + "" ), (signedIn = !0), $("#commandOutput").append( "Edit As New Command" ), $("#saveAsBut").bind("click", function () { $("#community").show(), makeDetailsForm( "", -1, $("#commandOutput-ta").val() ); })) : ($("#navPane").append( makeNavButton( "Sign In", "displayLogin('You are not currently signed in.')" ) + "" + a + "" ), (signedIn = !1)); } ); } function showDiscussions(e, t, a) { $("#manPane").html( "
" ), (gRowIndex = a), $.post( "mcstacker2.php", { op: "searchCommands", searchWhat: "unread", commandTypeSearch: "Any", searchString: "", userToken: userToken, sortField: e, sortOrder: t, rowIndex: a, }, function (e, t) { "searchResult" == $(e).find("action").text() ? showSearchResult(e, a, "unread") : "searchFailed" == $(e).find("action").text() && $("#searchResults").html($(e).find("message").text()); } ); } function showMyLikes(e, t, a) { $("#manPane").html( "
" ), (gRowIndex = a), $.post( "mcstacker2.php", { op: "searchCommands", userToken: userToken, searchWhat: "likes", commandTypeSearch: "Any", searchString: "", sortField: e, sortOrder: t, rowIndex: a, }, function (e, t) { "searchResult" == $(e).find("action").text() ? showSearchResult(e, a, "likes") : "searchFailed" == $(e).find("action").text() && $("#searchResults").html($(e).find("message").text()); } ); } function showHome() { $("#manPane").load(ppAbout); } function showHelp() { $("#manPane").load(ppHelp); } function makeNavButton(e, t, a) { return ( (ttip = void 0 != a ? mkTT(a) : ""), '" + e + "" ); } function makeButton(e, t, a) { return ( (ttip = void 0 != a ? mkTT(a) : ""), '" + e + "" ); } function makePageButton(e, t, a) { return '" + e + ""; } function makeButtonR(e, t, a) { return ( '" + e + "" ); } function doSignIn() { (hashedpword = hashpword($("#password").val())), $.post( "mcstacker2.php", { op: "doSignIn", hashedpword: hashedpword, username: $("#username").val(), }, function (e, t) { (userToken = $(e).find("userToken").text()), (message = $(e).find("message").text()), "showCommands" == $(e).find("action").text() ? (showCommands(e, 0), loadNavPane()) : "signInFailed" == $(e).find("action").text() && ($("#message").html(message), alertify.error(message)); } ); } function showSearch() { makeSearchForm(), doSearch("date_modified", "d", 0); } function makeSearchForm() { for ( var e = [ "Any", "bossbar", "data", "effect", "execute", "fill", "give", "kill", "loot", "particle", "playsound", "replaceitem", "scoreboard", "setblock", "summon", "team", "teleport", "tellraw", "title", ], t = "", a = 0; a < e.length; a++ ) t += ""; $("#manPane").html( "

Search/Browse

" + makeButton( "Search/Browse", "onClick=doSearch('title', 'a', 0)", "Search and browse commands created by other users." ) + "
" ); } function searchUsers(e) { makeSearchForm(), $("#commandTypeSearch").val("Any"), $("#searchWhat").val(4), $("#searchString").val(e), doSearch("title", "a", 0); } function searchTag(e) { showSearch(), $("#commandTypeSearch").val("Any"), $("#searchWhat").val(3), $("#searchString").val(e), doSearch("title", "a", 0); } function doSearch(e, t, a) { (sortOrder = t), (sortField = e), $.post( "mcstacker2.php", { op: "searchCommands", searchWhat: $("#searchWhat").val(), commandTypeSearch: $("#commandTypeSearch").val(), searchString: $("#searchString").val(), userToken: userToken, sortField: sortField, sortOrder: sortOrder, rowIndex: a, }, function (e, t) { "searchResult" == $(e).find("action").text() ? showSearchResult(e, a, "search") : "searchFailed" == $(e).find("action").text() && $("#searchResults").html($(e).find("message").text()); } ); } function showSearchResult(e, t, a) { var o = "", n = $(e).find("rowCount").text(), s = ""; if (n > 10) { func = "likes" == a ? "showMyLikes" : "likes" == a ? "showDiscussions" : "doSearch"; for (let e = 0; e < n && e < 400; e += 10) s += makePageButton( e / 10 + 1, func + "('" + sortField + "', '" + sortOrder + "', " + e + ")", t == e ? "pageButtonSelected" : "pageButton" ); s.length > 0 && (s = "
" + s + "

"); } $("row", e).each(function (e) { (user = $(this).find("username").text()), (cid = $(this).find("cid").text()), (rowClass = e % 2 == 0 ? "srRowLight" : "srRowDark"), (o += "' + $(this).find("title").text() + "" + $(this).find("description").text() + "" + $(this).find("commandType").text() + "" + user + "" + convertTime($(this).find("modifiedTime").text()) + "" + $(this).find("rank").text() + ""); }), o.length > 0 && $("#searchResults").html( s + "" + o + "
" + makeSortCol("Name", "title", a) + "" + makeSortCol("Description", "description", a) + "" + makeSortCol("Type", "command_type_id", a) + "" + makeSortCol("Creator", "username", a) + "" + makeSortCol("Date Modified", "date_modified", a) + "" + makeSortCol("Likes", "votes", a) + "
" ); } function showCommands(e, t) { var a = "", o = $(e).find("rowCount").text(), n = ""; if (o > 10) { for (i = 0; i < o && i < 400; i += 10) t == i ? (n += makePageButton( i / 10 + 1, "showAccount('" + sortField + "', '" + sortOrder + "', " + i + ")", "pageButtonSelected" )) : (n += makePageButton( i / 10 + 1, "showAccount('" + sortField + "', '" + sortOrder + "', " + i + ")", "pageButton" )); n.length > 0 && (n = "
" + n + "

"); } $("row", e).each(function (e) { (cid = $(this).find("cid").text()), (rowClass = e % 2 == 0 ? "srRowLight" : "srRowDark"), (a += "' + $(this).find("title").text() + "" + $(this).find("description").text() + "" + $(this).find("commandType").text() + "" + tickORCross("public", $(this).find("public").text(), cid) + "" + tickORCross( "allow_comments", $(this).find("allow_comments").text(), cid ) + "" + $(this).find("mcVersion").text() + "" + convertTime($(this).find("modifiedTime").text()) + '"); }), a.length > 0 ? $("#manPane").html( n + "" + a + "
" + makeSortCol("Name", "title", "mine") + "" + makeSortCol("Description", "description", "mine") + "" + makeSortCol("Type", "command_type_id", "mine") + "" + makeSortCol("Public", "public", "mine") + "" + makeSortCol("Allow Comments", "allow_comments", "mine") + " " + makeSortCol("Ver", "mc_version", "mine") + " " + makeSortCol("Modified", "date_modified", "mine") + "
" ) : $("#manPane").html( "

You have no saved commands

" ); } function tickORCross(e, t, a) { return 1 == t ? "" : ""; } function makeSortCol(e, t, a) { return t == sortField ? "" + e + " " + ("a" == sortOrder ? "" : "") + "" : "" + e + " "; } function sortByField(e, t) { e == sortField ? (sortOrder = "a" == sortOrder ? "d" : "a") : ((sortOrder = "a"), (sortField = e)), "search" == t ? doSearch(sortField, sortOrder, 0) : "mine" == t ? showAccount(sortField, sortOrder, 0) : "likes" == t ? showMyLikes(sortField, sortOrder, 0) : "unread" == t && showDiscussions(sortField, sortOrder, 0); } function changePassword() { $("#manPane").html( "

Change Password



" ); } function doPasswordChange() { /^[A-Za-z0-9_-]{6,64}$/.test($("#newpassword").val()) ? $("#newpasswordconfirm").val() != $("#newpassword").val() ? $("#message").html("Your passwords do not match.") : ((hashednewpword = hashpword($("#newpassword").val())), (hashedoldpword = hashpword($("#oldpassword").val())), $.post( "mcstacker2.php", { op: "changePassword", userToken: userToken, hashednewpword: hashednewpword, hashedoldpword: hashedoldpword, }, function (e, t) { "showAccount" == $(e).find("action").text() ? (alertify.log($(e).find("message").text()), showAccountDetails(e)) : "changePasswordFailed" == $(e).find("action").text() && $("#message").html($(e).find("message").text()); } )) : $("#message").html(ttNewPassword); } function updateEmail() { $("#manPane").html( "

Update Email

" ); } function doEmailChange() { $.post( "mcstacker2.php", { op: "changeEmail", userToken: userToken, email: $("#email").val() }, function (e, t) { "showAccount" == $(e).find("action").text() ? (alertify.log($(e).find("message").text()), showAccountDetails(e)) : "changeEmailFailed" == $(e).find("action").text() && $("#message").html($(e).find("message").text()); } ); } function showAccountDetails(e) { $("#manPane").html( "
" + makeButton("Sign Out", "signOut()", "Sign Out") + makeButton( "Change Password", "changePassword()", "Change your password" ) + makeButton( "Update Email Address", "updateEmail()", "Change your email address" ) + "Remove Account

" ), $("#message").html($(e).find("message").text()); } function showAccount(e, t, a) { (gRowIndex = a), $.post( "mcstacker2.php", { op: "showMyCommands", userToken: userToken, sortField: e, sortOrder: t, rowIndex: a, }, function (e, t) { (message = $(e).find("message").text()), "showLogin" == $(e).find("action").text() ? displayLogin(message) : "showCommands" == $(e).find("action").text() && showCommands(e, a); } ); } function showAccountSettings() { $.post( "mcstacker2.php", { op: "showAccount", userToken: userToken }, function (e, t) { (message = $(e).find("message").text()), "showLogin" == $(e).find("action").text() ? displayLogin(message) : "showAccount" == $(e).find("action").text() && showAccountDetails(e); } ); } function signOut() { $("#saveAsBut").remove(), $.post( "mcstacker2.php", { op: "signOut", userToken: userToken }, function (e, t) { loadNavPane(), displayLogin($(e).find("message").text()); } ); } function displayLogin(e) { $("#manPane").html( "

Sign In

" + e + "


" + makeButton("Register", "displayRegistration()") + makeButton("Password Reset", "forgotPassword()") + "

" ); } function displayRegistration() { $("#manPane").html( "

Register




" ), $("#terms").load("termsandprivacy.html"); } function forgotPassword() { $("#manPane").html( "

" + llPasswordReset + "

" + llEnterEmail + "

" ); } function doPasswordReset() { $.post( "mcstacker2.php", { op: "passwordReset", email: $("#email").val() }, function (e, t) { "passwordResetInvalidEmail" == $(e).find("action").text() ? ($("#message").html($(e).find("message").text()), alertify.error($(e).find("message").text())) : "showLogin" == $(e).find("action").text() && (displayLogin($(e).find("message").text()), alertify.log($(e).find("message").text())); } ); } function doRegistration() { $("#passwordconfirm").val() != $("#password").val() ? $("#message").html("Your passwords do not match.") : /^[A-Za-z0-9_-]{6,64}$/.test($("#password").val()) ? ((hashedpword = hashpword($("#password").val())), $.post( "mcstacker2.php", { op: "doRegistration", hashedpword: hashedpword, username: $("#username").val(), email: $("#email").val(), }, function (e, t) { "regSuccess" == $(e).find("action").text() ? (displayLogin($(e).find("message").text()), alertify.log($(e).find("message").text())) : "regFailed" == $(e).find("action").text() && $("#message").html($(e).find("message").text()); } )) : $("#message").html(ttNewPassword); } function makeTextArea(e, t, a, o) { return ( "
Markdown: [link]URL[title]URL Title[/title][/link], [b]Bold[/b], [i]Italic[/i], [u]Underlined[/u] " + (a - t.length) + " Characters remaining. " ); } function updateCharsLeft(e, t) { (left = t - $("#" + e).val().length), left < 0 ? ($("#" + e).val( $("#" + e) .val() .substr(0, t) ), $("#" + e + "_charsLeft").html("0 Characters remaining.")) : $("#" + e + "_charsLeft").html(left + " Characters remaining."); } function copySaveCommandToClipboard() { copyToClipboard($("#commandString").val()); } function makeDetailsForm(e, t, a) { void 0 == a && (a = $(e).find("commandString").text()), $("#manPane").html("
"), $("#detailsPane").html( " " + (64 - $(e).find("commandTitle").text().length) + " Characters remaining.
" + makeTextArea( "commandDescription", $(e).find("commandDescription").text(), 5e3, "Describe what the command does and any other important information about it" ) + "

" + makeButton( "Load into MCStacker form", "loadSavedCommand(" + $(e).find("mc_version").text() + ")", "Load this command into the MCStacker form" ) + "

File Name" + makeButton( "OK", "saveMCFuncEdit()", "Saves the edit to the mcfunction file. But you'll also need to save the entire command." ) + makeButton( "Cancel", "closeMCFuncEdit()", "Close this editor without saving the changes" ) + "



" ), $("#mcfunctionEdit").hide(), $("func", e).each(function (e) { addNewMCFunctionLine( $(this).find("filename").text(), $(this).find("content").text() ); }), $("#public").prop("checked", "1" == $(e).find("public").text()), $("#allow_comments").prop( "checked", "1" == $(e).find("allow_comments").text() ), $("word", e).each(function (e) { $("#tagEntry").val($(this).text() + ","), processTagAdd(); }), $("#detailsPane").append( "

" + makeButton("Save", "saveCommand(" + t + ")") + makeButton( "Cancel", "showDetails(" + commandID + ")", "Cancel this edit." ) + "

" ), document .getElementById("files") .addEventListener("change", handleFileSelect, !1); } function addNewMCFunctionLine(e, t) { for (var a = 0; $("#mcfunc" + a).length; ) a++; (mcfunctions["f" + a] = { name: e, content: t }), $("#mcfunctions").append( "
" + e + "" + makeButton( "Edit", "editMCFunction(" + a + ")", "This mcfunction file" ) + "' ); } function mcfunctionsXML() { var e = ""; for (var t in mcfunctions) e += "" + mcfunctions[t].name.htmlEscape() + "" + mcfunctions[t].content.htmlEscape() + ""; return (e += ""); } function handleFileSelect(e) { for (var t = e.target.files, a = 0; a < t.length; a++) { f = t[a]; var o = new FileReader(); (o.onload = (function (e) { return function (t) { addNewMCFunctionLine(escape(e.name), t.target.result); }; })(f)), o.readAsBinaryString(f); } } function removeMCFuntion(e) { delete mcfunctions["f" + e], $("#mcfunc" + e).remove(); } function editMCFunction(e) { (currentFunctionEdit = e), $("#functionEditor").val(mcfunctions["f" + e].content), $("#functionFileName").val(mcfunctions["f" + e].name), $("#mcfunctionEdit").show(); } function saveMCFuncEdit() { (mcfunctions["f" + currentFunctionEdit].content = $( "#functionEditor" ).val()), (mcfunctions["f" + currentFunctionEdit].name = $( "#functionFileName" ).val()), $("#fileName" + currentFunctionEdit).html( mcfunctions["f" + currentFunctionEdit].name ), $("#mcfunctionEdit").hide(); } function closeMCFuncEdit() { $("#mcfunctionEdit").hide(); } function readURL(e) {} function publicClicked(e) { $("#public" + e).is(":checked") ? ($("#allow_comments" + e).prop("disabled", !1), (public_ = 1)) : ($("#allow_comments" + e).prop("disabled", !0), $("#allow_comments" + e).prop("checked", !1), (public_ = 0)), $("#allow_comments" + e).is(":checked") ? (ac_ = 1) : (ac_ = 0), "" != e && $.post( "mcstacker2.php", { op: "changePrivacy", userToken: userToken, commandID: e, public_: public_, allow_comments: ac_, }, function (e, t) {} ); } function processTagAdd() { if ( ((counter = 0), (str = $("#tagEntry").val()), "," == str.substr(str.length - 1)) ) { if (((word = str.substr(0, str.length - 1).trim()), word.length > 0)) { for (id = 0; $("#tw" + id).length; ) id++, counter++; if (!(counter < 10)) return void $("#tagEntry").val("Tag Limit Exceeded"); $("#tagWords").append( "" + makeButton( word, "delTagWord(" + id + ")", "Remove this tag." ) + "" ); } $("#tagEntry").val(""); } } function makeTagsCSV() { var e = ""; return ( $("#tagWords > .tagWord").each(function () { (tmp = $("#" + this.id).html()), (tmp = tmp.substr(tmp.lastIndexOf('">') + 2)), (tmp = tmp.substr(0, tmp.lastIndexOf("<"))), (e += tmp + ","); }), e ); } function delTagWord(e) { $("#tw" + e).remove(); } function saveCommand(e) { (public_ = $("#public").is(":checked") ? "1" : "0"), (allow_comments = $("#allow_comments").is(":checked") ? "1" : "0"), $("#commandTitle").val().length > 0 && $("#commandDescription").val().length > 0 && $("#commandString").val().length > 0 ? $.post( "mcstacker2.php", { op: "saveCommand", userToken: userToken, commandID: e, commandTitle: $("#commandTitle").val(), commandDescription: $("#commandDescription").val(), commandString: $("#commandString").val(), public_: public_, allow_comments: allow_comments, mcfunctions: mcfunctionsXML(), mc_version: "1.16", tags: makeTagsCSV(), }, function (e, t) { "saveCommandSuccess" == $(e).find("action").text() && showDetails((commandID = $(e).find("cid").text())); } ) : alertify.alert( "Please make sure the Command title, description and the command itself are filled out." ); } function editAsNewCommand(e) { saveDetailsForm(e, 2); } function previewMCFunction(e) { $("#detailsPane").append( "
" + mcfunctions["f" + e].name + "X
" ), $("#mcfunctionPreview").draggable(), $("#mcfunctionPreview").css({ top: mouse.y - 500, left: mouse.x }), $("#mcfunctionPreview").show(); } function downloadMCFunction(e) { var t = document.createElement("a"); t.setAttribute( "href", "data:text/plain;charset=utf-8," + encodeURIComponent(mcfunctions["f" + e].content) ), t.setAttribute("download", mcfunctions["f" + e].name), (t.style.display = "none"), document.body.appendChild(t), t.click(), document.body.removeChild(t); } function showDetails(e, t) { var a = !(void 0 != t && !t); (commandID = e), -1 != e ? ((commandID = e), $.post( "mcstacker2.php", { op: "getCommandDetails", userToken: userToken, commandID: e, }, function (t, o) { "getCommandDetailsSuccess" == $(t).find("action").text() && (signedIn ? $(t).find("UID").text() == $(t).find("ownerUID").text() ? showDetailsReadOnly( "detailsPane", t, e, !0, !0, a ) : showDetailsReadOnly( "detailsPane", t, e, !0, !1, a ) : showDetailsReadOnly( "detailsPane", t, e, !1, !1, a )); } )) : makeDetailsForm(commandID, !0); } function showDetailsReadOnly(e, t, a, o, n, s) { (document.title = "MCStacker: " + $(t).find("commandTitle").text()), s && window.history.pushState( { id: a }, "MCStacker: " + $(t).find("commandTitle").text(), "#!" + a ), (mcfunctions = []), $("#" + e).html( "

" + $(t).find("commandTitle").text() + "

" + markUp($(t).find("commandDescription").text()) + "


" + makeButton( "Load into MCStacker form", "loadSavedCommand(" + $(t).find("mc_version").text() + ")", "Load this command into the MCStacker form" ) + makeButton( "Copy to Clipboard", "copySaveCommandToClipboard()", "Copies this saved command to the system clipboard" ) ), o && $("#" + e).append( makeButton( "Edit As New Command", "editAsNewCommand(" + a + ")", "Copy this command's details as a new command." ) ); var i = $(t).find("mc_version").text(); "1.16" != i && $("#" + e).append( "
This command was created with the " + i + " version of MCStacker. It may not load in properly. Maybe try an alternative version of MCStacker.
" ); var r = ""; $("func", t).each(function (e) { var t = $(this).find("filename").text(), a = $(this).find("content").text(); (mcfunctions["f" + e] = { name: t, content: a }), (r += "
" + t + ""); }), r.length > 0 && $("#" + e).append( "

mcfunction files" + r + "

" ), $(t).find("UID").text() != $(t).find("ownerUID").text() && $("#" + e).append( "

Created By " + $(t).find("ownerName").text() + "

" ), (tagHTML = ""), "1" == $(t).find("admin").text() && (n = !0), (ce = n ? 1 : 0), $("word", t).each(function (e) { tagHTML += makeButton( $(this).text(), "searchTag('" + $(this).text() + "')", "Search commands with this tag." ); }), tagHTML.length > 0 && $("#" + e).append("

Tags: " + tagHTML + "

"), $("#" + e).append("

" + makeShareLink(a) + "

"); var l = ""; if ( (1 == $(t).find("commentCount").text() ? (l += "1 Comment") : $(t).find("commentCount").text() > 1 && (l.length > 0 && (l += ", "), (l += $(t).find("commentCount").text() + " Comments")), l.length > 0 && $("#" + e).append("

" + l + "

"), 1 == $(t).find("youLoved").text() ? $("#like" + a).attr("src", "heartTick.png") : $("#like" + a).attr("src", "heartOn.png"), $(t).find("hearts").text() > 0 && $("#heartCount").html($(t).find("hearts").text()), o) ) { var c = "Like this command to save it to your 'Likes' list. Unlike it remove it from your 'Likes' list."; 0 == $(t).find("youLike").text() ? $("#" + e).append( makeButton( "Add To Favorites", "likeCommand(" + a + ",1," + ce + ")", c ) ) : $("#" + e).append( makeButton( "Remove From Favorites", "likeCommand(" + a + ",0," + ce + ")", c ) ), $("#like" + a).bind("click", function () { "heartTick.png" == $("#like" + a).attr("src") ? (rankCommand(a, 0), $("#like" + a).attr("src", "heartOn.png")) : (rankCommand(a, 1), $("#like" + a).attr("src", "heartTick.png")); }); } n && $("#" + e).append( makeButton( "Edit", "saveDetailsForm(" + a + ",1)", "Edit details and settings for this command." ) + makeButton( "Delete", "deleteCommand(" + a + ")", "Delete this command and all the related information associated with it. This can't be undone." ) ), (1 == $(t).find("allow_comments").text() || $(t).find("commentCount").text() > 0 || n) && ($("#" + e).append( makeButton( "Comments", "getComments(" + a + "," + enableCommentOptions( o, $(t).find("allow_comments").text(), n ) + "," + ce + ")", "Read and write comments about this command." ) + "
" ), $("#comments").hide("")); } function enableCommentOptions(e, t, a) { return a || (e && 1 == t) ? 1 : 0; } function getComments(e, t, a) { $.post( "mcstacker2.php", { op: "getComments", userToken: userToken, commandID: e }, function (o, n) { $("#comments").html(""), $("#comments").show(""), $("comment", o).each(function (t) { (commentID = $(this).find("commentID").text()), (name = "" + $(this).find("username").text() + ""), (commentText = markUp( $(this).find("commentText").text() )), (time = convertTime($(this).find("time").text())), "1" == $(this).find("canDelete").text() ? (admin = '
") : (admin = ""), $("#comments").append( "
" + name + "
" + time + admin + "
" + commentText + "
" ); }), $("#commentControls").html( makeButton( "Hide Comments", "hideComments()", "Hide the comments." ) ), 1 == t && $("#commentControls").append( makeButton( "Post Comment", "makeCommentBox(" + e + ")", "Post a comment about this command." ) ), 1 == a && $("#commentControls").append( makeButton( "Delete all comments", "deleteAllComments(" + e + ")", "Delete all comments associated with this command. This can't be undone." ) ), $("#commentControls").show(); } ); } function deleteComment(e, t) { alertify.confirm( "Are you sure you want to delete this comment? This action can not be undone.", function (a) { a && $.post( "mcstacker2.php", { op: "deleteComment", userToken: userToken, commandID: e, commentID: t, }, function (e, a) { $("#comment" + t).remove(), alertify.log("Comment Removed"); } ); } ); } function deleteAllComments(e) { alertify.confirm( "Are you sure you want to delete all comments associated with this command? This action can not be undone.", function (t) { t && $.post( "mcstacker2.php", { op: "deleteAllComments", userToken: userToken, commandID: e, }, function (e, t) { $("#comments").hide(), $("#comments").html(""), alertify.log("Comments Removed"); } ); } ); } function makeCommentBox(e) { $("#commentPane").remove(), $("#commentControls").append("
"), $("#commentControls").show(), $("#commentPane").append( "
" + makeTextArea( "newComment", "", 2500, "Write a comment for this command." ) + "
" + makeButton( "Post", "postComment(" + e + ")", "Write a comment for this command." ) ); } function hideComments() { $("#comments").hide(), $("#commentControls").hide(); } function postComment(e) { $.post( "mcstacker2.php", { op: "postComment", userToken: userToken, commandID: e, commentText: $("#newComment").val(), }, function (t, a) { $("comment", t).each(function (t) { var a = $(this).find("commentID").text(), o = "" + $(this).find("username").text() + "", n = markUp($(this).find("commentText").text()), s = convertTime($(this).find("time").text()); $("#comments").append( "
" + o + "
" + s + '
" + n + "
" ), $("#commentPane").remove(), $("#comments").show(), $("#comments").animate( { scrollTop: $("#comments")[0].scrollHeight - $("#comments").height(), }, 1e3, function () {} ); }); } ); } function convertTime(e) { var t = parse_date(e), a = new Date(), o = -1 * a.getTimezoneOffset(), n = new Date(t.getTime() + 60 * o * 1e3), i = n.getDate(), r = n.getMonth(), l = n.getFullYear(), c = n.getHours(), d = n.getMinutes(); return a - n > 31536e6 ? monthNames[r] + " " + l : a - n > 864e5 ? monthNames[r] + " " + i : (c < 12 ? ((s = "am"), 0 == c && (c = 12)) : (c > 12 && (c -= 12), (s = "pm")), d < 10 && (d = "0" + d), c + ":" + d + " " + s); } function parse_date(e) { var t = new Date(), a = String(e).split(/[- :]/); return ( t.setFullYear(a[0]), t.setMonth(a[1] - 1), t.setDate(a[2]), t.setHours(a[3]), t.setMinutes(a[4]), t.setSeconds(a[5]), t.setMilliseconds(0), t ); } function makeShareLink(e, t) { var a = t || ""; return ( -1 != document.URL.indexOf("#") ? ((baseURL = document.URL.substr(0, document.URL.indexOf("#"))), (url = baseURL + a + "#!" + e)) : (url = document.URL + a + "#!" + e), "URL:" + url + "" ); } function likeCommand(e, t, a) { $.post( "mcstacker2.php", { op: "like", userToken: userToken, commandID: e, like: t }, function (t, o) { "getCommandDetailsSuccess" == $(t).find("action").text() && showDetailsReadOnly("detailsPane", t, e, !0, 1 == a, !1); } ); } function rankCommand(e, t) { $.post( "mcstacker2.php", { op: "vote", userToken: userToken, commandID: e, vote: t }, function (e, t) { $("#heartCount").html($(e).find("votes").text()); } ); } function searchDerivatives(e) { showSearch(), $("#commandTypeSearch").val("Any"), $("#searchWhat").val(5), $("#searchString").val(e), doSearch("title", "a", 0); } function deleteCommand(e) { alertify.confirm( "You are about to permanently delete this command and it's associated content. Click OK to permanently delete this command.", function (t) { t && $.post( "mcstacker2.php", { op: "deleteCommand", userToken: userToken, commandID: e, sortField: sortField, sortOrder: sortOrder, rowIndex: gRowIndex, }, function (e, t) { showCommands(e, gRowIndex); } ); } ); } function replaceAll(e, t, a) { return a.replace( new RegExp(e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"), "g"), t ); } function markUp(e) { return (e = replaceAll( "\n", "
", (e = replaceAll( "[/title]", "", (e = replaceAll( "[title]", "'>", (e = replaceAll( "[/link]", "", (e = replaceAll( "[link]", "
"), createComponent( "lootTableContainer", "ltType", { label: "Loot Table Type", type: "makeSelect", values: [ "unset", "empty", "entity", "block", "chest", "fishing", "advancement_reward", "generic", ], cssClass: "fLabel100", tip: "lt.type", }, 0 ), createComponent( "lootTableContainer", "ltUseSetNBT", { label: "NBT Mode", type: "makeSelect", values: ["use other functions", "use set_nbt only"], cssClass: "fLabel100", tip: "lt.nbtMode", }, 0 ), $("#lootTableContainer").append( "
Add Pool
" ), $("#hideLootTable").bind("click", function () { $("#lootTableContainer").hide(); }), $("#addPool").bind("click", function () { addPool(); }); } function generateLootTable() { let e = {}; "unset" != $("#ltType0").val() && (e.type = $("#ltType0").val()), (e.pools = []); var t = {}; return ( $("#lootTablePane > .pool").each(function (a) { e.pools.push({}); let o = e.pools.length - 1, n = this.id, s = ["rolls", "bonus_rolls"]; for (let t = 0; t < s.length; t++) if ($("#" + n + s[t] + "0").val().length) { let a = $("#" + n + s[t] + "0").val(); -1 != a.indexOf("-") ? ((a = a.split("-")), (e.pools[o][s[t]] = { min: parseInt(a[0]), max: parseInt(a[1]), })) : (e.pools[o][s[t]] = parseInt(a)); } else "rolls" == s[t] && (e.pools[o][s[t]] = 1); e.pools[o].entries = []; let i = 0; $("#entryPane" + n + " > .entry").each(function (a) { let n = this.id, s = parseInt($("#" + n + "Weight0").val()) || 1; e.pools[o].entries.push({ type: "item", weight: s }), (t[n] = s), (i += s); let r = e.pools[o].entries.length - 1; $("#" + n + "Quality0").val().length && (e.pools[o].entries[r].quality = parseInt( $("#" + n + "Quality0").val() )); let l = []; if ("-1" != $("#" + n + "Item0").val()) { (e.pools[o].entries[r].name = "minecraft:" + $("#" + n + "Item0").val()), l.push({ function: "set_count", count: lootTableRange(n + "Item0Count"), }); try { let e; (e = "use other functions" == $("#ltUseSetNBT0").val() ? getNBTForLootTableItem(n + "Item0") : "{" + (e = getItemTagNBT(n + "Item0", !1)).substr( 1 ) + "}").length > 2 && l.push({ function: "set_nbt", tag: e }); } catch (e) {} if ("use other functions" == $("#ltUseSetNBT0").val()) { 0 != $("#" + n + "Item0Damage").length && $("#" + n + "Item0Damage").val().length && l.push({ function: "set_damage", damage: lootTableRangeFloat(n + "Item0Damage"), }); let e = tellrawJson.getJsonForLootTableItemName( n + "Item0ItemName" ); (e.length > 0 || void 0 != e.text) && l.push({ function: "set_name", name: e }); let t = tellrawJson.getJsonLoreForLootTables( n + "Item0Lore" ); t.length > 0 && l.push({ function: "set_lore", lore: t }); } e.pools[o].entries[r].functions = l; } else e.pools[o].entries[r].type = "empty"; }), $("#entryPane" + n + " > .entry").each(function (e) { let a = this.id; $("#" + a + "WeightPercent0").html( parseInt((t[a] / i) * 100) + "%" ); }); }), removeUnsetFromJSON(JSON.stringify(e)) ); } function getItemAttributeModifiersForLootTable(e) { let t = []; return ( $("#" + e + "AMtable .amRow").each(function () { let e = {}; var a = this.id.substr(0, this.id.lastIndexOf("_")); if ($("#" + a + "_amount").val().length) { var o = $("#" + a + "_mods").val(); switch ( ((e.attribute = "generic." + o), parseInt($("#" + a + "_operation").val())) ) { case 0: e.operation = "addition"; break; case 1: e.operation = "multiply_base"; break; case 2: e.operation = "multiply_total"; } (e.amount = $("#" + a + "_amount").val()), "Any" != $("#" + a + "_slot").val() && (e.slot = $("#" + a + "_slot").val()), t.push(e); } }), t ); } function lootTableRange(e) { let t = 1; try { if ($("#" + e).val().length) { let a = $("#" + e).val(); -1 != a.indexOf("-") ? ((a = a.split("-")), (t = { min: parseInt(a[0]), max: parseInt(a[1]) })) : (t = parseInt(a)); } } catch (e) {} return t; } function lootTableRangeFloat(e) { let t = 1; try { if ($("#" + e).val().length) { let a = $("#" + e).val(); -1 != a.indexOf("-") ? ((a = a.split("-")), (t = { min: parseFloat(a[0]), max: parseFloat(a[1]) })) : (t = parseFloat(a)); } } catch (e) {} return t; } function lootTableRangeRaw(e) { let t = 1; try { if ($("#" + e).val().length) { let a = $("#" + e).val(); t = -1 != a.indexOf("-") ? { min: (a = a.split("-"))[0], max: a[1] } : a; } } catch (e) {} return t; } function getItemDisplayForLootTableNBT(e) { var t = ""; return ( isLeatherArmor($("#" + e).val()) && (t += getColorInteger(e + "Color", "color")), t.length > 0 ? ",display:{" + t.substr(1) + "}" : t ); } function importLootTable(e) { $("#disableOutput").prop("checked", !0), e.hasOwnProperty("type") && $("#ltType0").val(e.type); for (let t = 0; t < e.pools.length; t++) { let a = addPool(), o = e.pools[t]; "rolls" in o && (o.rolls.hasOwnProperty("min") && o.rolls.hasOwnProperty("max") ? $("#" + a + "rolls0").val(o.rolls.min + "-" + o.rolls.max) : $("#" + a + "rolls0").val(o.rolls)), "bonus_rolls" in o && (o.bonus_rolls.hasOwnProperty("min") && o.bonus_rolls.hasOwnProperty("max") ? $("#" + a + "bonus_rolls0").val( o.bonus_rolls.min + "-" + o.bonus_rolls.max ) : $("#" + a + "bonus_rolls0").val(o.bonus_rolls)); for (let e = 0; e < o.entries.length; e++) { $("#" + a + "_entry_" + e).length || addEntry(a); let t = a + "_entry_" + e, n = o.entries[e]; if ( (n.hasOwnProperty("weight") && $("#" + t + "Weight0").val(n.weight), n.hasOwnProperty("quality") && $("#" + t + "Quality0").val(n.quality), n.hasOwnProperty("name") && ($("#" + t + "Item0").val(extractMinecraftID(n.name)), $("#" + t + "Item0").trigger("change")), n.hasOwnProperty("functions")) ) for (let e = 0; e < n.functions.length; e++) { let a = n.functions[e]; if ("set_count" == a.function) a.count.hasOwnProperty("min") && a.count.hasOwnProperty("max") ? $("#" + t + "Item0Count").val( a.count.min + "-" + a.count.max ) : $("#" + t + "Item0Count").val(a.count); else if ("set_damage" == a.function) a.damage.hasOwnProperty("min") && a.damage.hasOwnProperty("max") ? $("#" + t + "Item0Damage").val( a.damage.min + "-" + a.damage.max ) : $("#" + t + "Item0Damage").val(a.damage); else if ("set_name" == a.function) importTellrawJSON(t + "Item0ItemName", a.name), showHide( t + "Item0ItemName", t + "Item0ItemNameSH" ); else if ("set_lore" == a.function) loadLoreFromNBT(t + "Item0Lore", a.lore, !0), showHide(t + "Item0Lore", t + "Item0LoreSH"); else if ("set_nbt" == a.function) { new CMDParser("").parseLootTableNBT( t + "Item0", extractMinecraftID(n.name), a.tag ); } } } } $("#disableOutput").prop("checked", !1), generateCommand(); } function getNBTForLootTableItem(e) { var t = getCanPlaceOnOrDestroy(e, "CanPlaceOn"); (t += getCanPlaceOnOrDestroy(e, "CanDestroy")), (t += getItemDisplayForLootTableNBT(e)); for (var a = 0, o = 1, n = 0; n < flags.length; n++) $("#" + e + "HF" + flags[n]).is(":checked") && (a += o), (o *= 2); return ( 0 != a && (t += ",HideFlags:" + a), 0 != $("#" + e + "RepairCost").length && $("#" + e + "RepairCost").val().length && (t += ",RepairCost:" + $("#" + e + "RepairCost").val()), 0 != $("#" + e + "Unbreakable").length && -1 != $("#" + e + "Unbreakable").val() && (t += ",Unbreakable:" + $("#" + e + "Unbreakable").val() + "b"), 0 != $("#" + e + "CustomModelData").length && $("#" + e + "CustomModelData").val().length && (t += ",CustomModelData:" + $("#" + e + "CustomModelData").val()), 0 != $("#" + e + "CustomTags").length && $("#" + e + "CustomTags").val().length && (t += "," + $("#" + e + "CustomTags").val()), (t += getEnchantments(e, "Enchantments")), (t += getItemAttributeModifiers(e)), (t += getItemSpecificNBT(e)), (t += getItemBlockStates(e)).length && (t = "{" + t.substr(1) + "}"), t ); } function addPool() { let e = 0; for (; $("#pool" + e).length; ) e++; let t = "pool" + e; return ( $("#lootTablePane").append( "
" ), createComponent( t, t + "rolls", { label: "Rolls", type: "text", cssClass: "fLabel100", tip: "lt.rolls", }, 0 ), createComponent( t, t + "bonus_rolls", { label: "Bonus Rolls", type: "text", cssClass: "fLabel100", tip: "lt.bonus_rolls", }, 0 ), $("#" + t).append( "
Add Entry
" ), $("#addEntry" + t).bind("click", function () { addEntry(t); }), $("#addEntry" + t).trigger("click"), t ); } function addEntry(e) { let t = 0; for (; $("#" + e + "_entry_" + t).length; ) t++; let a = e + "_entry_" + t; $("#entryPane" + e).append( "
" ), createComponent( a, a + "Weight", { label: "Weight", type: "text", cssClass: "fLabel100", tip: "lt.weight", }, 0 ), $("").insertAfter( "#" + a + "Weight0" ), createComponent( a, a + "Quality", { label: "Quality", type: "text", cssClass: "fLabel100", tip: "lt.quality", }, 0 ), createComponent( a, a + "Item", { label: "Item", type: "itemselect", cssClass: "fLabel100", tip: "lt.item", forceConstruct: !0, }, 0 ); } function updateLootTable() {} function updateLootTableBindings() { $(".updateLootTable").bind("click keyup", function () {}); } (String.prototype.htmlEscape = function () { return $("
").text(this.toString()).html(); }), (window.onpopstate = function (e) { try { var t = e.state.id; showDetails(t, !1); } catch (e) {} }); //Crypto stuff for auth. doesnt work anyways var MD5=function(r){function n(r,n){return r<>>32-n}function t(r,n){var t,o,e,u,f;return e=2147483648&r,u=2147483648&n,f=(1073741823&r)+(1073741823&n),(t=1073741824&r)&(o=1073741824&n)?2147483648^f^e^u:t|o?1073741824&f?3221225472^f^e^u:1073741824^f^e^u:f^e^u}function o(r,o,e,u,f,a,i){return t(n(r=t(r,t(t(o&e|~o&u,f),i)),a),o)}function e(r,o,e,u,f,a,i){return t(n(r=t(r,t(t(o&u|e&~u,f),i)),a),o)}function u(r,o,e,u,f,a,i){return t(n(r=t(r,t(t(o^e^u,f),i)),a),o)}function f(r,o,e,u,f,a,i){return t(n(r=t(r,t(t(e^(o|~u),f),i)),a),o)}function a(r){var n,t="",o="";for(n=0;n<=3;n++)t+=(o="0"+(r>>>8*n&255).toString(16)).substr(o.length-2,2);return t}var i,C,c,g,h,d,v,S,m,l=Array();for(l=function(r){for(var n,t=r.length,o=t+8,e=16*((o-o%64)/64+1),u=Array(e-1),f=0,a=0;a>>29,u}(r=function(r){r=r.replace(/\r\n/g,"\n");for(var n="",t=0;t127&&o<2048?(n+=String.fromCharCode(o>>6|192),n+=String.fromCharCode(63&o|128)):(n+=String.fromCharCode(o>>12|224),n+=String.fromCharCode(o>>6&63|128),n+=String.fromCharCode(63&o|128))}return n}(r)),d=1732584193,v=4023233417,S=2562383102,m=271733878,i=0;i