Skip to content
Merged
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
42 changes: 42 additions & 0 deletions tests/vegetation/leaves/cherry_leaves_decay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "cherry_leaves_decay",
"description": "With a high random tick speed, non-persistent cherry leaves at distance 7 decay to air, while persistent cherry leaves stay.",
"tags": ["vegetation", "leaves", "cherry", "decay", "random-tick", "block-state"],
"minecraftIds": ["minecraft:cherry_leaves"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [3, 3, 1] ]
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 4096
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [0, 1, 0], "block": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": false} },
{ "pos": [2, 1, 0], "block": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": true } }
]
},
{
"at": 60,
"do": "assert",
"checks": [
{ "pos": [0, 1, 0], "is": {"id": "minecraft:air" } },
{ "pos": [2, 1, 0], "is": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": true} }
]
}
],
"breakpoints": []
}

56 changes: 56 additions & 0 deletions tests/vegetation/leaves/cherry_leaves_placement_and_distance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "cherry_leaves_placement_and_distance",
"description": "Cherry leaves (untinted-particle implementation) behave like other leaves on the server: survival placement is persistent with distance 7, and non-persistent leaves get their distance from an adjacent log.",
"tags": ["vegetation", "leaves", "cherry", "placement", "distance", "block-state", "player"],
"minecraftIds": ["minecraft:cherry_leaves", "minecraft:oak_log", "minecraft:stone"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [6, 3, 1] ]
},
"player": {
"inventory": { "hotbar1": {"id": "minecraft:cherry_leaves", "count": 1} },
"selected_hotbar": 1,
"game_mode": "Survival"
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 0
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [0, 0, 0], "block": {"id": "minecraft:stone" } },
{ "pos": [4, 1, 0], "block": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": false} },
{ "pos": [5, 1, 0], "block": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": false} }
]
},
{ "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] },
{"at": 1, "do": "interact"},
{ "at": 3, "do": "place", "pos": [3, 1, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} },
{
"at": 12,
"do": "assert",
"checks": [
{
"pos": [0, 1, 0],
"is": {"id": "minecraft:cherry_leaves", "distance": 7, "persistent": true, "waterlogged": false}
},
{ "pos": [4, 1, 0], "is": {"id": "minecraft:cherry_leaves", "distance": 1, "persistent": false} },
{ "pos": [5, 1, 0], "is": {"id": "minecraft:cherry_leaves", "distance": 2, "persistent": false} },
{"is": "empty", "slot": "hotbar1"}
]
}
],
"breakpoints": []
}

66 changes: 66 additions & 0 deletions tests/vegetation/leaves/mangrove_leaves_bonemeal_propagule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "mangrove_leaves_bonemeal_propagule",
"description": "Bone meal on mangrove leaves with air below grows a hanging propagule (age 0) there and is consumed; with a solid block below it does nothing and is not consumed.",
"tags": ["vegetation", "leaves", "mangrove", "propagule", "bone-meal", "player"],
"minecraftIds": [
"minecraft:mangrove_leaves" , "minecraft:mangrove_propagule", "minecraft:bone_meal" ,
"minecraft:stone"
],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [5, 3, 1] ]
},
"player": {
"inventory": { "hotbar1": {"id": "minecraft:bone_meal", "count": 2} },
"selected_hotbar": 1,
"game_mode": "Survival"
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 0
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [0, 1, 0], "block": {"id": "minecraft:mangrove_leaves", "persistent": true} },
{ "pos": [4, 1, 0], "block": {"id": "minecraft:mangrove_leaves", "persistent": true} },
{ "pos": [4, 0, 0], "block": {"id": "minecraft:stone" } }
]
},
{ "at": 1, "do": "tp", "entity_alias": "player", "pos": [0.5, 3, 0.5], "rot": [0, 90] },
{"at": 1, "do": "interact"},
{
"at": 3,
"do": "assert",
"checks": [
{ "pos": [0, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} },
{ "pos": [0, 1, 0], "is": {"id": "minecraft:mangrove_leaves", "persistent": true} } ,
{ "is": {"id": "minecraft:bone_meal", "count": 1}, "slot": "hotbar1" }
]
},
{ "at": 4, "do": "tp", "entity_alias": "player", "pos": [4.5, 3, 0.5], "rot": [0, 90] },
{"at": 4, "do": "interact"},
{
"at": 6,
"do": "assert",
"checks": [
{ "pos": [4, 0, 0], "is": {"id": "minecraft:stone"} } ,
{ "pos": [4, 1, 0], "is": {"id": "minecraft:mangrove_leaves", "persistent": true} } ,
{ "pos": [0, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} },
{ "is": {"id": "minecraft:bone_meal", "count": 1}, "slot": "hotbar1" }
]
}
],
"breakpoints": []
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "mangrove_leaves_hanging_propagule_support",
"description": "A hanging propagule stays under mangrove leaves, but breaks when the mangrove leaves are removed or replaced with oak leaves, since only mangrove leaves support hanging propagules.",
"tags": ["vegetation", "leaves", "mangrove", "propagule", "support", "neighbor-update"],
"minecraftIds": ["minecraft:mangrove_leaves", "minecraft:mangrove_propagule", "minecraft:oak_leaves"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [5, 2, 1] ]
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 0
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [0, 1, 0], "block": {"id": "minecraft:mangrove_leaves", "persistent": true} },
{ "pos": [2, 1, 0], "block": {"id": "minecraft:mangrove_leaves", "persistent": true} },
{ "pos": [4, 1, 0], "block": {"id": "minecraft:mangrove_leaves", "persistent": true} },
{ "pos": [0, 0, 0], "block": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} },
{ "pos": [2, 0, 0], "block": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} },
{ "pos": [4, 0, 0], "block": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} }
]
},
{
"at": 3,
"do": "assert",
"checks": [
{ "pos": [0, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true} },
{ "pos": [2, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true} },
{ "pos": [4, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true} }
]
},
{ "at": 4, "do": "remove", "pos": [2, 1, 0] },
{ "at": 4, "do": "place", "pos": [4, 1, 0], "block": {"id": "minecraft:oak_leaves", "persistent": true} },
{
"at": 7,
"do": "assert",
"checks": [
{ "pos": [0, 0, 0], "is": {"id": "minecraft:mangrove_propagule", "hanging": true, "age": 0} },
{ "pos": [2, 0, 0], "is": {"id": "minecraft:air" } },
{ "pos": [4, 0, 0], "is": {"id": "minecraft:air" } }
]
}
],
"breakpoints": []
}

46 changes: 46 additions & 0 deletions tests/vegetation/leaves/oak_leaves_decay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "oak_leaves_decay",
"description": "With a high random tick speed, non-persistent oak leaves at distance 7 decay to air, while persistent leaves and leaves within reach of a log stay.",
"tags": ["vegetation", "leaves", "decay", "random-tick", "block-state"],
"minecraftIds": ["minecraft:oak_leaves", "minecraft:oak_log"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [5, 3, 1] ]
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 4096
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [0, 1, 0], "block": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} },
{ "pos": [2, 1, 0], "block": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": true} },
{ "pos": [4, 1, 0], "block": {"id": "minecraft:oak_leaves", "distance": 1, "persistent": false} },
{ "pos": [5, 1, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} }
]
},
{
"at": 60,
"do": "assert",
"checks": [
{ "pos": [0, 1, 0], "is": {"id": "minecraft:air" } },
{ "pos": [2, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": true } },
{ "pos": [4, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 1, "persistent": false} },
{ "pos": [5, 1, 0], "is": {"id": "minecraft:oak_log" } }
]
}
],
"breakpoints": []
}

54 changes: 54 additions & 0 deletions tests/vegetation/leaves/oak_leaves_distance_adjacency.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",
"flintVersion": "1.0.0",
"name": "oak_leaves_distance_adjacency",
"description": "Leaf distance only follows face adjacency: a diagonal leaf and a leaf behind a stone block stay at 7, while a leaf next to a crimson stem gets distance 1.",
"tags": ["vegetation", "leaves", "distance", "block-state", "neighbor-update"],
"minecraftIds": ["minecraft:oak_leaves", "minecraft:oak_log", "minecraft:crimson_stem", "minecraft:stone"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [10, 3, 2] ]
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 0
}
}
},
"timeline": [
{
"at": 0,
"do": "place_each",
"blocks": [
{ "pos": [1, 2, 1], "block": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} },
{ "pos": [6, 1, 0], "block": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} },
{ "pos": [9, 1, 0], "block": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} },
{ "pos": [5, 1, 0], "block": {"id": "minecraft:stone" } }
]
},
{
"at": 3,
"do": "place_each",
"blocks": [
{ "pos": [0, 1, 0], "block": {"id": "minecraft:oak_log" , "axis": "y"} },
{ "pos": [4, 1, 0], "block": {"id": "minecraft:oak_log" , "axis": "y"} },
{ "pos": [8, 1, 0], "block": {"id": "minecraft:crimson_stem", "axis": "y"} }
]
},
{
"at": 10,
"do": "assert",
"checks": [
{ "pos": [1, 2, 1], "is": {"id": "minecraft:oak_leaves", "distance": 7} },
{ "pos": [6, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7} },
{ "pos": [9, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 1} }
]
}
],
"breakpoints": []
}

58 changes: 58 additions & 0 deletions tests/vegetation/leaves/oak_leaves_distance_propagation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://raw.githubusercontent.com/FlintTestMC/flint-core/refs/heads/main/flint-content/test_spec_schema.json",
"flintVersion": "1.0.0",
"name": "oak_leaves_distance_propagation",
"description": "A log placed at the end of a row of non-persistent oak leaves gives them distance 1 through 7 along the row, and removing the log resets them all to 7.",
"tags": ["vegetation", "leaves", "distance", "block-state", "neighbor-update"],
"minecraftIds": ["minecraft:oak_leaves", "minecraft:oak_log"],
"dependencies": [],
"setup": {
"cleanup": {
"region": [ [-1, 0, -1], [9, 2, 1] ]
},
"world": {
"gamerules": {
"minecraft:spawn_mobs": false,
"minecraft:advance_time": false,
"minecraft:advance_weather": false,
"minecraft:random_tick_speed": 0
}
}
},
"timeline": [
{
"at": 0,
"do": "fill",
"region": [ [1, 1, 0], [8, 1, 0] ],
"with": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false}
},
{ "at": 3, "do": "place", "pos": [0, 1, 0], "block": {"id": "minecraft:oak_log", "axis": "y"} },
{
"at": 20,
"do": "assert",
"checks": [
{ "pos": [1, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 1, "persistent": false} },
{ "pos": [2, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 2, "persistent": false} },
{ "pos": [3, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 3, "persistent": false} },
{ "pos": [4, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 4, "persistent": false} },
{ "pos": [5, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 5, "persistent": false} },
{ "pos": [6, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 6, "persistent": false} },
{ "pos": [7, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} },
{ "pos": [8, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7, "persistent": false} }
]
},
{ "at": 21, "do": "remove", "pos": [0, 1, 0] },
{
"at": 40,
"do": "assert",
"checks": [
{ "pos": [1, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7} },
{ "pos": [2, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7} },
{ "pos": [4, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7} },
{ "pos": [7, 1, 0], "is": {"id": "minecraft:oak_leaves", "distance": 7} }
]
}
],
"breakpoints": []
}

Loading
Loading