Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cache/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"hash": 12464441102537979377,
"index": {
"complex": [
"tests/fluids/water/u_shape.json"
],
"pathfinding": [
"tests/fluids/water/u_shape.json"
]
}
}
70 changes: 70 additions & 0 deletions tests/fluids/flowing_lava_meets_water.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "flowing_lava_meets_water_cobblestone",
"description": "Flowing lava (not source) that touches water becomes cobblestone. In shouldSpreadLiquid, non-source lava adjacent to water converts to cobblestone.",
"tags": ["interaction", "lava", "water", "cobblestone"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [8, 3, 4] ]
}
},
"timeline": [
{
"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] ],
"with": {"id": "minecraft:stone"}
},
{
"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] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [8, 1, 0], [8, 2, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [4, 1, 1], [4, 2, 3] ],
"with": {"id": "minecraft:stone"}
},
{ "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:lava", "level": 0} },
{ "at": 60, "do": "place", "pos": [4, 1, 2], "block": {"id": "minecraft:air"} },
{ "at": 60, "do": "place", "pos": [4, 2, 2], "block": {"id": "minecraft:air"} },
{ "at": 61, "do": "place", "pos": [7, 1, 2], "block": {"id": "minecraft:water", "level": 0} },
{
"at": 62,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:lava" } },
{ "pos": [1, 1, 2], "is": {"id": "minecraft:lava", "level": "0"} }
]
},
{
"at": 100,
"do": "assert",
"checks": [
{ "pos": [3, 1, 2], "is": {"id": "minecraft:cobblestone"} }
]
}
]
}

54 changes: 54 additions & 0 deletions tests/fluids/lava_flows_down_onto_water.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "lava_flows_down_onto_water_stone",
"description": "Lava flowing downward onto water creates stone at the water position. In LavaFluid.spreadTo, when direction is DOWN and target has water in a LiquidBlock, the water position becomes stone.",
"tags": ["interaction", "lava", "water", "stone"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [4, 5, 4] ]
}
},
"timeline": [
{
"at": 0,
"do": "fill",
"region": [ [0, 0, 0], [4, 0, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [4, 4, 0] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 4], [4, 4, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [0, 4, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [4, 1, 0], [4, 4, 4] ],
"with": {"id": "minecraft:stone"}
},
{ "at": 1, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:water", "level": 0} },
{ "at": 2, "do": "place", "pos": [2, 3, 2], "block": {"id": "minecraft:lava", "level": 0} },
{
"at": 80,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:stone"} }
]
}
]
}

31 changes: 31 additions & 0 deletions tests/fluids/lava_soul_soil_blue_ice_basalt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "lava_over_soul_soil_with_blue_ice_basalt",
"description": "Lava placed above soul_soil and adjacent to blue_ice converts to basalt. In shouldSpreadLiquid, lava over soul_soil touching blue_ice becomes basalt.",
"tags": ["interaction", "lava", "basalt", "soul_soil", "blue_ice"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [4, 3, 4] ]
}
},
"timeline": [
{
"at": 0,
"do": "fill",
"region": [ [0, 0, 0], [4, 0, 4] ],
"with": {"id": "minecraft:stone"}
},
{ "at": 0, "do": "place", "pos": [2, 0, 2], "block": {"id": "minecraft:soul_soil"} },
{ "at": 0, "do": "place", "pos": [3, 1, 2], "block": {"id": "minecraft:blue_ice"} },
{ "at": 1, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:lava", "level": 0} },
{
"at": 5,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:basalt"} }
]
}
]
}

54 changes: 54 additions & 0 deletions tests/fluids/lava_source_meets_water_obsidian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "lava_source_meets_water_obsidian",
"description": "Lava source block touching water converts to obsidian. In shouldSpreadLiquid, source lava adjacent to water becomes obsidian.",
"tags": ["interaction", "lava", "water", "obsidian"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [4, 3, 4] ]
}
},
"timeline": [
{
"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] ],
"with": {"id": "minecraft:stone"}
},
{
"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] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [4, 1, 0], [4, 2, 4] ],
"with": {"id": "minecraft:stone"}
},
{ "at": 1, "do": "place", "pos": [2, 1, 2], "block": {"id": "minecraft:lava", "level": 0} },
{ "at": 2, "do": "place", "pos": [2, 1, 1], "block": {"id": "minecraft:water", "level": 0} },
{
"at": 10,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:obsidian"} }
]
}
]
}

96 changes: 96 additions & 0 deletions tests/fluids/water/blocked_by_door.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "water_blocked_by_closed_door",
"description": "Water cannot flow through a closed door because DoorBlock is not a LiquidBlockContainer and is explicitly excluded in canHoldAnyFluid",
"tags": ["blocking", "door"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [6, 4, 4] ]
}
},
"timeline": [
{
"at": 0,
"do": "fill",
"region": [ [0, 0, 0], [6, 0, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [6, 3, 0] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 4], [6, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [0, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [6, 1, 0], [6, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [3, 1, 1], [3, 1, 3] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [3, 2, 1], [3, 2, 3] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "place_each",
"blocks": [
{
"pos": [3, 1, 2],
"block": {
"id" : "minecraft:oak_door",
"half" : "lower" ,
"facing" : "east" ,
"hinge" : "left" ,
"open" : "false" ,
"powered": "false"
}
},
{
"pos": [3, 2, 2],
"block": {
"id" : "minecraft:oak_door",
"half" : "upper" ,
"facing" : "east" ,
"hinge" : "left" ,
"open" : "false" ,
"powered": "false"
}
}
]
},
{ "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} },
{
"at": 40,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:water" } },
{ "pos": [3, 1, 2], "is": {"id": "minecraft:oak_door"} },
{ "pos": [4, 1, 2], "is": {"id": "minecraft:air" } },
{ "pos": [5, 1, 2], "is": {"id": "minecraft:air" } }
]
}
]
}

62 changes: 62 additions & 0 deletions tests/fluids/water/blocked_by_structure_void.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"name": "water_blocked_by_structure_void",
"description": "Water cannot flow through structure_void blocks because they are explicitly excluded in canHoldAnyFluid even though they do not block motion",
"tags": ["blocking", "structure_void"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [0, 0, 0], [6, 4, 4] ]
}
},
"timeline": [
{
"at": 0,
"do": "fill",
"region": [ [0, 0, 0], [6, 0, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [6, 3, 0] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 4], [6, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [0, 1, 0], [0, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [6, 1, 0], [6, 3, 4] ],
"with": {"id": "minecraft:stone"}
},
{
"at": 0,
"do": "fill",
"region": [ [3, 1, 1], [3, 1, 3] ],
"with": {"id": "minecraft:structure_void"}
},
{ "at": 1, "do": "place", "pos": [1, 1, 2], "block": {"id": "minecraft:water", "level": 0} },
{
"at": 40,
"do": "assert",
"checks": [
{ "pos": [2, 1, 2], "is": {"id": "minecraft:water" } },
{ "pos": [3, 1, 2], "is": {"id": "minecraft:structure_void"} },
{ "pos": [4, 1, 2], "is": {"id": "minecraft:air" } },
{ "pos": [5, 1, 2], "is": {"id": "minecraft:air" } }
]
}
]
}

Loading
Loading