diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml new file mode 100644 index 0000000..0b491fe --- /dev/null +++ b/.github/workflows/format-check.yml @@ -0,0 +1,27 @@ +name: JSON Format Check + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + format-check: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Check JSON formatting + run: npm run format:check diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..504afef --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +package-lock.json diff --git a/README.md b/README.md index 19133af..2fa66a4 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,20 @@ FlintBenchmark is freely available for other FOSS projects to use for testing an Feel free to integrate these tests into your development workflow, CI/CD pipeline, or use them as a reference for expected vanilla behavior. +## JSON Formatting +All test JSON files are formatted using [FracturedJson](https://github.com/j-brooke/FracturedJson), which produces human-readable yet compact output. Small arrays and objects are inlined, while larger ones are expanded for readability. + +To format all JSON files: +```bash +npm install +npm run format +``` + +To check formatting (used in CI): +```bash +npm run format:check +``` + ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. This means you are free to use, modify, and distribute the tests in this repository for any purpose, including developing and testing your own server implementations. diff --git a/package.json b/package.json new file mode 100644 index 0000000..26768d4 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "name": "flintbenchmark", + "version": "1.0.0", + "description": "Benchmark repository for testing Minecraft server implementations", + "scripts": { + "format": "node scripts/format-json.js", + "format:check": "node scripts/format-json.js --check" + }, + "devDependencies": { + "fracturedjsonjs": "^4.0.0" + }, + "license": "MIT" +} diff --git a/scripts/format-json.js b/scripts/format-json.js new file mode 100644 index 0000000..7ec0583 --- /dev/null +++ b/scripts/format-json.js @@ -0,0 +1,130 @@ +#!/usr/bin/env node + +/** + * JSON Formatter for FlintBenchmark + * Uses FracturedJson to produce human-readable, compact JSON output. + * Small arrays/objects are inlined, larger ones are expanded. + * + * Usage: + * node scripts/format-json.js # Format all JSON files in tests/ + * node scripts/format-json.js --check # Check if files are formatted (for CI) + */ + +const fs = require('fs'); +const path = require('path'); +const { Formatter } = require('fracturedjsonjs'); + +const TESTS_DIR = path.join(__dirname, '..', 'tests'); + +// FracturedJson configuration for optimal readability +const formatter = new Formatter(); +formatter.MaxTotalLineLength = 100; // Max line length before wrapping +formatter.MaxInlineLength = 60; // Max length for inline arrays/objects +formatter.MaxInlineComplexity = 2; // Max nesting for inline elements +formatter.MaxCompactArrayComplexity = 1; // Compact simple arrays +formatter.NestedBracketPadding = false; // No extra spaces in nested brackets +formatter.SimpleBracketPadding = true; // Spaces in simple brackets like [1, 2, 3] +formatter.ColonPadding = true; // Space after colons +formatter.CommaPadding = true; // Space after commas +formatter.IndentSpaces = 2; // 2-space indentation +formatter.PreferMultipleItemsPerLine = true; // Multiple items per line when possible +formatter.TableObjectMinimumSimilarity = 0.5; // Align similar objects in tables +formatter.TableArrayMinimumSimilarity = 0.5; // Align similar arrays in tables + +/** + * Find all JSON files recursively in a directory + */ +function findJsonFiles(dir) { + const files = []; + const entries = fs.readdirSync(dir, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(dir, entry.name); + if (entry.isDirectory()) { + files.push(...findJsonFiles(fullPath)); + } else if (entry.isFile() && entry.name.endsWith('.json')) { + files.push(fullPath); + } + } + + return files; +} + +/** + * Format a single JSON file + * Returns true if file was modified (or would be modified in check mode) + */ +function formatFile(filePath, checkOnly = false) { + const content = fs.readFileSync(filePath, 'utf8'); + + let parsed; + try { + parsed = JSON.parse(content); + } catch (e) { + console.error(`❌ Invalid JSON: ${filePath}`); + console.error(` ${e.message}`); + return { error: true, changed: false }; + } + + const formatted = formatter.Serialize(parsed) + '\n'; + + if (content === formatted) { + return { error: false, changed: false }; + } + + if (checkOnly) { + return { error: false, changed: true }; + } + + fs.writeFileSync(filePath, formatted, 'utf8'); + return { error: false, changed: true }; +} + +// Main execution +const args = process.argv.slice(2); +const checkOnly = args.includes('--check'); + +console.log(checkOnly ? '🔍 Checking JSON formatting...' : '✨ Formatting JSON files...'); +console.log(); + +const jsonFiles = findJsonFiles(TESTS_DIR); +let hasErrors = false; +let changedCount = 0; + +for (const file of jsonFiles) { + const relativePath = path.relative(path.join(__dirname, '..'), file); + const result = formatFile(file, checkOnly); + + if (result.error) { + hasErrors = true; + } else if (result.changed) { + changedCount++; + if (checkOnly) { + console.log(`❌ ${relativePath} (needs formatting)`); + } else { + console.log(`✅ ${relativePath}`); + } + } +} + +console.log(); + +if (hasErrors) { + console.log('❌ Some files contain invalid JSON'); + process.exit(1); +} + +if (checkOnly) { + if (changedCount > 0) { + console.log(`❌ ${changedCount} file(s) need formatting. Run 'npm run format' to fix.`); + process.exit(1); + } else { + console.log(`✅ All ${jsonFiles.length} JSON files are properly formatted.`); + } +} else { + if (changedCount > 0) { + console.log(`✅ Formatted ${changedCount} file(s).`); + } else { + console.log(`✅ All ${jsonFiles.length} JSON files were already formatted.`); + } +} diff --git a/tests/fluids/mixing.json b/tests/fluids/mixing.json index 8443856..7411eff 100644 --- a/tests/fluids/mixing.json +++ b/tests/fluids/mixing.json @@ -1,66 +1,56 @@ { - "name": "water_mixing_with_lava", - "description": "Water converts lava source to obsidian", - "tags": ["interaction", "lava"], + "name": "water_mixing_with_lava", + "description": "Water converts lava source to obsidian", + "tags": ["interaction", "lava"], "setup": { "cleanup": { - "region": [[0, 0, 0], [6, 5, 4]] + "region": [ [0, 0, 0], [6, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [6, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - {"pos": [0, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [1, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [2, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [3, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [4, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [5, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [1, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [2, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [3, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [4, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [5, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 1], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 2], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 3], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 1], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 2], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 3], "block": {"id": "minecraft:stone"}} + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 3], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [4, 1, 2], "block": {"id": "minecraft:lava", "level": 0} }, + { "at": 3, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 2, "do": "place", "pos": [4, 1, 2], "block": {"id": "minecraft:lava", "level": 0} }, + { "at": 3, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [4, 1, 2], - "block": {"id": "minecraft:lava", "level": 0} - }, - { - "at": 3, - "do": "place", - "pos": [2, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 8, - "do": "assert", + "at": 8, + "do": "assert", "checks": [ - { - "pos": [4, 1, 2], - "is": {"id": "minecraft:obsidian"} - } + { "pos": [4, 1, 2], "is": {"id": "minecraft:obsidian"} } ] } ] } + diff --git a/tests/fluids/water/corner_flow.json b/tests/fluids/water/corner_flow.json index 77772ec..870d782 100644 --- a/tests/fluids/water/corner_flow.json +++ b/tests/fluids/water/corner_flow.json @@ -1,106 +1,79 @@ { - "name": "water_corner_flow", - "description": "Water flows around corners properly", - "tags": ["corner", "flow"], + "name": "water_corner_flow", + "description": "Water flows around corners properly", + "tags": ["corner", "flow"], "setup": { "cleanup": { - "region": [[0, 0, 0], [8, 5, 8]] + "region": [ [0, 0, 0], [8, 5, 8] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [8, 0, 8]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 8] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - {"pos": [0, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [1, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [2, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [3, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [4, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [5, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [7, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 0], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [1, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [2, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [3, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [4, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [5, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [6, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [7, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 8], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 1], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 2], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 3], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 5], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 6], "block": {"id": "minecraft:stone"}}, - {"pos": [0, 1, 7], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 1], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 2], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 3], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 4], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 5], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 6], "block": {"id": "minecraft:stone"}}, - {"pos": [8, 1, 7], "block": {"id": "minecraft:stone"}} + { "pos": [0, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [7, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 0], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [7, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 5], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [0, 1, 7], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 5], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 7], "block": {"id": "minecraft:stone"} } ] - }, + }, { - "at": 2, - "do": "place_each", + "at": 2, + "do": "place_each", "blocks": [ - { - "pos": [4, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 4], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 5], - "block": {"id": "minecraft:stone"} - } + { "pos": [4, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 5], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 3, "do": "place", "pos": [2, 1, 6], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 3, "do": "place", "pos": [2, 1, 6], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 3, - "do": "place", - "pos": [2, 1, 6], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 50, - "do": "assert", + "at": 50, + "do": "assert", "checks": [ - { - "pos": [3, 1, 6], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 6], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 4], - "is": {"id": "minecraft:water"} - } + { "pos": [3, 1, 6], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 6], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 4], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/downward_flow.json b/tests/fluids/water/downward_flow.json index 0434eb4..1b40ac1 100644 --- a/tests/fluids/water/downward_flow.json +++ b/tests/fluids/water/downward_flow.json @@ -1,48 +1,27 @@ { - "name": "water_basic_downward_flow", - "description": "Water flows downward when placed above air", - "tags": ["basic", "flow", "gravity"], + "name": "water_basic_downward_flow", + "description": "Water flows downward when placed above air", + "tags": ["basic", "flow", "gravity"], "setup": { "cleanup": { - "region": [[0, 0, 0], [4, 10, 4]] + "region": [ [0, 0, 0], [4, 10, 4] ] } - }, + }, "timeline": [ + { "at": 0, "do": "place", "pos": [2, 5, 2], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 0, "do": "place", "pos": [2, 5, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 0, - "do": "place", - "pos": [2, 5, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 25, - "do": "assert", + "at": 25, + "do": "assert", "checks": [ - { - "pos": [2, 5, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 4, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 3, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 2, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 0, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 5, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 4, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 3, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 2, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 0, 2], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/downward_priority.json b/tests/fluids/water/downward_priority.json index d2953e1..712a7f4 100644 --- a/tests/fluids/water/downward_priority.json +++ b/tests/fluids/water/downward_priority.json @@ -1,68 +1,41 @@ { - "name": "water_downward_priority", - "description": "Water prioritizes flowing down over horizontal spread", - "tags": ["priority", "flow"], + "name": "water_downward_priority", + "description": "Water prioritizes flowing down over horizontal spread", + "tags": ["priority", "flow"], "setup": { "cleanup": { - "region": [[0, 0, 0], [6, 10, 6]] + "region": [ [0, 0, 0], [6, 10, 6] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [6, 0, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [1, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [2, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [5, 1, 3], - "block": {"id": "minecraft:stone"} - } + { "pos": [1, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 3], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [3, 5, 3], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 2, "do": "place", "pos": [3, 5, 3], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [3, 5, 3], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 22, - "do": "assert", + "at": 22, + "do": "assert", "checks": [ - { - "pos": [3, 1, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 2, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 3, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 4, 3], - "is": {"id": "minecraft:water"} - } + { "pos": [3, 1, 3], "is": {"id": "minecraft:water"} }, + { "pos": [3, 2, 3], "is": {"id": "minecraft:water"} }, + { "pos": [3, 3, 3], "is": {"id": "minecraft:water"} }, + { "pos": [3, 4, 3], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/falling_state.json b/tests/fluids/water/falling_state.json index e7ca8c3..3d950f9 100644 --- a/tests/fluids/water/falling_state.json +++ b/tests/fluids/water/falling_state.json @@ -1,58 +1,51 @@ { - "name": "water_falling_state", - "description": "Water sets falling=true when flowing downward", - "tags": ["state", "falling"], + "name": "water_falling_state", + "description": "Water sets falling=true when flowing downward", + "tags": ["state", "falling"], "setup": { "cleanup": { - "region": [[0, 0, 0], [4, 10, 4]] + "region": [ [0, 0, 0], [4, 10, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [4, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [4, 6, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 6, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [4, 6, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [4, 6, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 6, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 6, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[4, 1, 0], [4, 6, 4]], + "at": 0, + "do": "fill", + "region": [ [4, 1, 0], [4, 6, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [2, 5, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [2, 5, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 15, - "do": "assert", + "at": 15, + "do": "assert", "checks": [ - { - "pos": [2, 4, 2], - "is": {"id": "minecraft:water", "level": 8} - } + { "pos": [2, 4, 2], "is": {"id": "minecraft:water", "level": 8} } ] } ] } + diff --git a/tests/fluids/water/flowing_state.json b/tests/fluids/water/flowing_state.json index a8424a2..2c01d96 100644 --- a/tests/fluids/water/flowing_state.json +++ b/tests/fluids/water/flowing_state.json @@ -1,58 +1,51 @@ { - "name": "water_flowing_state", - "description": "Water has correct flowing state when not at source level", - "tags": ["state", "flow"], + "name": "water_flowing_state", + "description": "Water has correct flowing state when not at source level", + "tags": ["state", "flow"], "setup": { "cleanup": { - "region": [[0, 0, 0], [6, 5, 4]] + "region": [ [0, 0, 0], [6, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [6, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [6, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [6, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[6, 1, 0], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [6, 1, 0], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [3, 2, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [3, 2, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 30, - "do": "assert", + "at": 30, + "do": "assert", "checks": [ - { - "pos": [3, 1, 2], - "is": {"id": "minecraft:water", "level": "8"} - } + { "pos": [3, 1, 2], "is": {"id": "minecraft:water", "level": "8"} } ] } ] } + diff --git a/tests/fluids/water/horizontal_spread.json b/tests/fluids/water/horizontal_spread.json index b94dc23..0f51053 100644 --- a/tests/fluids/water/horizontal_spread.json +++ b/tests/fluids/water/horizontal_spread.json @@ -1,90 +1,59 @@ { - "name": "water_horizontal_spread", - "description": "Water spreads horizontally up to 4 blocks from source", - "tags": ["basic", "flow", "horizontal"], + "name": "water_horizontal_spread", + "description": "Water spreads horizontally up to 4 blocks from source", + "tags": ["basic", "flow", "horizontal"], "setup": { "cleanup": { - "region": [[0, 0, 0], [10, 5, 10]] + "region": [ [0, 0, 0], [10, 5, 10] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [10, 0, 10]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [10, 0, 10] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [10, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [10, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 10], [10, 2, 10]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 10], [10, 2, 10] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 10]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 10] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[10, 1, 0], [10, 2, 10]], + "at": 0, + "do": "fill", + "region": [ [10, 1, 0], [10, 2, 10] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [5, 1, 5], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [5, 1, 5], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 30, - "do": "assert", + "at": 30, + "do": "assert", "checks": [ - { - "pos": [5, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [6, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [7, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [8, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [9, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [4, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [1, 1, 5], - "is": {"id": "minecraft:water"} - } + { "pos": [5, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [6, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [7, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [8, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [9, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [4, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [3, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [1, 1, 5], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/infinite_source.json b/tests/fluids/water/infinite_source.json index afbd35c..d19e5f0 100644 --- a/tests/fluids/water/infinite_source.json +++ b/tests/fluids/water/infinite_source.json @@ -1,76 +1,65 @@ { - "name": "water_infinite_source_creation", - "description": "Two source blocks create infinite source when diagonally adjacent", - "tags": ["infinite", "source"], + "name": "water_infinite_source_creation", + "description": "Two source blocks create infinite source when diagonally adjacent", + "tags": ["infinite", "source"], "setup": { "cleanup": { - "region": [[0, 0, 0], [4, 5, 4]] + "region": [ [0, 0, 0], [4, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [4, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [4, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [4, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [4, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[4, 1, 0], [4, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [4, 1, 0], [4, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "pos": [3, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - } + { "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:water", "level": 0} } ] - }, + }, { - "at": 20, - "do": "assert", + "at": 20, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} } ] - }, + }, { - "at": 21, - "do": "assert", + "at": 21, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water", "level": "0"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water", "level": "0"} } ] } ] } + diff --git a/tests/fluids/water/level_decrease.json b/tests/fluids/water/level_decrease.json index 46fc28e..e2c937b 100644 --- a/tests/fluids/water/level_decrease.json +++ b/tests/fluids/water/level_decrease.json @@ -1,74 +1,55 @@ { - "name": "water_level_decrease", - "description": "Water level decreases by 1 per block horizontally", - "tags": ["level", "flow"], + "name": "water_level_decrease", + "description": "Water level decreases by 1 per block horizontally", + "tags": ["level", "flow"], "setup": { "cleanup": { - "region": [[0, 0, 0], [8, 5, 4]] + "region": [ [0, 0, 0], [8, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [8, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [8, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [8, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[8, 1, 0], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [8, 1, 0], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 30, - "do": "assert", + "at": 30, + "do": "assert", "checks": [ - { - "pos": [1, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [4, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [1, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 2], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/max_spread_distance.json b/tests/fluids/water/max_spread_distance.json index 295e515..29c41d3 100644 --- a/tests/fluids/water/max_spread_distance.json +++ b/tests/fluids/water/max_spread_distance.json @@ -1,68 +1,58 @@ { - "name": "water_max_spread_distance", - "description": "Water spreads exactly 7 blocks from source on flat surface", - "tags": ["distance", "limit"], + "name": "water_max_spread_distance", + "description": "Water spreads exactly 7 blocks from source on flat surface", + "tags": ["distance", "limit"], "setup": { "cleanup": { - "region": [[0, 0, 0], [14, 5, 4]] + "region": [ [0, 0, 0], [14, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [14, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [14, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [14, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [14, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [14, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [14, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[14, 1, 0], [14, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [14, 1, 0], [14, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[1, 1, 0], [1, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [1, 1, 0], [1, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [2, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 40, - "do": "assert", + "at": 40, + "do": "assert", "checks": [ - { - "pos": [9, 1, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [10, 1, 2], - "is": {"id": "minecraft:air"} - } + { "pos": [ 9, 1, 2], "is": {"id": "minecraft:water"} }, + { "pos": [10, 1, 2], "is": {"id": "minecraft:air" } } ] } ] } + diff --git a/tests/fluids/water/pool_formation.json b/tests/fluids/water/pool_formation.json index e685a38..6448dc8 100644 --- a/tests/fluids/water/pool_formation.json +++ b/tests/fluids/water/pool_formation.json @@ -1,180 +1,69 @@ { - "name": "water_pool_formation", - "description": "Water fills a pool evenly from single source", - "tags": ["pool", "fill"], + "name": "water_pool_formation", + "description": "Water fills a pool evenly from single source", + "tags": ["pool", "fill"], "setup": { "cleanup": { - "region": [[0, 0, 0], [10, 5, 10]] + "region": [ [0, 0, 0], [10, 5, 10] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [10, 0, 10]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [10, 0, 10] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [1, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [2, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [3, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [5, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [6, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [7, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 1], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [2, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [3, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [5, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [6, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [7, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 9], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 4], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 5], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 6], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 7], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 1, 8], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 4], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 5], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 6], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 7], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [9, 1, 8], - "block": {"id": "minecraft:stone"} - } + { "pos": [1, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [7, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 1], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [5, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [6, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [7, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 9], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 5], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 7], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 1, 8], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 4], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 5], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 6], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 7], "block": {"id": "minecraft:stone"} }, + { "pos": [9, 1, 8], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [5, 1, 5], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 2, "do": "place", "pos": [5, 1, 5], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [5, 1, 5], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 60, - "do": "assert", + "at": 60, + "do": "assert", "checks": [ - { - "pos": [3, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [7, 1, 5], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 7], - "is": {"id": "minecraft:water"} - } + { "pos": [3, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [7, 1, 5], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 3], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 7], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/ravine_fill.json b/tests/fluids/water/ravine_fill.json index 27cdbc8..4b6f53b 100644 --- a/tests/fluids/water/ravine_fill.json +++ b/tests/fluids/water/ravine_fill.json @@ -1,112 +1,70 @@ { - "name": "water_ravine_fill", - "description": "Water fills a ravine from top to bottom", - "tags": ["ravine", "fill", "complex"], + "name": "water_ravine_fill", + "description": "Water fills a ravine from top to bottom", + "tags": ["ravine", "fill", "complex"], "setup": { "cleanup": { - "region": [[0, 0, 0], [12, 15, 6]] + "region": [ [0, 0, 0], [12, 15, 6] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [12, 0, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [12, 0, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [12, 7, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [12, 7, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 6], [12, 7, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 6], [12, 7, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 7, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 7, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[12, 1, 0], [12, 7, 6]], + "at": 0, + "do": "fill", + "region": [ [12, 1, 0], [12, 7, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [4, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 2, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 3, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 4, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [4, 5, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 1, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 2, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 3, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 4, 3], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [8, 5, 3], - "block": {"id": "minecraft:stone"} - } + { "pos": [4, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 2, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 3, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 4, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [4, 5, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 1, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 2, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 3, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 4, 3], "block": {"id": "minecraft:stone"} }, + { "pos": [8, 5, 3], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [6, 6, 3], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 2, "do": "place", "pos": [6, 6, 3], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [6, 6, 3], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 60, - "do": "assert", + "at": 60, + "do": "assert", "checks": [ - { - "pos": [6, 1, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 1, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [7, 1, 3], - "is": {"id": "minecraft:water"} - } + { "pos": [6, 1, 3], "is": {"id": "minecraft:water"} }, + { "pos": [5, 1, 3], "is": {"id": "minecraft:water"} }, + { "pos": [7, 1, 3], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/replacement.json b/tests/fluids/water/replacement.json index 29eb3ee..2e3366c 100644 --- a/tests/fluids/water/replacement.json +++ b/tests/fluids/water/replacement.json @@ -1,68 +1,58 @@ { - "name": "water_replacement_behavior", - "description": "Water can replace certain non-solid blocks", - "tags": ["replacement", "block"], + "name": "water_replacement_behavior", + "description": "Water can replace certain non-solid blocks", + "tags": ["replacement", "block"], "setup": { "cleanup": { - "region": [[0, 0, 0], [6, 5, 4]] + "region": [ [0, 0, 0], [6, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [6, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [6, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [6, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[6, 1, 0], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [6, 1, 0], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [2, 1, 2], - "block": {"id": "minecraft:tall_grass"} - } + { "pos": [2, 1, 2], "block": {"id": "minecraft:tall_grass"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 30, - "do": "assert", + "at": 30, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/shortest_path.json b/tests/fluids/water/shortest_path.json index 71ef8f9..ac3fd1f 100644 --- a/tests/fluids/water/shortest_path.json +++ b/tests/fluids/water/shortest_path.json @@ -1,78 +1,60 @@ { - "name": "water_spreading_priority_shortest_path", - "description": "Water takes shortest path to lower ground", - "tags": ["pathfinding", "priority"], + "name": "water_spreading_priority_shortest_path", + "description": "Water takes shortest path to lower ground", + "tags": ["pathfinding", "priority"], "setup": { "cleanup": { - "region": [[0, 0, 0], [14, 8, 6]] + "region": [ [0, 0, 0], [14, 8, 6] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 3, 0], [14, 3, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 3, 0], [14, 3, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 4, 0], [14, 5, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 4, 0], [14, 5, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 4, 6], [14, 5, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 4, 6], [14, 5, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 4, 0], [0, 5, 6]], + "at": 0, + "do": "fill", + "region": [ [0, 4, 0], [0, 5, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[14, 4, 0], [14, 5, 6]], + "at": 0, + "do": "fill", + "region": [ [14, 4, 0], [14, 5, 6] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "fill", - "region": [[0, 0, 0], [14, 0, 6]], + "at": 1, + "do": "fill", + "region": [ [0, 0, 0], [14, 0, 6] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 2, "do": "place", "pos": [7, 4, 3], "block": {"id": "minecraft:water", "level": 0} }, + { "at": 3, "do": "remove", "pos": [9, 3, 3] }, + { "at": 4, "do": "remove", "pos": [5, 3, 3] }, { - "at": 2, - "do": "place", - "pos": [7, 4, 3], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 3, - "do": "remove", - "pos": [9, 3, 3] - }, - { - "at": 4, - "do": "remove", - "pos": [5, 3, 3] - }, - { - "at": 50, - "do": "assert", + "at": 50, + "do": "assert", "checks": [ - { - "pos": [9, 2, 3], - "is": {"id": "minecraft:water"} - }, - { - "pos": [5, 2, 3], - "is": {"id": "minecraft:water"} - } + { "pos": [9, 2, 3], "is": {"id": "minecraft:water"} }, + { "pos": [5, 2, 3], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/source_removal.json b/tests/fluids/water/source_removal.json index 743b1a6..acc5e5d 100644 --- a/tests/fluids/water/source_removal.json +++ b/tests/fluids/water/source_removal.json @@ -1,97 +1,65 @@ { - "name": "water_source_removal", - "description": "Flowing water disappears when source is removed", - "tags": ["source", "removal"], + "name": "water_source_removal", + "description": "Flowing water disappears when source is removed", + "tags": ["source", "removal"], "setup": { "cleanup": { - "region": [[0, 0, 0], [8, 5, 4]] + "region": [ [0, 0, 0], [8, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [8, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [8, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [8, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[8, 1, 0], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [8, 1, 0], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 30, - "do": "assert", + "at": 30, + "do": "assert", "checks": [ - { - "pos": [4, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [4, 1, 2], "is": {"id": "minecraft:water"} } ] - }, - { - "at": 31, - "do": "remove", - "pos": [1, 1, 2] - }, + }, + { "at": 31, "do": "remove", "pos": [1, 1, 2] }, { - "at": 80, - "do": "assert", + "at": 80, + "do": "assert", "checks": [ - { - "pos": [1, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [3, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [4, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [5, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [6, 1, 2], - "is": {"id": "minecraft:air"} - }, - { - "pos": [7, 1, 2], - "is": {"id": "minecraft:air"} - } + { "pos": [1, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [2, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [4, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [5, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [6, 1, 2], "is": {"id": "minecraft:air"} }, + { "pos": [7, 1, 2], "is": {"id": "minecraft:air"} } ] } ] } + diff --git a/tests/fluids/water/stability.json b/tests/fluids/water/stability.json index ae220c0..d9f5a0f 100644 --- a/tests/fluids/water/stability.json +++ b/tests/fluids/water/stability.json @@ -1,58 +1,51 @@ { - "name": "water_tick_rate_consistency", - "description": "Water updates consistently with 5-tick rate", - "tags": ["timing", "tick"], + "name": "water_tick_rate_consistency", + "description": "Water updates consistently with 5-tick rate", + "tags": ["timing", "tick"], "setup": { "cleanup": { - "region": [[0, 0, 0], [8, 5, 4]] + "region": [ [0, 0, 0], [8, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [8, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [8, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [8, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[8, 1, 0], [8, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [8, 1, 0], [8, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 10, - "do": "assert", + "at": 10, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/stair_flow.json b/tests/fluids/water/stair_flow.json index d708d3f..adf3a8d 100644 --- a/tests/fluids/water/stair_flow.json +++ b/tests/fluids/water/stair_flow.json @@ -1,80 +1,61 @@ { - "name": "water_stair_flow", - "description": "Water flows down stairs correctly", - "tags": ["stairs", "flow"], + "name": "water_stair_flow", + "description": "Water flows down stairs correctly", + "tags": ["stairs", "flow"], "setup": { "cleanup": { - "region": [[0, 0, 0], [8, 8, 4]] + "region": [ [0, 0, 0], [8, 8, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [8, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [8, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [8, 4, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [8, 4, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [8, 4, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [8, 4, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 4, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 4, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[8, 1, 0], [8, 4, 4]], + "at": 0, + "do": "fill", + "region": [ [8, 1, 0], [8, 4, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "place_each", + "at": 0, + "do": "place_each", "blocks": [ - { - "pos": [1, 1, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [1, 2, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [2, 1, 2], - "block": {"id": "minecraft:stone"} - } + { "pos": [1, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [1, 2, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 1, "do": "place", "pos": [1, 3, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [1, 3, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 40, - "do": "assert", + "at": 40, + "do": "assert", "checks": [ - { - "pos": [2, 2, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [3, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 2, 2], "is": {"id": "minecraft:water"} }, + { "pos": [3, 1, 2], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/three_source_infinite.json b/tests/fluids/water/three_source_infinite.json index bdc4c5a..5980339 100644 --- a/tests/fluids/water/three_source_infinite.json +++ b/tests/fluids/water/three_source_infinite.json @@ -1,85 +1,67 @@ { - "name": "water_three_source_infinite", - "description": "Three adjacent source blocks create stable infinite sources", - "tags": ["infinite", "source", "stable"], + "name": "water_three_source_infinite", + "description": "Three adjacent source blocks create stable infinite sources", + "tags": ["infinite", "source", "stable"], "setup": { "cleanup": { - "region": [[0, 0, 0], [6, 5, 4]] + "region": [ [0, 0, 0], [6, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [6, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [6, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [6, 2, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [6, 2, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[6, 1, 0], [6, 2, 4]], + "at": 0, + "do": "fill", + "region": [ [6, 1, 0], [6, 2, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [1, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "pos": [2, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "pos": [3, 1, 2], - "block": {"id": "minecraft:water", "level": 0} - } + { "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [2, 1, 2], "block": {"id": "minecraft:water", "level": 0} }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:water", "level": 0} } ] - }, + }, + { "at": 30, "do": "remove", "pos": [2, 1, 2] }, { - "at": 30, - "do": "remove", - "pos": [2, 1, 2] - }, - { - "at": 50, - "do": "assert", + "at": 50, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water"} } ] - }, + }, { - "at": 51, - "do": "assert", + "at": 51, + "do": "assert", "checks": [ - { - "pos": [2, 1, 2], - "is": {"id": "minecraft:water", "level": "0"} - } + { "pos": [2, 1, 2], "is": {"id": "minecraft:water", "level": "0"} } ] } ] } + diff --git a/tests/fluids/water/u_shape.json b/tests/fluids/water/u_shape.json index 6dd3c87..3680ee9 100644 --- a/tests/fluids/water/u_shape.json +++ b/tests/fluids/water/u_shape.json @@ -1,72 +1,59 @@ { - "name": "water_u_shape_flow", - "description": "Water flows around obstacles in U-shaped channel", - "tags": ["pathfinding", "complex"], + "name": "water_u_shape_flow", + "description": "Water flows around obstacles in U-shaped channel", + "tags": ["pathfinding", "complex"], "setup": { "cleanup": { - "region": [[0, 0, 0], [4, 5, 4]] + "region": [ [0, 0, 0], [4, 5, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [4, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [4, 1, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 1, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [4, 1, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [4, 1, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 1, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 1, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[4, 1, 0], [4, 1, 4]], + "at": 0, + "do": "fill", + "region": [ [4, 1, 0], [4, 1, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 1, - "do": "place_each", + "at": 1, + "do": "place_each", "blocks": [ - { - "pos": [2, 1, 2], - "block": {"id": "minecraft:stone"} - }, - { - "pos": [3, 1, 2], - "block": {"id": "minecraft:stone"} - } + { "pos": [2, 1, 2], "block": {"id": "minecraft:stone"} }, + { "pos": [3, 1, 2], "block": {"id": "minecraft:stone"} } ] - }, + }, + { "at": 2, "do": "place", "pos": [1, 1, 1], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 2, - "do": "place", - "pos": [1, 1, 1], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 60, - "do": "assert", + "at": 60, + "do": "assert", "checks": [ - { - "pos": [3, 1, 3], - "is": {"id": "minecraft:water"} - } + { "pos": [3, 1, 3], "is": {"id": "minecraft:water"} } ] } ] } + diff --git a/tests/fluids/water/vertical_column.json b/tests/fluids/water/vertical_column.json index e6c3c60..ecfd02e 100644 --- a/tests/fluids/water/vertical_column.json +++ b/tests/fluids/water/vertical_column.json @@ -1,66 +1,53 @@ { - "name": "water_vertical_column", - "description": "Water creates continuous vertical column when falling", - "tags": ["vertical", "falling"], + "name": "water_vertical_column", + "description": "Water creates continuous vertical column when falling", + "tags": ["vertical", "falling"], "setup": { "cleanup": { - "region": [[0, 0, 0], [4, 20, 4]] + "region": [ [0, 0, 0], [4, 20, 4] ] } - }, + }, "timeline": [ { - "at": 0, - "do": "fill", - "region": [[0, 0, 0], [4, 0, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 0, 0], [4, 0, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [4, 16, 0]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [4, 16, 0] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 4], [4, 16, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 4], [4, 16, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[0, 1, 0], [0, 16, 4]], + "at": 0, + "do": "fill", + "region": [ [0, 1, 0], [0, 16, 4] ], "with": {"id": "minecraft:stone"} - }, + }, { - "at": 0, - "do": "fill", - "region": [[4, 1, 0], [4, 16, 4]], + "at": 0, + "do": "fill", + "region": [ [4, 1, 0], [4, 16, 4] ], "with": {"id": "minecraft:stone"} - }, + }, + { "at": 1, "do": "place", "pos": [2, 15, 2], "block": {"id": "minecraft:water", "level": 0} }, { - "at": 1, - "do": "place", - "pos": [2, 15, 2], - "block": {"id": "minecraft:water", "level": 0} - }, - { - "at": 41, - "do": "assert", + "at": 41, + "do": "assert", "checks": [ - { - "pos": [2, 15, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 10, 2], - "is": {"id": "minecraft:water"} - }, - { - "pos": [2, 7, 2], - "is": {"id": "minecraft:water"} - } + { "pos": [2, 15, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 10, 2], "is": {"id": "minecraft:water"} }, + { "pos": [2, 7, 2], "is": {"id": "minecraft:water"} } ] } ] } +