From 12d693d31eba79622735ac99ab759e90feee41a4 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 3 Feb 2022 20:26:40 +0000 Subject: [PATCH] Added max version IDs to schema info this allows us to limit which upgrade schemas get applied to any given blockstate. This isn't ideal because they did not bump the blockstate version IDs every time they made a change, which means that some schemas will always be getting applied unnecessarily, which is pretty annoying. --- .../mapping_schema_0001_1.13.0_to_1.14.0.json | 6 ++++- .../mapping_schema_0011_1.14.0_to_1.16.0.json | 6 ++++- ...ing_schema_0012_1.16.0_beta_to_1.16.0.json | 4 ++++ ...apping_schema_0021_1.16.0_to_1.16.100.json | 6 ++++- ...ping_schema_0031_1.16.200_to_1.16.210.json | 6 ++++- ...apping_schema_0041_1.17.10_to_1.17.30.json | 6 ++++- ...apping_schema_0051_1.17.30_to_1.17.40.json | 6 ++++- ...mapping_schema_0061_1.18.0_to_1.18.10.json | 6 ++++- upgrade_schema/mapping_schema_schema.json | 22 +++++++++++++++++++ 9 files changed, 61 insertions(+), 7 deletions(-) diff --git a/upgrade_schema/mapping_schema_0001_1.13.0_to_1.14.0.json b/upgrade_schema/mapping_schema_0001_1.13.0_to_1.14.0.json index df512c0..f363e31 100644 --- a/upgrade_schema/mapping_schema_0001_1.13.0_to_1.14.0.json +++ b/upgrade_schema/mapping_schema_0001_1.13.0_to_1.14.0.json @@ -1,7 +1,11 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 15, + "maxVersionPatch": 0, + "maxVersionRevision": 0, "renamedProperties": { "minecraft:kelp": { "age": "kelp_age" } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0011_1.14.0_to_1.16.0.json b/upgrade_schema/mapping_schema_0011_1.14.0_to_1.16.0.json index 7e9d0ad..0ae0fdd 100644 --- a/upgrade_schema/mapping_schema_0011_1.14.0_to_1.16.0.json +++ b/upgrade_schema/mapping_schema_0011_1.14.0_to_1.16.0.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 0, + "maxVersionRevision": 14, "addedProperties": { "minecraft:melon_stem": { "facing_direction": { @@ -41,4 +45,4 @@ } } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0012_1.16.0_beta_to_1.16.0.json b/upgrade_schema/mapping_schema_0012_1.16.0_beta_to_1.16.0.json index d2e8c7e..4f8f00b 100644 --- a/upgrade_schema/mapping_schema_0012_1.16.0_beta_to_1.16.0.json +++ b/upgrade_schema/mapping_schema_0012_1.16.0_beta_to_1.16.0.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 0, + "maxVersionRevision": 14, "renamedIds": { "minecraft:blue_fire": "minecraft:soul_fire", "minecraft:blue_nether_wart_block": "minecraft:warped_wart_block", diff --git a/upgrade_schema/mapping_schema_0021_1.16.0_to_1.16.100.json b/upgrade_schema/mapping_schema_0021_1.16.0_to_1.16.100.json index d47ff0e..df3aefb 100644 --- a/upgrade_schema/mapping_schema_0021_1.16.0_to_1.16.100.json +++ b/upgrade_schema/mapping_schema_0021_1.16.0_to_1.16.100.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 0, + "maxVersionRevision": 16, "renamedProperties": { "minecraft:beehive": { "facing_direction": "direction" @@ -105,4 +109,4 @@ ] } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0031_1.16.200_to_1.16.210.json b/upgrade_schema/mapping_schema_0031_1.16.200_to_1.16.210.json index 07d7f03..988f4a0 100644 --- a/upgrade_schema/mapping_schema_0031_1.16.200_to_1.16.210.json +++ b/upgrade_schema/mapping_schema_0031_1.16.200_to_1.16.210.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 210, + "maxVersionRevision": 3, "removedProperties": { "minecraft:stripped_crimson_hyphae": [ "deprecated" @@ -13,4 +17,4 @@ "deprecated" ] } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0041_1.17.10_to_1.17.30.json b/upgrade_schema/mapping_schema_0041_1.17.10_to_1.17.30.json index 05fd258..7531186 100644 --- a/upgrade_schema/mapping_schema_0041_1.17.10_to_1.17.30.json +++ b/upgrade_schema/mapping_schema_0041_1.17.10_to_1.17.30.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 210, + "maxVersionRevision": 3, "addedProperties": { "minecraft:frame": { "item_frame_photo_bit": { @@ -13,4 +17,4 @@ } } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0051_1.17.30_to_1.17.40.json b/upgrade_schema/mapping_schema_0051_1.17.30_to_1.17.40.json index 8d6d39f..954d5d7 100644 --- a/upgrade_schema/mapping_schema_0051_1.17.30_to_1.17.40.json +++ b/upgrade_schema/mapping_schema_0051_1.17.30_to_1.17.40.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 16, + "maxVersionPatch": 210, + "maxVersionRevision": 3, "addedProperties": { "minecraft:sculk_catalyst": { "bloom": { @@ -7,4 +11,4 @@ } } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_0061_1.18.0_to_1.18.10.json b/upgrade_schema/mapping_schema_0061_1.18.0_to_1.18.10.json index 6b59e7c..cf4556d 100644 --- a/upgrade_schema/mapping_schema_0061_1.18.0_to_1.18.10.json +++ b/upgrade_schema/mapping_schema_0061_1.18.0_to_1.18.10.json @@ -1,4 +1,8 @@ { + "maxVersionMajor": 1, + "maxVersionMinor": 18, + "maxVersionPatch": 10, + "maxVersionRevision": 1, "removedProperties": { "minecraft:skull": [ "no_drop_bit" @@ -974,4 +978,4 @@ ] } } -} \ No newline at end of file +} diff --git a/upgrade_schema/mapping_schema_schema.json b/upgrade_schema/mapping_schema_schema.json index eb53683..ba7b031 100644 --- a/upgrade_schema/mapping_schema_schema.json +++ b/upgrade_schema/mapping_schema_schema.json @@ -15,7 +15,29 @@ }, "type": "object", "additionalProperties": false, + "required": [ + "maxVersionMajor", + "maxVersionMinor", + "maxVersionPatch", + "maxVersionRevision" + ], "properties": { + "maxVersionMajor": { + "type": "integer", + "minValue": 0 + }, + "maxVersionMinor": { + "type": "integer", + "minValue": 0 + }, + "maxVersionPatch": { + "type": "integer", + "minValue": 0 + }, + "maxVersionRevision": { + "type": "integer", + "minValue": 0 + }, "renamedIds": { "type": "object", "additionalProperties": {