diff --git a/behavior_pack/blocks/imoo_chair.json b/behavior_pack/blocks/imoo_chair.json new file mode 100644 index 0000000..e936cbc --- /dev/null +++ b/behavior_pack/blocks/imoo_chair.json @@ -0,0 +1,191 @@ +{ + "format_version": "1.17.0", + "minecraft:block": { + "description": { + "properties": { + "bridge:block_rotation": [ + 2, + 3, + 4, + 5 + ] + }, + "identifier": "bony:imoo_chair", + "is_experimental": false + }, + "permutations": [ + { + "condition": "query.block_property('bridge:block_rotation') == 2", + "components": { + "minecraft:rotation": [ + 0, + 180, + 0 + ], + "minecraft:on_interact": { + "event": "rot_0" + } + } + }, + { + "condition": "query.block_property('bridge:block_rotation') == 3", + "components": { + "minecraft:rotation": [ + 0, + 0, + 0 + ], + "minecraft:on_interact": { + "event": "rot_1" + } + } + }, + { + "condition": "query.block_property('bridge:block_rotation') == 4", + "components": { + "minecraft:rotation": [ + 0, + 270, + 0 + ], + "minecraft:on_interact": { + "event": "rot_2" + } + } + }, + { + "condition": "query.block_property('bridge:block_rotation') == 5", + "components": { + "minecraft:rotation": [ + 0, + 90, + 0 + ], + "minecraft:on_interact": { + "event": "rot_3" + } + } + } + ], + "components": { + "minecraft:display_name": "Стул", + "minecraft:on_player_placing": { + "event": "bridge:update_rotation" + }, + "minecraft:destroy_time": 0.2, + "minecraft:explosion_resistance": 1, + "minecraft:map_color": "#ffffff", + "minecraft:material_instances": { + "*": { + "render_method": "opaque", + "texture": "imoo_chair" + } + }, + "minecraft:geometry": "geometry.imoo_chair", + "minecraft:block_light_absorption": 0.9, + "minecraft:entity_collision": { + "origin": [ + -5, + 0, + -5 + ], + "size": [ + 10, + 9, + 10 + ] + }, + "minecraft:creative_category": { + "group": "itemGroup.name.Construction", + "category": "Construction" + }, + "minecraft:pick_collision": { + "origin": [ + -5, + 0, + -5 + ], + "size": [ + 10, + 16, + 10 + ] + } + }, + "events": { + "bridge:update_rotation": { + "set_block_property": { + "bridge:block_rotation": "query.cardinal_facing_2d" + } + }, + "force_ride": { + "run_command": { + "target": "other", + "command": [ + "ride @s start_riding @e[type=imoo:seat_helper,c=1] teleport_rider" + ] + } + }, + "rot_0": { + "sequence": [ + { + "run_command": { + "command": [ + "summon imoo:seat_helper ~ ~ ~", + "execute @e[type=imoo:seat_helper,c=1] ~ ~ ~ tp @s ~ ~ ~ facing ~ ~ ~1" + ] + }, + "trigger": { + "event": "force_ride" + } + } + ] + }, + "rot_1": { + "sequence": [ + { + "run_command": { + "command": [ + "summon imoo:seat_helper ~ ~-0.1 ~", + "execute @e[type=imoo:seat_helper,c=1] ~ ~ ~ tp @s ~ ~ ~ facing ~ ~ ~-1" + ] + }, + "trigger": { + "event": "force_ride" + } + } + ] + }, + "rot_2": { + "sequence": [ + { + "run_command": { + "command": [ + "summon imoo:seat_helper ~ ~-0.1 ~", + "execute @e[type=imoo:seat_helper,c=1] ~ ~ ~ tp @s ~ ~ ~ facing ~1 ~ ~" + ] + }, + "trigger": { + "event": "force_ride" + } + } + ] + }, + "rot_3": { + "sequence": [ + { + "run_command": { + "command": [ + "summon imoo:seat_helper ~ ~-0.1 ~", + "execute @e[type=imoo:seat_helper,c=1] ~ ~ ~ tp @s ~ ~ ~ facing ~-1 ~ ~" + ] + }, + "trigger": { + "event": "force_ride" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/behavior_pack/entities/imoo_seat_helper.json b/behavior_pack/entities/imoo_seat_helper.json new file mode 100644 index 0000000..fa2ba06 --- /dev/null +++ b/behavior_pack/entities/imoo_seat_helper.json @@ -0,0 +1,70 @@ +{ + "format_version": "1.17.0", + "minecraft:entity": { + "description": { + "identifier": "imoo:seat_helper", + "runtime_identifier": {}, + "is_summonable": true, + "is_spawnable": false + }, + "component_groups": { + "despawn": { + "minecraft:instant_despawn": {} + } + }, + "components": { + "minecraft:rideable": { + "seat_count": 1, + "family_types": [ + "player" + ], + "seats": [ + { + "position": [ + 0, + 0, + 0 + ] + } + ] + }, + "minecraft:type_family": { + "family": [ + "seat" + ] + }, + "minecraft:health": { + "value": 1, + "max": 1 + }, + "minecraft:collision_box": { + "width": 0.1, + "height": 0.1 + }, + "minecraft:physics": { + "has_collision": false, + "has_gravity": false + }, + "minecraft:environment_sensor": { + "triggers": [ + { + "event": "despawn", + "filters": { + "test": "rider_count", + "value": 0 + } + } + ] + } + }, + "events": { + "despawn": { + "add": { + "component_groups": [ + "despawn" + ] + } + } + } + } +} \ No newline at end of file diff --git a/behavior_pack/manifest.json b/behavior_pack/manifest.json index 590b695..e40a8de 100644 --- a/behavior_pack/manifest.json +++ b/behavior_pack/manifest.json @@ -7,7 +7,7 @@ "version": [ 0, 4, - 13 + 18 ], "min_engine_version": [ 1, @@ -23,7 +23,7 @@ "version": [ 0, 4, - 13 + 18 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 4, - 13 + 18 ] } ] diff --git a/resource_pack/manifest.json b/resource_pack/manifest.json index 6e715ae..0201b85 100644 --- a/resource_pack/manifest.json +++ b/resource_pack/manifest.json @@ -7,7 +7,7 @@ "version": [ 0, 4, - 13 + 18 ], "min_engine_version": [ 1, @@ -23,7 +23,7 @@ "version": [ 0, 4, - 13 + 18 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 4, - 13 + 18 ] } ] diff --git a/resource_pack/models/blocks/imoo_chair.json b/resource_pack/models/blocks/imoo_chair.json new file mode 100644 index 0000000..05c2967 --- /dev/null +++ b/resource_pack/models/blocks/imoo_chair.json @@ -0,0 +1,144 @@ +{ + "format_version": "1.12.0", + "minecraft:geometry": [ + { + "description": { + "identifier": "geometry.imoo_chair", + "texture_width": 32, + "texture_height": 32, + "visible_bounds_width": 2, + "visible_bounds_height": 2.5, + "visible_bounds_offset": [0, 0.75, 0] + }, + "bones": [ + { + "name": "bone", + "pivot": [0, 0, 0] + }, + { + "name": "bone2", + "parent": "bone", + "pivot": [0, 0, 0], + "cubes": [ + { + "origin": [-5, 0, -5], + "size": [1, 1, 10], + "uv": { + "north": {"uv": [18, 9], "uv_size": [1, 1]}, + "east": {"uv": [9, 14], "uv_size": [10, 1]}, + "south": {"uv": [19, 9], "uv_size": [1, 1]}, + "west": {"uv": [9, 15], "uv_size": [10, 1]}, + "up": {"uv": [0, 16], "uv_size": [1, 10]}, + "down": {"uv": [1, 26], "uv_size": [1, -10]} + } + }, + { + "origin": [4, 0, -5], + "size": [1, 1, 10], + "uv": { + "north": {"uv": [19, 14], "uv_size": [1, 1]}, + "east": {"uv": [2, 16], "uv_size": [10, 1]}, + "south": {"uv": [19, 15], "uv_size": [1, 1]}, + "west": {"uv": [12, 16], "uv_size": [10, 1]}, + "up": {"uv": [17, 0], "uv_size": [1, 10]}, + "down": {"uv": [2, 27], "uv_size": [1, -10]} + } + }, + { + "origin": [-1, 0, -5], + "size": [1, 1, 10], + "pivot": [0, 0, 0], + "rotation": [0, -90, 0], + "uv": { + "north": {"uv": [20, 9], "uv_size": [1, 1]}, + "east": {"uv": [3, 17], "uv_size": [10, 1]}, + "south": {"uv": [20, 14], "uv_size": [1, 1]}, + "west": {"uv": [17, 10], "uv_size": [10, 1]}, + "up": {"uv": [13, 17], "uv_size": [1, 10]}, + "down": {"uv": [14, 27], "uv_size": [1, -10]} + } + }, + { + "origin": [-3, 1, -1], + "size": [1, 7, 1], + "uv": { + "north": {"uv": [18, 2], "uv_size": [1, 7]}, + "east": {"uv": [3, 18], "uv_size": [1, 7]}, + "south": {"uv": [4, 18], "uv_size": [1, 7]}, + "west": {"uv": [5, 18], "uv_size": [1, 7]}, + "up": {"uv": [20, 15], "uv_size": [1, 1]}, + "down": {"uv": [20, 19], "uv_size": [1, -1]} + } + }, + { + "origin": [2, 1, -1], + "size": [1, 7, 1], + "uv": { + "north": {"uv": [6, 18], "uv_size": [1, 7]}, + "east": {"uv": [7, 18], "uv_size": [1, 7]}, + "south": {"uv": [8, 18], "uv_size": [1, 7]}, + "west": {"uv": [9, 18], "uv_size": [1, 7]}, + "up": {"uv": [20, 19], "uv_size": [1, 1]}, + "down": {"uv": [20, 21], "uv_size": [1, -1]} + } + }, + { + "origin": [-2, 8.37118, 3.50142], + "size": [1, 7, 0.5], + "pivot": [0, 0, 0], + "rotation": [-5, 0, 0], + "uv": { + "north": {"uv": [10, 18], "uv_size": [1, 7]}, + "east": {"uv": [11, 18], "uv_size": [1, 7]}, + "south": {"uv": [12, 18], "uv_size": [1, 7]}, + "west": {"uv": [15, 18], "uv_size": [1, 7]}, + "up": {"uv": [21, 2], "uv_size": [1, 1]}, + "down": {"uv": [21, 4], "uv_size": [1, -1]} + } + }, + { + "origin": [1, 8.37118, 3.50142], + "size": [1, 7, 0.5], + "pivot": [0, 0, 0], + "rotation": [-5, 0, 0], + "uv": { + "north": {"uv": [16, 18], "uv_size": [1, 7]}, + "east": {"uv": [17, 18], "uv_size": [1, 7]}, + "south": {"uv": [18, 18], "uv_size": [1, 7]}, + "west": {"uv": [19, 2], "uv_size": [1, 7]}, + "up": {"uv": [21, 4], "uv_size": [1, 1]}, + "down": {"uv": [21, 6], "uv_size": [1, -1]} + } + }, + { + "origin": [-4, 12.37118, 3.15142], + "size": [8, 7, 0.75], + "pivot": [0, 0, 0], + "rotation": [-5, 0, 0], + "uv": { + "north": {"uv": [9, 0], "uv_size": [8, 7]}, + "east": {"uv": [19, 18], "uv_size": [1, 7]}, + "south": {"uv": [9, 7], "uv_size": [8, 7]}, + "west": {"uv": [20, 2], "uv_size": [1, 7]}, + "up": {"uv": [17, 13], "uv_size": [8, 1]}, + "down": {"uv": [15, 18], "uv_size": [8, -1]} + } + }, + { + "origin": [-4.25, 8, -3.5], + "size": [8.5, 1, 8], + "uv": { + "north": {"uv": [17, 11], "uv_size": [9, 1]}, + "east": {"uv": [18, 0], "uv_size": [8, 1]}, + "south": {"uv": [17, 12], "uv_size": [9, 1]}, + "west": {"uv": [18, 1], "uv_size": [8, 1]}, + "up": {"uv": [0, 0], "uv_size": [9, 8]}, + "down": {"uv": [0, 16], "uv_size": [9, -8]} + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/resource_pack/textures/bullet.png b/resource_pack/textures/bullet.png deleted file mode 100644 index d0a889f..0000000 Binary files a/resource_pack/textures/bullet.png and /dev/null differ diff --git a/resource_pack/textures/items/block/imoo_chair.png b/resource_pack/textures/items/block/imoo_chair.png new file mode 100644 index 0000000..8a26566 Binary files /dev/null and b/resource_pack/textures/items/block/imoo_chair.png differ diff --git a/resource_pack/textures/terrain_texture.json b/resource_pack/textures/terrain_texture.json index 710130b..d07d596 100644 --- a/resource_pack/textures/terrain_texture.json +++ b/resource_pack/textures/terrain_texture.json @@ -4,5 +4,10 @@ "padding": 8, "num_mip_levels": 4, "texture_data": { + "imoo_chair": { + "textures": [ + "textures/items/block/imoo_chair" + ] + } } }