diff --git a/data/pc/common/features.json b/data/pc/common/features.json index 69fca68b3..1bf25b8cc 100644 --- a/data/pc/common/features.json +++ b/data/pc/common/features.json @@ -289,14 +289,6 @@ "description": "dimension is an nbt compound", "versions": ["1.16.2", "latest"] }, - { - "name": "dimensionDataIsAvailable", - "description": "dimensionData is available, describing additional dimension information", - "versions": [ - "1.17", - "latest" - ] - }, { "name": "doesntHaveChestType", "description": "chests don't have a type property", diff --git a/tools/js/test/test.js b/tools/js/test/test.js index 26dfae889..fe75d24f0 100644 --- a/tools/js/test/test.js +++ b/tools/js/test/test.js @@ -57,4 +57,21 @@ minecraftTypes.forEach(function (type) { }) }) }) + describe('features.json quality is good', function () { + it('there is no duplicate feature in features.json', () => { + const features = require('../../../data/' + type + '/common/features.json') + const countPerFeature = {} + for (const feature of features) { + countPerFeature[feature.name] = countPerFeature[feature.name] ? countPerFeature[feature.name] + 1 : 1 + } + let duplicateCount = 0 + for (const [name, count] of Object.entries(countPerFeature)) { + if (count > 1) { + console.log(`feature ${name} is duplicated ${count} times, please remove ${count - 1}`) + duplicateCount += 1 + } + } + assert.equal(duplicateCount, 0, `${duplicateCount} duplicates found. Please remove them.`) + }) + }) })