Feature/jest2 (#322)

* Adding more tests
* adding jest
* fixing tests
* fixing linting
* removing 1 slash less
* fixing more tests
* fixing last test
* more last fixes
This commit is contained in:
Daan Verstraten
2024-11-09 10:08:30 +01:00
committed by GitHub
parent b788f118ff
commit 8e59f63167
39 changed files with 8224 additions and 1158 deletions

View File

@@ -1,16 +0,0 @@
{
"format_version": "1.16.200",
"minecraft:block": {
"description": {
"identifier": "namespace:block",
"properties": {}
},
"components": {},
"events": {
"minecraft:on_fall_on": {
"add_mob_effect": {},
"sequence": [{ "die": {} }]
}
}
}
}

View File

@@ -1,10 +1,8 @@
{
"format_version": "1.20.41",
"minecraft:npc_dialogue": {
"format_version": "1.19.50",
"minecraft:camera_preset": {
"identifier": "example:custom",
"inherit_from": "minecraft:free",
"player_effects": true,
"listener": "player",
"pos_x": 30,
"pos_y": 90,
"pos_z": -20,

View File

@@ -11,11 +11,7 @@
"minecraft:equippable": {
"slots": [
{
"accepted_items": [
{
"tags": "query.any_tag('minecraft:is_tool')"
}
],
"accepted_items": ["minecraft:tool"],
"item": {
"tags": "query.any_tag('minecraft:is_tool')"
},

View File

@@ -1,9 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:scatter_feature": {
"description": {
"identifier": "namespace:entity_name"
}
}
}

View File

@@ -1,19 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:beards_and_shavers": {
"description": {
"identifier": "beards_and_shavers_features:beards_and_shavers_feature"
},
"places_feature": "beards_and_shavers_features:beards_and_shavers_feature_obsidian",
"y_delta": 0,
"bounding_box_min": [-4, 0, -4],
"bounding_box_max": [5, 12, 5],
"beard_raggedness_min": 0.25,
"beard_raggedness_max": 0.5,
"surface_block_type": "minecraft:grass",
"subsurface_block_type": "minecraft:dirt"
}
}

View File

@@ -1,17 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:conditional_list": {
"description": {
"identifier": "conditional_list_features:conditional_list_feature"
},
"conditional_features": [
{
"places_feature": "conditional_list_features:conditional_list_feature_obsidian",
"condition": "query.noise(v.originx, v.originz) < 0"
}
],
"early_out_scheme": "placement_success"
}
}

View File

@@ -1,11 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:hell_cave_carver_feature": {
"description": {
"identifier": "hell_cave_carver_features:hell_cave_carver_feature"
},
"fill_with": "minecraft:planks",
"width_modifier": 1
}
}

View File

@@ -1,21 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:rect_layout": {
"description": {
"identifier": "rect_layout_features:rect_layout_feature"
},
"ratio_of_empty_space": 0.5,
"feature_areas":[
{
"feature": "rect_layout_features:rect_layout_feature_obsidian",
"area_dimensions": [1, 1]
},
{
"feature": "rect_layout_features:rect_layout_feature_planks",
"area_dimensions": [1, 1]
}
]
}
}

View File

@@ -1,11 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:scan_surface": {
"description": {
"identifier": "scan_surface_features:scan_surface_feature"
},
"scan_surface_feature": "scan_surface_features:scan_surface_feature_obsidian"
}
}

View File

@@ -1,14 +1,14 @@
{
"format_version": "1.13.0",
"format_version": "1.13.0",
"minecraft:single_block_feature": {
"description": {
"identifier": "scan_surface_features:scan_surface_feature_obsidian"
},
"minecraft:single_block_feature": {
"description": {
"identifier": "scan_surface_features:scan_surface_feature_obsidian"
},
"places_block": "minecraft:obsidian",
"places_block": "minecraft:obsidian",
"enforce_placement_rules": false,
"enforce_survivability_rules": false
}
}
"enforce_placement_rules": false,
"enforce_survivability_rules": false
}
}

View File

@@ -1,31 +0,0 @@
{
"format_version": "1.13.0",
"minecraft:scatter_feature": {
"description": {
"identifier": "scatter_and_singleblock_features:scatter_feature"
},
"places_feature": "scatter_and_singleblock_features:scatter_feature_obsidian",
"scatter_chance": {
"numerator": 2,
"denominator": 3
},
"iterations": "math.pow(2, 4)",
"coordinate_eval_order": "zxy",
"project_input_to_floor": true,
"z": {
"distribution": "fixed_grid",
"extent": [10, 15],
"step_size": 2,
"grid_offset": 3
},
"x": {
"distribution": "gaussian",
"extent": ["(v.worldx < 12) * 2", 16]
},
"y": 0
}
}

View File

@@ -15,7 +15,9 @@
"minecraft:damage": 2,
"minecraft:stacked_by_data": true,
"minecraft:should_despawn": true,
"minecraft:hover_text_color": "aqua",
"minecraft:hover_text_color": {
},
"minecraft:use_animation": "brush",
"minecraft:use_modifiers": {
"use_duration": 2

View File

@@ -7,7 +7,7 @@
"type": "item",
"name": "minecraft:diamond_sword",
"weight": 1,
"functions": [{ "function": "specific_enchants", "enchants": [{ "id": "power", "level": 3 }, "power"] }]
"functions": [{ "function": "specific_enchants", "enchants": [{ "id": "power", "level": 3 }] }]
}
]
}

View File

@@ -1,18 +1,24 @@
{
"tiers": [
{
"trades": [
"total_exp_required": 5,
"groups": [
{
"wants": [
"num_to_select": 2,
"trades": [
{
"item": "minecraft:wheat",
"quantity": {
"min": 18,
"max": 22
}
"wants": [
{
"item": "minecraft:wheat",
"quantity": {
"min": 18,
"max": 22
}
}
],
"gives": [{ "item": "minecraft:emerald" }]
}
],
"gives": [{ "item": "minecraft:emerald" }]
]
}
]
}

View File

@@ -1,6 +1,6 @@
{
"Example": {
"textures": "example",
"sound": "obsidian"
"textures": "test",
"sound": "amethyst_block"
}
}
}

View File

@@ -6,7 +6,7 @@
"header": {
"name": "Hell Cave Carver Features",
"uuid": "459909b9-fdb8-4eb3-9b8d-55d09545b89d",
"uuid": "459909b9-fdb8-4eb3-9b8d-55d09545b89h",
"description": "Tests hell cave carver features",
"version": [0, 0, 1],
"min_engine_version": [1, 17, 0]

View File

@@ -6,7 +6,7 @@
"header": {
"name": "Hell Cave Carver Features",
"uuid": "459909b9-fdb8-4eb3-9b8d-55d09545b89d",
"uuid": "459909b9-fdb8-4eb3-9b8d-55d09545b89h",
"description": "Tests hell cave carver features",
"version": [1, 0, 0],
"min_engine_version": [1, 17, 0]