diff --git a/index.html b/index.html index f3d1b381..83284f78 100644 --- a/index.html +++ b/index.html @@ -33,7 +33,7 @@ diff --git a/locales/en.json b/locales/en.json index 7c007b44..187aa7f4 100644 --- a/locales/en.json +++ b/locales/en.json @@ -134,9 +134,20 @@ "entity.isSwimming": "Swimming", "entity.location": "Location", "entity.nbt": "NBT", + "entity.player": "Player", + "entity.player.advancements": "Advancements", + "entity.player.advancements_add": "Add Advancement", + "entity.player.advancements_remove": "Remove Advancement", + "entity.player.gamemode": "Game Mode", + "entity.player.level": "Exp Level", + "entity.player.recipes": "Recipes", + "entity.player.recipes_add": "Add Recipe", + "entity.player.recipes_remove": "Remove Recipe", + "entity.player.stats": "Statistics", "entity.status_effect": "Effects", "entity.status_effect_add": "Add Effect", "entity.status_effect_remove": "Remove Effect", + "entity.team": "Team", "entity.type": "Entity", "entry.expand": "Expand", "entry.name": "Name", @@ -217,6 +228,10 @@ "help.entry.type.sequence": "Executes child entries until the first one that can't run due to conditions", "help.entry.type.tag": "Adds the contents of an item tag", "help.pool.rolls": "The amount of entries that are randomly chosen", + "gamemode.adventure": "Adventure", + "gamemode.creative": "Creative", + "gamemode.spectator": "Spectator", + "gamemode.survival": "Survival", "hide_source": "Hide Source", "item.count": "Count", "item.durability": "Durability", @@ -243,7 +258,7 @@ "location.fluid.state_remove": "Remove Fluid State", "location.fluid.tag": "Fluid Tag", "location.light": "Light", - "location.light.light": "Visible Level", + "location.light.light": "Visible Light Level", "location.position": "Position", "location.position.x": "X", "location.position.y": "Y", @@ -286,6 +301,22 @@ "source.killer": "Killer", "source.killer_player": "Killer Player", "source.this": "This", + "statistic.stat": "Statistic", + "statistic.type": "Type", + "statistic.type.broken": "Broken", + "statistic.type.crafted": "Crafted", + "statistic.type.custom": "Custom", + "statistic.type.dropped": "Dropped", + "statistic.type.killed": "Killed", + "statistic.type.killed_by": "Killed By", + "statistic.type.killedByTeam": "Killed By Team", + "statistic.type.mined": "Mined", + "statistic.type.picked_up": "Picked Up", + "statistic.type.teamkill": "Killed Team", + "statistic.type.used": "Used", + "statistic.value": "Value", + "statistic_add": "Add Statistic", + "statistic_remove": "Remove Statistic", "status_effect.ambient": "Ambient", "status_effect.amplifier": "Amplifier", "status_effect.duration": "Duration", diff --git a/locales/zh-CN.json b/locales/zh-CN.json index cc4d4f90..cef36698 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -140,9 +140,20 @@ "entity.isSwimming": "正在游泳", "entity.location": "位置", "entity.nbt": "NBT", + "entity.player": "玩家", + "entity.player.advancements": "进度", + "entity.player.advancements_add": "添加进度", + "entity.player.advancements_remove": "移除进度", + "entity.player.gamemode": "游戏模式", + "entity.player.level": "经验等级", + "entity.player.recipes": "配方", + "entity.player.recipes_add": "添加配方", + "entity.player.recipes_remove": "移除配方", + "entity.player.stats": "统计", "entity.status_effect": "状态效果", "entity.status_effect_add": "添加状态效果", "entity.status_effect_remove": "移除状态效果", + "entity.team": "队伍", "entity.type": "实体", "entry.expand": "展开", "entry.name": "名称", @@ -213,6 +224,10 @@ "function.zoom": "缩放等级", "function_add": "添加函数", "function_remove": "移除函数", + "gamemode.adventure": "冒险模式", + "gamemode.creative": "创造模式", + "gamemode.spectator": "旁观者模式", + "gamemode.survival": "生存模式", "hide_source": "隐藏源代码", "item.count": "数量", "item.durability": "耐久度", @@ -284,6 +299,22 @@ "source.killer": "击杀者", "source.killer_player": "击杀者玩家", "source.this": "自身", + "statistic.stat": "统计", + "statistic.type": "类型", + "statistic.type.broken": "用坏", + "statistic.type.crafted": "合成", + "statistic.type.custom": "Custom(其他)", + "statistic.type.dropped": "掉落", + "statistic.type.killed": "击杀", + "statistic.type.killedByTeam": "被队伍击杀", + "statistic.type.killed_by": "被击杀", + "statistic.type.mined": "挖掘", + "statistic.type.picked_up": "捡起", + "statistic.type.teamkill": "击杀队伍", + "statistic.type.used": "使用", + "statistic.value": "值", + "statistic_add": "添加统计", + "statistic_remove": "移除统计", "status_effect.ambient": "是否为信标施加", "status_effect.amplifier": "等级", "status_effect.duration": "持续时间", diff --git a/schemas/1.15.json b/schemas/1.15.json index cb512856..1bf8aea9 100644 --- a/schemas/1.15.json +++ b/schemas/1.15.json @@ -828,6 +828,11 @@ "type": "nbt", "translate": "entity.nbt" }, + { + "id": "team", + "type": "string", + "translate": "entity.team" + }, { "id": "location", "type": "object", @@ -933,6 +938,56 @@ } ] }, + { + "id": "player", + "type": "object", + "translate": "entity.player", + "color": "dark", + "collapse": true, + "fields": [ + { + "id": "level", + "type": "range", + "translate": "entity.player.level" + }, + { + "id": "gamemode", + "type": "enum", + "translate": "entity.player.gamemode", + "translateValue": "gamemode", + "unset": true, + "values": [ + "adventure", + "creative", + "spectator", + "survival" + ] + }, + { + "id": "advancements", + "type": "map", + "translate": "entity.player.advancements", + "values": { + "type": "boolean" + } + }, + { + "id": "recipes", + "type": "map", + "translate": "entity.player.recipes", + "values": { + "type": "boolean" + } + }, + { + "id": "stats", + "type": "array", + "button": "field", + "translate": "statistic", + "values": "statistic" + } + ] + }, { "id": "effects", "type": "map", @@ -1279,6 +1334,43 @@ "value": "entity" } ] + }, + { + "id": "statistic", + "type": "object", + "color": "dark", + "fields": [ + { + "id": "type", + "type": "enum", + "translate": "statistic.type", + "translateValue": "statistic.type", + "default": "minecraft:custom", + "values": [ + "minecraft:broken", + "minecraft:crafted", + "minecraft:custom", + "minecraft:dropped", + "minecraft:killed", + "minecraft:killed_by", + "minecraft:mined", + "minecraft:picked_up", + "minecraft:used", + "killedByTeam", + "teamkill" + ] + }, + { + "id": "stat", + "type": "string", + "translate": "statistic.stat" + }, + { + "id": "value", + "type": "range", + "translate": "statistic.value" + } + ] } ], "collections": { diff --git a/view.js b/view.js index 6b892c2e..e6a7cf10 100644 --- a/view.js +++ b/view.js @@ -10,7 +10,7 @@ function changeVersion(version) { structure = json.root; } else if (json.roots) { let id = window.location.pathname.replace(/\/$/, '').replace(/^\//, ''); - structure = json.roots.find(e => e.id === id); + structure = json.roots.find(e => e.id === id) || json.roots[0] ; } components = json.components; collections = json.collections;