diff --git a/README.md b/README.md index 98d2a72..776b05f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,10 @@ Download: https://ci.opencollab.dev/job/GeyserMC/job/GeyserOptionalPack/job/mast - Shulker invisibility parity - Spectral arrow entity texture - Bypass for the scoreboard character limit +- Hides UI elements that do not exist on Java edition, such as: + - Text input field in the cartography table + - 2x2 crafting grid while in creative mode + - Tick-delay and rename fields in the command block menu ### Manually building diff --git a/developer_documentation.md b/developer_documentation.md index d2bacd0..ef61eb7 100644 --- a/developer_documentation.md +++ b/developer_documentation.md @@ -14,6 +14,7 @@ * [Spectral arrow entities](#Spectral-arrow-entities) * [Spyglass animations](#Spyglass-animations) * [Zombie villager textures](#Zombie-villager-textures) + * [UI modifications](#ui-modifications) ### Introduction @@ -268,3 +269,45 @@ Unfortunately, the spyglass cannot actually be used in the offhand by Bedrock pl Like villagers, zombie villagers in Java Edition have visible biome and profession variants. It appears that initial implementation of this was started in the Bedrock vanilla resources, given the presence of the entity with the identifier `minecraft:zombie_villager_v2`. However, the textures specified in this vanilla entity definition appear to be entirely blank TGA files. Luckily, the profession textures of zombie villagers and villagers are essentially identical, so the entity definition was updated to reference the villager profession textures. Zombie villagers, like villagers, have a profession level. This is implemented by adding the same vanilla render controller used to create this effect in the villager entity, `controller.render.villager_v2_level`. The remainder of the entity definition is unchanged. + +### UI modifications +Some inventories have added functionality on Bedrock, that does not exist on Java edition. For example, this includes: +- 2x2 crafting grid while in creative mode +- An option to rename maps in the cartography table +- Command block renaming or enabling/setting command block execution delays + +To resolve this issue, this pack uses Json UI modification on these inventory UIs. Here's how: + +`cartography_screen.json` +```json +{ + "text_box_panel": { + "ignored": true + } +} +``` + +This hides the renaming field in the cartography table that cannot be used. This does not modify the textures or functionality, +but instead just alters the visual appearance for Bedrock players. + +Hiding the 2x2 crafting grid is a bit more involved. We have to use bindings to only conditionally hide the 2x2 grid when we are in creative mode: +`inventory_screen.json` +```json +{ + "crafting_panel_2x2": { + "modifications": [ + { + "array_name": "bindings", + "operation": "insert_front", + "value": { + "binding_name": "(not #is_creative_mode)", + "binding_name_override": "#visible" + } + } + ] + } +} +``` + +This uses the `#is_creative_mode` binding, and applies it to the crafting panel. Note that we insert this modification into the bindings array +instead of directly modifying the UI - this allows the GeyserOptionalPack to stay compatible with other resource packs that modify this screen. \ No newline at end of file diff --git a/ui/cartography_screen.json b/ui/cartography_screen.json new file mode 100644 index 0000000..fe2c969 --- /dev/null +++ b/ui/cartography_screen.json @@ -0,0 +1,5 @@ +{ + "text_box_panel": { + "ignored": true + } +} \ No newline at end of file diff --git a/ui/command_block_screen.json b/ui/command_block_screen.json new file mode 100644 index 0000000..96be4ba --- /dev/null +++ b/ui/command_block_screen.json @@ -0,0 +1,23 @@ +{ + "left_scroll_panel_content/content_stack_panel/offset2": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/offset_execute_on_first_tick": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/option_label_execute_on_first_tick": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/execute_on_first_tick_toggle": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/offset_tick_delay": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/option_label_tick_delay": { + "ignored": true + }, + "left_scroll_panel_content/content_stack_panel/tick_delay_text": { + "ignored": true + } +} \ No newline at end of file diff --git a/ui/inventory_screen.json b/ui/inventory_screen.json new file mode 100644 index 0000000..98ed01c --- /dev/null +++ b/ui/inventory_screen.json @@ -0,0 +1,14 @@ +{ + "crafting_panel_2x2": { + "modifications": [ + { + "array_name": "bindings", + "operation": "insert_front", + "value": { + "binding_name": "(not #is_creative_mode)", + "binding_name_override": "#visible" + } + } + ] + } +} \ No newline at end of file diff --git a/ui/inventory_screen_pocket.json b/ui/inventory_screen_pocket.json new file mode 100644 index 0000000..07e0821 --- /dev/null +++ b/ui/inventory_screen_pocket.json @@ -0,0 +1,14 @@ +{ + "survival_panel_pocket": { + "modifications": [ + { + "array_name": "bindings", + "operation": "insert_front", + "value": { + "binding_name": "(not #is_creative_mode)", + "binding_name_override": "#visible" + } + } + ] + } +} \ No newline at end of file diff --git a/ui/scoreboards.json b/ui/scoreboards.json index 207859b..b306d77 100644 --- a/ui/scoreboards.json +++ b/ui/scoreboards.json @@ -1,26 +1,5 @@ { - "namespace": "scoreboard", "scoreboard_sidebar_player": { - "type": "label", - "layer": 2, - "text": "#player_name_sidebar", - "size": [ - "default", - 10 - ], - "max_size": [ - 250, - 10 - ], - "font_scale_factor": 1.0, - "locked_alpha": 1.0, - "color": "$player_name_color", - "bindings": [ - { - "binding_name": "#player_name_sidebar", - "binding_type": "collection", - "binding_collection_name": "scoreboard_players" - } - ] + "max_size": [ 250, 10 ] } -} +} \ No newline at end of file