mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Update worldgen to RC-1
This commit is contained in:
28
js/view.js
28
js/view.js
@@ -1,8 +1,6 @@
|
||||
|
||||
const themes = ["light", "dark"];
|
||||
|
||||
let preventDuplicateDimensionType;
|
||||
|
||||
themes.forEach(v => $('#themeList').append(`<a class="dropdown-item" onclick="changeTheme('${v}')" data-i18n="theme.${v}"></a>`));
|
||||
|
||||
addListener(updateView);
|
||||
@@ -42,7 +40,6 @@ function generateSourceAndView(data, struct) {
|
||||
$('#structure').attr('data-index', 'pools');
|
||||
return generateTable(data, struct);
|
||||
} else {
|
||||
preventDuplicateDimensionType = [false, false, false, false];
|
||||
let {out: sourceOut, component: $component} = generateObject(data, struct);
|
||||
$component.removeClass('mt-3');
|
||||
return {out: sourceOut, component: $component};
|
||||
@@ -208,28 +205,7 @@ function generateEnum(data, struct) {
|
||||
if (struct.help) {
|
||||
$el.append(generateTooltip(struct.translateValue + '.' + data.replace(/.*:/, '')));
|
||||
}
|
||||
let out = data;
|
||||
if (struct.translate === 'dimension.type') {
|
||||
const i = struct.values.indexOf(data)
|
||||
if (i > 0) {
|
||||
if (preventDuplicateDimensionType[i]) {
|
||||
data = 'minecraft:default';
|
||||
} else {
|
||||
preventDuplicateDimensionType[i] = true;
|
||||
}
|
||||
}
|
||||
if (data === 'minecraft:default') {
|
||||
out = {
|
||||
"ultrawarm": false,
|
||||
"natural": true,
|
||||
"shrunk": false,
|
||||
"ambient_light": 0,
|
||||
"has_skylight": true,
|
||||
"has_ceiling": false
|
||||
};
|
||||
}
|
||||
}
|
||||
return {out: out, component: $el};
|
||||
return {out: data, component: $el};
|
||||
}
|
||||
|
||||
function generateSet(data, struct) {
|
||||
@@ -287,7 +263,7 @@ function generateMap(data, struct) {
|
||||
$header.append('<button type="button" class="btn btn-danger mb-2 float-right" onclick="removeFromMap(this)" data-i18n="' + struct.translate + '_remove"></button>');
|
||||
$item.prepend($header);
|
||||
} else {
|
||||
$item.addClass("ml-3");
|
||||
$item.addClass("pl-3");
|
||||
$item.append('<div class="input-group-append"><button class="btn btn-outline-danger bg-light" type="button" onclick="removeFromMap(this)" data-i18n="remove"></button></div>');
|
||||
}
|
||||
out[field.id] = outValue;
|
||||
|
||||
@@ -168,15 +168,21 @@
|
||||
"dimension.overworld": "Overworld",
|
||||
"dimension.the_end": "The End",
|
||||
"dimension.the_nether": "The Nether",
|
||||
"dimension.type": "Dimension Options",
|
||||
"dimension.type": "Dimension Type",
|
||||
"dimension.type.name": "Name",
|
||||
"dimension.type.ultrawarm": "Ultrawarm",
|
||||
"dimension.type.natural": "Natural",
|
||||
"dimension.type.shrunk": "Shrunk",
|
||||
"dimension.type.piglin_safe": "Piglin Safe",
|
||||
"dimension.type.respawn_anchor_works": "Respawn Anchor Works",
|
||||
"dimension.type.bed_works": "Bed Works",
|
||||
"dimension.type.has_raids": "Has Raids",
|
||||
"dimension.type.ambient_light": "Ambient Light",
|
||||
"dimension.type.fixed_time": "Fixed Time",
|
||||
"dimension.type.has_skylight": "Has Skylight",
|
||||
"dimension.type.has_ceiling": "Has Ceiling",
|
||||
"dimension.type.presets.default": "Default",
|
||||
"dimension.type.logical_height": "Logical Height",
|
||||
"dimension.type.infiniburn": "Infiniburn",
|
||||
"dimension.type.presets.overworld": "Overworld",
|
||||
"dimension.type.presets.the_nether": "The Nether",
|
||||
"dimension.type.presets.the_end": "The End",
|
||||
@@ -396,8 +402,10 @@
|
||||
"help.condition.chances": "List of floats between 0 and 1 separated by commas",
|
||||
"help.condition.time_period": "If present, time will be modulo-divided by this value. For example, if set to 24000, value will operate on a time period of days.",
|
||||
"help.dimension": "The identifier used for \"/execute in\". Must be all lowercase.",
|
||||
"help.dimension.type": "Global options for the dimension. Click on the label to customize.",
|
||||
"help.dimension.type.name": "Internal dimension type name. Set this to the dimension ID.",
|
||||
"help.dimension.type.ultrawarm": "If true, water will evaporate and sponges will dry",
|
||||
"help.dimension.type.natural": "If true, piglins will shake and portals will spawn zombified pigmen. If false, compasses will spin and beds will explode.",
|
||||
"help.dimension.type.natural": "If true, portals will spawn zombified pigmen. If false, compasses will spin.",
|
||||
"help.dimension.type.shrunk": "Whether coordinates should be scaled down by a factor of 8",
|
||||
"help.dimension.type.ambient_light": "Value between 0 and 1",
|
||||
"help.dimension.type.fixed_time": "Setting this value will keep the sun in a fixed position",
|
||||
@@ -411,6 +419,7 @@
|
||||
"help.entry.type.loot_table": "Adds the contents of another loot table",
|
||||
"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.generator.settings": "Terrain settings. Click on the label to customize.",
|
||||
"help.generator.settings.bedrock_roof_position": "Relative position of the bedrock roof starting at the world height. Higher numbers move the roof down.",
|
||||
"help.generator.settings.bedrock_floor_position": "Position of the bedrock floor. Higher numbers move the floor up.",
|
||||
"help.generator.settings.disable_mob_generation": "If true, mobs will not spawn during generation",
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
"type": "enum",
|
||||
"help": true,
|
||||
"filter": true,
|
||||
"default": "minecraft:multi_noise",
|
||||
"default": "minecraft:fixed",
|
||||
"values": [
|
||||
"minecraft:fixed",
|
||||
"minecraft:multi_noise",
|
||||
@@ -204,6 +204,7 @@
|
||||
"type": "object",
|
||||
"color": "dark",
|
||||
"collapse": true,
|
||||
"help": true,
|
||||
"default": "minecraft:overworld",
|
||||
"values": [
|
||||
"minecraft:overworld",
|
||||
@@ -273,7 +274,9 @@
|
||||
"color": "dark",
|
||||
"default": {
|
||||
"Name": "minecraft:water",
|
||||
"Properties": {}
|
||||
"Properties": {
|
||||
"level": "0"
|
||||
}
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
@@ -298,7 +301,6 @@
|
||||
"id": "noise",
|
||||
"translate": "generator.settings.noise",
|
||||
"type": "object",
|
||||
"collapse": true,
|
||||
"color": "dark",
|
||||
"fields": [
|
||||
{
|
||||
@@ -529,14 +531,20 @@
|
||||
"type": "object",
|
||||
"color": "dark",
|
||||
"collapse": true,
|
||||
"default": "minecraft:default",
|
||||
"default": "minecraft:overworld",
|
||||
"help": true,
|
||||
"values": [
|
||||
"minecraft:default",
|
||||
"minecraft:overworld",
|
||||
"minecraft:the_nether",
|
||||
"minecraft:the_end"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"id": "name",
|
||||
"translate": "dimension.type.name",
|
||||
"type": "string",
|
||||
"help": true
|
||||
},
|
||||
{
|
||||
"id": "ultrawarm",
|
||||
"translate": "dimension.type.ultrawarm",
|
||||
@@ -558,6 +566,42 @@
|
||||
"default": false,
|
||||
"help": true
|
||||
},
|
||||
{
|
||||
"id": "piglin_safe",
|
||||
"translate": "dimension.type.piglin_safe",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"id": "respawn_anchor_works",
|
||||
"translate": "dimension.type.respawn_anchor_works",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"id": "bed_works",
|
||||
"translate": "dimension.type.bed_works",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"id": "has_raids",
|
||||
"translate": "dimension.type.has_raids",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"id": "has_skylight",
|
||||
"translate": "dimension.type.has_skylight",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"id": "has_ceiling",
|
||||
"translate": "dimension.type.has_ceiling",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
{
|
||||
"id": "ambient_light",
|
||||
"translate": "dimension.type.ambient_light",
|
||||
@@ -572,16 +616,16 @@
|
||||
"help": true
|
||||
},
|
||||
{
|
||||
"id": "has_skylight",
|
||||
"translate": "dimension.type.has_skylight",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"id": "logical_height",
|
||||
"translate": "dimension.type.logical_height",
|
||||
"type": "int",
|
||||
"default": 256
|
||||
},
|
||||
{
|
||||
"id": "has_ceiling",
|
||||
"translate": "dimension.type.has_ceiling",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
"id": "infiniburn",
|
||||
"translate": "dimension.type.infiniburn",
|
||||
"type": "string",
|
||||
"default": "minecraft:infiniburn_overworld"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user