fix(actionbar): port vanilla interactions to 26.2 - #63
Conversation
clicked_bed.json 26.2 porting and restrictive fix
slept_in_bed.json 26.2 port and restrictive fix
clicked_lockable_block 26.2 port and restrictive fx
check_lock.mcfunction 26.2 port and capitaization fix
east.mcfunction 26.2 port and capitalization fix
north.mcfunction 26.2 port and capitalization fix
south.mcfunction 26.2 port and capitalization fix
west.mcfunction 26.2 port and capitalization fix
clicked_bed.mcfunction removed occupied_empty check due to optimizations in clicked_bed.json advancement file.
Action bar 26.2
|
I apologize for the accidental Merge pull request from commit 10, if this pull request is merged, can it be squashed first? |
| ], | ||
| "rewards": { | ||
| "function": "smithed.actionbar:impl/vanilla/bed/clicked_bed" | ||
| "function": "smithed.actionbar:v0.7.0/vanilla/bed/clicked_bed" |
There was a problem hiding this comment.
the impl/ is automaticly replace in the beet pipeline, pls rollback this change
| "predicate": { | ||
| "block": { | ||
| "tag": "smithed.actionbar:impl/lockable" | ||
| "blocks": "#smithed.actionbar:v0.7.0/lockable" |
There was a problem hiding this comment.
same here, rollback the impl change
| ], | ||
| "rewards": { | ||
| "function": "smithed.actionbar:impl/vanilla/container/clicked_lockable_block" | ||
| "function": "smithed.actionbar:v0.7.0/vanilla/container/clicked_lockable_block" |
| "predicate": { | ||
| "block": { | ||
| "tag": "smithed.actionbar:impl/lockable" | ||
| "blocks": "#smithed.actionbar:v0.7.0/lockable" |
| "trigger": "minecraft:default_block_use", | ||
| "conditions": { | ||
| "player": [ | ||
| { |
| "min": 1 | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
Hello, I apologize for the load_status and impl changes, I accidentally used the compiled version, I fixed them, if you need any other changes I'm here to help.
There was a problem hiding this comment.
only part for raw string, that should not be quoted or having colors, nobody use them, it's not a big deal
|
Thank you for your contribution, i tested in-game and it was working fine for both of them ! |
… + bump (custom-block & crafter) to support 26.2 * Update clicked_bed.json clicked_bed.json 26.2 porting and restrictive fix * Update slept_in_bed.json slept_in_bed.json 26.2 port and restrictive fix * Update clicked_lockable_block.json clicked_lockable_block 26.2 port and restrictive fx * Update check_lock.mcfunction check_lock.mcfunction 26.2 port and capitaization fix * Update east.mcfunction east.mcfunction 26.2 port and capitalization fix * Update north.mcfunction north.mcfunction 26.2 port and capitalization fix * Update south.mcfunction south.mcfunction 26.2 port and capitalization fix * Update west.mcfunction west.mcfunction 26.2 port and capitalization fix * Update clicked_bed.mcfunction clicked_bed.mcfunction removed occupied_empty check due to optimizations in clicked_bed.json advancement file. * Update clicked_bed.json * Update slept_in_bed.json * Update clicked_lockable_block.json * fix: raw message should not have quotes nor colors * chore: bumping libs and minecraft version --------- Co-authored-by: edayot <pro.e.dayot@gmail.com>
Overview
Fixes #62
This PR fixes vanilla Actionbar block interaction detection and ports the
affected Actionbar advancements to the Minecraft 26.2 data pack format.
Problem
The Actionbar library currently uses
minecraft:item_used_on_blocktodetect interactions with vanilla blocks.
This is too restrictive for reproducing vanilla Actionbar behavior.
For example, right-clicking a lockable block with a stick does not trigger
item_used_on_block, while placing a block does.As a result, some legitimate block interactions do not produce the expected
Actionbar message.
Changes
minecraft:item_used_on_blockwithminecraft:any_block_usewhere generic block interaction is required.
minecraft:air.requirementssections where only a singlecriterion remains.
occupiedandunoccupiedcriteria for beds.tagtoblocks.Lockblock data field tolock.conditions.locationfromslept_in_bed.json.Bed interactions
clicked_bed.jsonpreviously had four criteria:unoccupiedoccupiedunoccupied_emptyoccupied_emptyThe empty-hand criteria were removed because
any_block_usecan detectthe block interaction directly.
The advancement now has two criteria:
unoccupiedoccupiedThis preserves the distinction needed by the Actionbar implementation
while avoiding duplicate interaction criteria.
Lockable blocks
clicked_lockable_block.jsonnow uses a singleany_block_usecriterion.It checks that:
lockableblock tag.The previous empty-hand criterion and requirements section are no longer
needed.
26.2 compatibility
The affected block predicates have been updated from:
to:
The container lock check has also been updated from the legacy
Lockblock data field to the current
lockfield.The
slept_in_bedadvancement no longer uses the obsolete top-levelconditions.locationfield.Testing
Tested the Actionbar interactions for:
The Actionbar library also builds successfully with Beet.