1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 13:36:18 +00:00
bedrock-samples/resource_pack/ui/redstone_screen.json
Mike Ammerlaan 6e0daa70a8 v1.21.40.3
2024-10-22 09:25:09 -07:00

536 lines
17 KiB
JSON

{
"namespace": "redstone",
//---------------------------------------------------------------------------
// Screens
//---------------------------------------------------------------------------
"item_dropper_label": {
"type": "label",
"offset": [ 0, 5 ],
"anchor_from": "top_middle",
"anchor_to": "top_middle",
"color": "$title_text_color",
"text": "$container_title",
"layer": 2
},
"dispenser_label@item_dropper_label": {
},
"crafter_label@item_dropper_label": {
},
"dropper_label@item_dropper_label": {
},
"hopper_label@item_dropper_label": {
"offset": [ 7, 7 ],
"anchor_from": "top_left",
"anchor_to": "top_left"
},
"redstone_input_grid": {
"type": "grid",
"anchor_from": "center",
"anchor_to": "center",
"offset": "$grid_offset",
"grid_dimensions": "$grid_dimensions",
"collection_name": "container_items",
"grid_item_template": "common.container_item",
"$item_collection_name": "container_items"
},
"redstone_panel_top_half": {
"type": "panel",
"size": [ "100%", "50% - 12px" ],
"offset": [ 0, 7 ],
"anchor_to": "top_left",
"anchor_from": "top_left",
"controls": [
{ "redstone_input_grid@redstone.redstone_input_grid": {} }
]
},
"panel": {
"type": "panel",
"controls": [
{ "container_gamepad_helpers@common.container_gamepad_helpers": {} },
{ "selected_item_details_factory@common.selected_item_details_factory": {} },
{ "item_lock_notification_factory@common.item_lock_notification_factory": {} },
{
"root_panel@common.root_panel": {
"layer": 1,
"size": "$screen_dimensions",
"controls": [
{ "common_panel@common.common_panel": {} },
{
"redstone_screen_inventory": {
"type": "panel",
"layer": 5,
"controls": [
{ "red_panel@redstone.redstone_panel_top_half": {} },
{ "red_bottom_half@common.inventory_panel_bottom_half_with_label": {} },
{ "hotbar_grid@common.hotbar_grid_template": {} },
{ "red_hold_icon@common.inventory_take_progress_icon_button": {} }
]
}
},
{ "red_icon@common.inventory_selected_icon_button": {} },
{ "gamepad_cursor@common.gamepad_cursor_button": {} },
{ "$screen_label@$screen_label": {} }
]
}
},
{ "flying_item_renderer@common.flying_item_renderer": { "layer": 21 } },
{ "bundle_touch_tooltip@gameplay.bundle_touch_tooltip": {} }
]
},
"crafter_input_grid": {
"type": "grid",
"anchor_from": "center",
"anchor_to": "center",
"offset": "$grid_offset",
"grid_dimensions": "$grid_dimensions",
"collection_name": "container_items",
"grid_item_template": "redstone.crafter_enabled_slot_template",
"$item_collection_name": "container_items"
},
"cell_image": {
"type": "image",
"texture": "textures/ui/slot_enabled",
"layer": 1
},
"crafter_highlight_slot": {
"type": "image",
"texture": "textures/ui/slot_enabled_hover",
"size": [ "100% - 2px", "100% - 2px" ],
"alpha": 0.8
},
"crafter_container_slot_button_prototype@common.container_slot_button_prototype": {
"$highlight_control|default": "redstone.crafter_highlight_slot_panel"
},
"crafter_highlight_slot_panel": {
"type": "panel",
"controls": [
{
"highlight@redstone.crafter_highlight_slot": {
"controls": [
{
"hover_text@common.hover_text": {
"layer": 29,
"$hover_text_binding_name|default": "#hover_text",
"bindings": [
{
"binding_name": "$hover_text_binding_name",
"binding_name_override": "#hover_text",
"binding_type": "collection",
"binding_collection_name": "$item_collection_name"
}
]
}
}
],
"bindings": [
{
"binding_name": "#show_persistent_bundle_hover_text",
"binding_name_override": "#visible"
}
]
}
},
{
"white_border@common.white_border_slot": {
"bindings": [
{
"binding_name": "#show_persistent_bundle_hover_text",
"binding_name_override": "#visible"
}
]
}
}
]
},
"crafter_enabled_slot_template@common.container_item": {
"$background_images|default": "redstone.cell_image",
"$button_ref|default": "redstone.crafter_container_slot_button_prototype"
},
"crafter_disabled_slot@common.button": {
"type": "button",
"anchor_from": "center",
"anchor_to": "center",
"hover_control": "hover",
"size": [ 18, 18 ],
"layer": 20,
"controls": [
{
"default": {
"type": "image",
"texture": "textures/ui/slot_disabled"
}
},
{
"hover": {
"type": "image",
"texture": "textures/ui/slot_enabled_hover"
}
},
{
"pressed": {
"type": "image",
"texture": "textures/ui/slot_disabled"
}
}
]
},
"output_slot_hover_info": {
"type": "button",
"layer": 1,
"anchor_from": "center",
"anchor_to": "center",
"hover_control": "hover",
"size": [ 18, 18 ],
"offset": [ 54, -36 ],
"$stack_count_required": true,
"controls": [
{
"hover@common.hover_text": {
"layer": 29,
"bindings": [
{
"binding_name": "#crafting_preview_info",
"binding_name_override": "#hover_text"
}
]
}
},
{
"output_slot@common.item_renderer": {
"size": [ 16, 16 ],
"bindings": [
{
"binding_name": "#crafter_output_item",
"binding_name_override": "#item_id_aux"
},
{
"binding_name": "#crafter_output_item_color",
"binding_name_override": "#item_custom_color"
},
{
"binding_name": "#crafter_output_item_shield_base_color_hovered",
"binding_name_override": "#shield_base_color"
},
{
"binding_name": "#crafter_output_item_banner_patterns",
"binding_name_override": "#banner_patterns"
},
{
"binding_name": "#crafter_output_item_selected_banner_colors",
"binding_name_override": "#banner_colors"
},
{
"binding_name": "#crafter_output_item_selected_banner_type",
"binding_name_override": "#banner_type"
},
{
"binding_name": "#crafter_output_item_selected_decorated_pot_sherds",
"binding_name_override": "#decorated_pot_sherds"
}
]
}
},
{
"output_slot_border": {
"type": "image",
"layer": 1,
"size": [ 26, 26 ],
"texture": "textures/ui/crafter_item_border"
}
},
{
"output_count@common.stack_count_label": {
"layer": 20,
"size": [ 18, 18 ],
"offset": [ 14.1, 11.2 ],
"anchor_from": "center",
"anchor_to": "center",
"bindings": [
{
"binding_name": "#output_stack_count",
"binding_name_override": "#inventory_stack_count"
}
]
}
}
]
},
"panel_crafter": {
"type": "panel",
"controls": [
{ "container_gamepad_helpers@common.container_gamepad_helpers": {} },
{ "selected_item_details_factory@common.selected_item_details_factory": {} },
{ "item_lock_notification_factory@common.item_lock_notification_factory": {} },
{
"root_panel@common.root_panel": {
"layer": 1,
"size": "$screen_dimensions",
"controls": [
{ "common_panel@common.common_panel": {} },
{
"disabled_slot_0_button@redstone.crafter_disabled_slot": {
"offset": [ -53.9, -54.4 ],
"$pressed_button_name": "disabled_button0",
"bindings": [
{
"binding_name": "#button_visible0",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_1_button@redstone.crafter_disabled_slot": {
"offset": [ -36, -54.4 ],
"$pressed_button_name": "disabled_button1",
"bindings": [
{
"binding_name": "#button_visible1",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_2_button@redstone.crafter_disabled_slot": {
"offset": [ -18, -54.4 ],
"$pressed_button_name": "disabled_button2",
"bindings": [
{
"binding_name": "#button_visible2",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_3_button@redstone.crafter_disabled_slot": {
"offset": [ -53.9, -36.4 ],
"$pressed_button_name": "disabled_button3",
"bindings": [
{
"binding_name": "#button_visible3",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_4_button@redstone.crafter_disabled_slot": {
"offset": [ -36, -36.4 ],
"$pressed_button_name": "disabled_button4",
"bindings": [
{
"binding_name": "#button_visible4",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_5_button@redstone.crafter_disabled_slot": {
"offset": [ -18, -36.4 ],
"$pressed_button_name": "disabled_button5",
"bindings": [
{
"binding_name": "#button_visible5",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_6_button@redstone.crafter_disabled_slot": {
"offset": [ -53.9, -18.5 ],
"$pressed_button_name": "disabled_button6",
"bindings": [
{
"binding_name": "#button_visible6",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_7_button@redstone.crafter_disabled_slot": {
"offset": [ -36, -18.5 ],
"$pressed_button_name": "disabled_button7",
"bindings": [
{
"binding_name": "#button_visible7",
"binding_name_override": "#visible"
}
]
}
},
{
"disabled_slot_8_button@redstone.crafter_disabled_slot": {
"offset": [ -18, -18.5 ],
"$pressed_button_name": "disabled_button8",
"bindings": [
{
"binding_name": "#button_visible8",
"binding_name_override": "#visible"
}
]
}
},
{
"redstone_screen_inventory": {
"type": "panel",
"layer": 5,
"controls": [
{
"crafting_grid": {
"type": "panel",
"size": [ "100%", "50% - 12px" ],
"offset": [ -36, 11 ],
"anchor_to": "top_left",
"anchor_from": "top_left",
"controls": [
{
"crafter_input_grid@redstone.crafter_input_grid": {}
}
]
}
},
{ "red_bottom_half@common.inventory_panel_bottom_half_with_label": {} },
{ "hotbar_grid@common.hotbar_grid_template": {} },
{ "red_hold_icon@common.inventory_take_progress_icon_button": {} },
{
"redstone_wire_line": {
"type": "image",
"layer": 3,
"size": [ 18, 18 ],
"anchor_from": "top_left",
"anchor_to": "top_left",
"offset": [ 95, 38 ],
"bindings": [
{
"binding_name": "#redstone_arrow_texture",
"binding_name_override": "#texture"
}
]
}
},
{
"crafter_output@redstone.output_slot_hover_info": {}
}
]
}
},
{ "red_icon@common.inventory_selected_icon_button": {} },
{ "gamepad_cursor@common.gamepad_cursor_button": {} },
{ "$screen_label@$screen_label": {} }
]
}
},
{ "flying_item_renderer@common.flying_item_renderer": { "layer": 15 } },
{ "bundle_touch_tooltip@gameplay.bundle_touch_tooltip": {} }
]
},
"hopper_screen@common.inventory_screen_common": {
"$close_on_player_hurt|default": true,
"$use_custom_pocket_toast|default": false,
"close_on_player_hurt": "$close_on_player_hurt",
"use_custom_pocket_toast": "$use_custom_pocket_toast",
"variables": [
{
"requires": "$desktop_screen",
"$screen_label": "redstone.hopper_label",
"$screen_dimensions": [ 176, 133 ],
"$grid_dimensions": [ 5, 1 ],
"$grid_offset": [ 0, -7 ],
"$screen_content": "redstone.panel",
"$screen_bg_content": "common.screen_background",
"$screen_background_alpha": 0.4
},
{
"requires": "$pocket_screen",
"$use_custom_pocket_toast": true,
"$screen_content": "pocket_containers.hopper_panel"
}
]
},
"dispenser_screen@common.inventory_screen_common": {
"$close_on_player_hurt|default": true,
"$use_custom_pocket_toast|default": false,
"close_on_player_hurt": "$close_on_player_hurt",
"use_custom_pocket_toast": "$use_custom_pocket_toast",
"variables": [
{
"requires": "$desktop_screen",
"$screen_label": "redstone.dispenser_label",
"$screen_dimensions": [ 176, 166 ],
"$grid_dimensions": [ 3, 3 ],
"$grid_offset": [ 0, 0 ],
"$screen_content": "redstone.panel",
"$screen_bg_content": "common.screen_background",
"$screen_background_alpha": 0.4
},
{
"requires": "$pocket_screen",
"$use_custom_pocket_toast": true,
"$screen_content": "pocket_containers.dispenser_panel"
}
]
},
"crafter_screen@common.inventory_screen_common": {
"$close_on_player_hurt|default": true,
"$use_custom_pocket_toast|default": false,
"close_on_player_hurt": "$close_on_player_hurt",
"use_custom_pocket_toast": "$use_custom_pocket_toast",
"variables": [
{
"requires": "$desktop_screen",
"$screen_label": "redstone.crafter_label",
"$screen_dimensions": [ 176, 166 ],
"$grid_dimensions": [ 3, 3 ],
"$grid_offset": [ 0, 0 ],
"$screen_content": "redstone.panel_crafter",
"$screen_bg_content": "common.screen_background",
"$screen_background_alpha": 0.4
},
{
"requires": "$pocket_screen",
"$use_custom_pocket_toast": true,
"$screen_content": "crafter_pocket.crafter"
}
]
},
"dropper_screen@common.inventory_screen_common": {
"$close_on_player_hurt|default": true,
"$use_custom_pocket_toast|default": false,
"close_on_player_hurt": "$close_on_player_hurt",
"use_custom_pocket_toast": "$use_custom_pocket_toast",
"variables": [
{
"requires": "$desktop_screen",
"$screen_label": "redstone.dropper_label",
"$screen_dimensions": [ 176, 166 ],
"$grid_dimensions": [ 3, 3 ],
"$grid_offset": [ 0, 0 ],
"$screen_content": "redstone.panel",
"$screen_bg_content": "common.screen_background",
"$screen_background_alpha": 0.4
},
{
"requires": "$pocket_screen",
"$use_custom_pocket_toast": true,
"$screen_content": "pocket_containers.dropper_panel"
}
]
}
}