Skip to content
Open
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Bedrock resource pack to extend Geyser functionality. Learn more on its [wiki pa
- 2x2 crafting grid while in creative mode
- Tick-delay and rename fields in the command block menu
- Structure block options that do not exist on Java
- 1, 2, 4 and 5 row chests, removing the need for the filler item
- Proper attack cooldowns

Download: [GeyserIntegratedPack.mcpack](https://download.geysermc.org/v2/projects/geyserintegratedpack/versions/latest/builds/latest/downloads/geyserintegratedpack)

Expand All @@ -31,6 +33,11 @@ Download: [GeyserIntegratedPack.mcpack](https://download.geysermc.org/v2/project
2. Run `gradlew run`.
3. When it finishes compiling, it will output the `GeyserIntegratedPack.mcpack`.

### Credits

- [Sweep 'N Slash](https://github.com/AnotherSeawhite/sweepnslash)
- Amazing thanks to Sweep 'N Slash's developers and contributors for giving us explict permission to use their UI files, attack cooldowns wouldn't be possible without them :)

### Legal

This repository is not endorsed nor affiliated with Mojang, Minecraft, or Microsoft.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"sneaking" : "query.is_sneaking && !query.is_sleeping"
},
{
"bob": "!variable.is_holding_spyglass && !(q.is_item_name_any('slot.weapon.offhand', 0, 'minecraft:spyglass') && q.is_emerging)"
"bob": "!variable.is_holding_spyglass && !variable.is_tooting_goat_horn && !variable.is_using_brush !(q.is_item_name_any('slot.weapon.offhand', 0, 'minecraft:spyglass') && q.is_emerging)"
},
{
"damage_nearby_mobs" : "variable.damage_nearby_mobs"
Expand All @@ -112,10 +112,22 @@
"swimming" : "variable.swim_amount > 0.0"
},
{
"swimming.no_right_arm": "variable.swim_amount > 0.0 && variable.melee_spear_equipped"
},
{
"swimming.legs" : "variable.swim_amount > 0.0"
},
{
"use_item_progress" : "( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 ) && !variable.is_brandishing_spear && !variable.is_holding_spyglass && !(q.is_item_name_any('slot.weapon.offhand', 0, 'minecraft:spyglass') && q.is_emerging)"
"crawling": "query.is_crawling && !variable.melee_spear_equipped"
},
{
"crawling.no_right_arm": "query.is_crawling && variable.melee_spear_equipped"
},
{
"crawling.legs": "query.is_crawling"
},
{
"use_item_progress" : "( variable.use_item_interval_progress > 0.0 ) || ( variable.use_item_startup_progress > 0.0 ) && !variable.is_brandishing_spear && !variable.is_holding_spyglass && !variable.is_tooting_goat_horn && !variable.is_using_brush && !query.is_item_name_any('slot.weapon.mainhand', 'minecraft:bow') && !(q.is_item_name_any('slot.weapon.offhand', 0, 'minecraft:spyglass') && q.is_emerging)"
},
{
"sleeping" : "query.is_sleeping && query.is_alive"
Expand All @@ -137,7 +149,22 @@
},
{
"third_person_bow_equipped" : "query.get_equipped_item_name == 'bow' && (variable.item_use_normalized > 0 && variable.item_use_normalized < 1.0)"
}
},
{
"tooting_goat_horn": "variable.is_tooting_goat_horn"
},
{
"holding_brush": "query.get_equipped_item_name == 'brush'"
},
{
"brushing": "variable.is_using_brush"
},
{
"holding_heavy_core": "query.is_item_name_any('slot.weapon.mainhand', 'minecraft:heavy_core')"
},
{
"third_person_melee_spear_controller": "variable.melee_spear_equipped"
}
],
"transitions" : [
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/integratedpack/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"description": "Bedrock resource pack to extend Geyser functionality",
"name": "GeyserIntegratedPack",
"uuid": "2254393d-8430-45b0-838a-bd397828c765",
"version": [1, 0, 3],
"version": [1, 1, 0],
"min_engine_version": [ 1, 16, 0 ]
},
"modules": [
{
"description": "GeyserIntegratedPack",
"type": "resources",
"uuid": "4d60881b-e4ed-466f-925c-8abc873151ba",
"version": [1, 0, 3]
"version": [1, 1, 0]
}
]
}
3 changes: 3 additions & 0 deletions src/main/resources/integratedpack/ui/_ui_defs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ui_defs": ["ui/attack_indicator/ui.json"]
}
182 changes: 182 additions & 0 deletions src/main/resources/integratedpack/ui/attack_indicator/ui.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the commented out blocks? If not can we remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, but when we fix the "hover over" entity in Geyser we can then implement the ready cooldown, so I'd prefer we keep it for whenever that gets fixed

Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
// Adapted from https://github.com/AnotherSeawhite/sweepnslash/blob/main/packs/RP/ui/sweepnslash/cooldown.json

{
"namespace": "attack_indicator",
"cooldown_layout": {
"type": "image",
"layer": 2,
"$clip_max": 16.0,
"clips_children": false,
"clip_pixelperfect": true,
"bindings": [
{
"binding_type": "view",
"source_control_name": "data_control",
"resolve_sibling_scope": true,
"source_property_name": "(#preserved_text - $update_string)",
"target_property_name": "#texto"
},
{
"binding_type": "view",
"source_property_name": "(#texto - ('%.4s' * #texto))",
"target_property_name": "#texttonumber"
},
{
"binding_type": "view",
"source_property_name": "(#texttonumber * 1)",
"target_property_name": "#ratio"
},
{
"binding_type": "view",
"source_property_name": "(($clip_max - #ratio) / $clip_max)",
"target_property_name": "#clip_ratio"
},
{
"binding_type": "view",
"source_property_name": "(('%.3s' * #texto) = $prefix_string)",
"target_property_name": "#visible"
}
]
},
// "cooldown_ready": {
// "type": "image",
// "layer": 3,
// "allow_clipping": false,
// "bindings": [
// {
// "binding_type": "view",
// "source_control_name": "data_control",
// "resolve_sibling_scope": true,
// "source_property_name": "(#preserved_text - $update_string)",
// "target_property_name": "#texto"
// },
// {
// "binding_type": "view",
// "source_property_name": "( (('%.1s' * (#texto - ('%.4s' * #texto))) = 't') and (('%.3s' * #texto) = $prefix_string) )",
// "target_property_name": "#visible"
// }
// ]
// },
"cooldown_crosshair": {
"type": "panel",
"size": [
16,
4
],
"anchor_from": "bottom_middle",
"anchor_to": "top_middle",
"$prefix_string": "crs",
"controls": [
{
"data_control@attack_indicator.data_control": {}
},
{
"cooldown_crosshair_layout@attack_indicator.cooldown_layout": {
"texture": "textures/geyser/ui/crosshair_attack_indicator_progress",
"alpha": 0.5,
"clip_direction": "left",
"controls": [
{
"bar_bg": {
"type": "image",
"texture": "textures/geyser/ui/crosshair_attack_indicator_background",
"alpha": 0.5,
"layer": -1
}
}
]
}
}
// {
// "cooldown_ready_crosshair@attack_indicator.cooldown_ready": {
// "texture": "textures/cooldown_crosshair_ready",
// "alpha": 0.6,
// "controls": [
// {
// "full_layout_with_alpha": {
// "type": "image",
// "texture": "textures/cooldown_crosshair_full",
// "alpha": 0.2
// }
// }
// ]
// }
// }
]
},
"cooldown_hotbar": {
"type": "panel",
"size": [
18,
18
],
"offset": [
4,
0
],
"anchor_from": "right_middle",
"anchor_to": "left_middle",
"$prefix_string": "htb",
"controls": [
{
"data_control@attack_indicator.data_control": {}
},
{
"cooldown_hotbar_layout@attack_indicator.cooldown_layout": {
"texture": "textures/geyser/ui/hotbar_attack_indicator_progress",
"clip_direction": "down",
"controls": [
{
"bar_bg": {
"type": "image",
"texture": "textures/geyser/ui/hotbar_attack_indicator_background",
"layer": -1
}
}
]
}
}
// {
// "cooldown_ready_hotbar@attack_indicator.cooldown_ready": {
// "texture": "textures/cooldown_hotbar_full"
// }
// }
]
},
"cooldown_ui": {
"type": "panel",
"$update_string": "geyseropt:cooldown:",
"size": [
"100%",
"100%"
],
"controls": [
{
"cooldown_crosshair@attack_indicator.cooldown_crosshair": {}
}
]
},
"data_control": {
"type": "panel",
"size": [
0,
0
],
"bindings": [
{
"binding_name": "#tip_text",
"binding_condition": "always"
},
{
"binding_name": "#tip_text",
"binding_name_override": "#preserved_text",
"binding_condition": "visibility_changed"
},
{
"binding_type": "view",
"source_property_name": "(not (#tip_text = #preserved_text) and not ((#tip_text - $update_string) = #tip_text))",
"target_property_name": "#visible"
}
]
}
}
99 changes: 99 additions & 0 deletions src/main/resources/integratedpack/ui/chest_screen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"small_chest_grid": {
"grid_dimensions": "$grid_dimensions",
"size": "$size",

"$grid_dimensions|default": [9, 3],
"$size|default": [162, 54],
"$container_title_copy": "$container_title",

"variables": [
{
"requires": "(not (($container_title_copy - '§z§1§r') = $container_title_copy))",
"$grid_dimensions": [9, 1],
"$size": [162, 18]
},
{
"requires": "(not (($container_title_copy - '§z§2§r') = $container_title_copy))",
"$grid_dimensions": [9, 2],
"$size": [162, 36]
},
{
"requires": "(not (($container_title_copy - '§z§3§r') = $container_title_copy))",
"$grid_dimensions": [9, 3],
"$size": [162, 54]
}
]
},
"large_chest_grid": {
"grid_dimensions": "$grid_dimensions",
"size": "$size",

"$grid_dimensions|default": [9, 6],
"$size|default": [162, 108],
"$container_title_copy": "$container_title",

"variables": [
{
"requires": "(not (($container_title_copy - '§z§4§r') = $container_title_copy))",
"$grid_dimensions": [9, 4],
"$size": [162, 72]
},
{
"requires": "(not (($container_title_copy - '§z§5§r') = $container_title_copy))",
"$grid_dimensions": [9, 5],
"$size": [162, 90]
},
{
"requires": "(not (($container_title_copy - '§z§6§r') = $container_title_copy))",
"$grid_dimensions": [9, 6],
"$size": [162, 108]
}
]
},

"small_chest_panel/root_panel": {
"size": "$size",

"$size|default": [176, 166],
"$container_title_copy": "$container_title",

"variables": [
{
"requires": "(not (($container_title_copy - '§z§1§r') = $container_title_copy))",
"$size": [176, 130]
},
{
"requires": "(not (($container_title_copy - '§z§2§r') = $container_title_copy))",
"$size": [176, 148]
},
{
"requires": "(not (($container_title_copy - '§z§3§r') = $container_title_copy))",
"$size": [176, 166]
}
]
},

"large_chest_panel/root_panel": {
"$size|default": [176, 220],

"size": "$size",

"$container_title_copy": "$container_title",

"variables": [
{
"requires": "(not (($container_title_copy - '§z§4§r') = $container_title_copy))",
"$size": [176, 184]
},
{
"requires": "(not (($container_title_copy - '§z§5§r') = $container_title_copy))",
"$size": [176, 202]
},
{
"requires": "(not (($container_title_copy - '§z§6§r') = $container_title_copy))",
"$size": [176, 220]
}
]
}
}
Loading