-
-
Notifications
You must be signed in to change notification settings - Fork 66
Blossoming Pots #1070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Bloo-dev
merged 60 commits into
Gamemode4Dev:master
from
runcows:gm4-blossoming-pots-intial
Feb 9, 2025
Merged
Blossoming Pots #1070
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
b20c7fb
Initial Commit
runcows 85a3579
Refactor to only summon displays as they are used.
runcows 884bc5c
Added main types
runcows 6488bd1
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows b85c91a
slight corrections in set_storages
runcows a756fc1
Edit raycasts to use player.block_interaction_range
runcows 25f2d10
Added overlay for block_interaction_range since mojang removed the pl…
runcows 43398e1
Cleaning up some comments
runcows 669528f
Remove overlay because I didn't need to do it at all
runcows 0a18491
Removed stages and plantables talked about in meeting. Still need to …
runcows 3f42c46
Fix decorated pot plants not initializing when more items than stages
runcows 0d1e89f
Changes to plantables as discussed
runcows 4b10837
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 30340bf
Added overlay for 1.21.4 and changed storage version_history array to…
runcows e2aab6e
Fix decorated pot temp marker not being removed when pot is empty
runcows 3f5955f
Simplify block interaction range raycast range to not need scoreboard…
runcows 8d0e9ff
Changes from Bloo's comments
runcows 7ce25a8
Adding icon
runcows d5a1a67
Fixing my new entry in contributors.json not being inserted alphabeti…
runcows f55f575
Remove cocoa beans from README
runcows 8de3e09
Fix break and replace partial plant cannibalizing
runcows 002d60c
Fix plant rotation not being locked for newly summoned displays of a …
runcows da4351a
Implement Bloo's suggestion for in_pot changes to not need to select …
runcows 63a4bf3
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows a897a52
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 9556ff8
Add webp animation (20fps, compressed to 351 KB)
runcows a2035fb
Change my contributors.json link to bluesky for upcoming changes
runcows 542d9b0
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 9ae9e04
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 7db3bcb
Update header of gm4_blossoming_pots/data/gm4_blossoming_pots/functio…
runcows 8b19a34
Change function header "with" lines to follow the style bloo specifie…
runcows dad1bd0
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 06ed2ae
Change as_player -> as marker selectors to limit 1
runcows bd40b5b
Change player rotation data to use storage instead of marker data
runcows b5e4698
Fix empty hand scenario being overlooked by player rotation changes
runcows 4127daf
Change empty hand interact on flower pot to summon an item at players…
runcows ebff299
Assorted changes from review session
runcows a07dd26
Rename advancements
runcows eae18a5
Refactor vanilla flower pot handling
runcows 362ba7c
Comments on potential changes
runcows 6db62ad
Refactor decorated pot handling
runcows 1c81619
Rename vanilla_pot_handling/in_pot
runcows 5331209
Refactor flower pot handling
runcows 9822155
Function header changes
runcows 8100f28
Change distance range to be self consistent with module
runcows 264108e
Condense flower pot clean up
runcows 4c96a48
Combine like selectors into one function
runcows b02c00e
Comment format change
runcows bdcf7d9
Fix temp storage not being reset
runcows ff1b1c9
Remove player nbt UUID check
runcows 0fdcddc
Fix issues from changes
runcows c698378
Merge branch 'master' of https://github.com/Gamemode4Dev/GM4_Datapack…
runcows 0eba8db
Wrap marker data in gm4_blossoming_pots tag
runcows b282b53
Replace FallDistance stage tracking with Scoreboard
runcows 5f30f5f
Update gm4_blossoming_pots/beet.yaml
runcows e83f651
Update gm4_blossoming_pots/beet.yaml
runcows cc83d68
Update gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorate…
runcows fd7ca5e
Merge branch 'gm4-blossoming-pots-intial' of https://github.com/runco…
runcows ff074b0
Fix main marker cleanup macro not reflecting change in marker data wr…
runcows b0f22d5
Fix anchored eyes not moving execution context on first raycast loop
runcows File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Blossoming Pots<!--$headerTitle--><!--$pmc:delete--> | ||
|
|
||
| Decorated Pots and Flower Pots extended to allow all kinds of things to be placed in them! Decorate in Style! <!--$pmc:headerSize--> | ||
|
|
||
| ### Features | ||
| - Some plants have multiple different heights or options depending on how many items you put in the pot. | ||
| - Directional plants are placed oriented towards you. | ||
| - Allows you to plant the following | ||
| - All Flowers (including 2 tall) | ||
| - All Saplings (including azaleas and propagules) | ||
| - All Leaves | ||
| - Cactus | ||
| - All Fungi | ||
| - All Dead / Alive Coral & Coral Fans! | ||
| - Nether Roots & Vines | ||
| - Tall & Short Grass | ||
| - Tall & Short Ferns | ||
| - Dead Bush | ||
| - All Lush Cave Plants | ||
| - Sweet Berry Bush | ||
| - Sea Pickle | ||
| - Most Seeds | ||
| - Netherwart | ||
| - Chorus Flowers | ||
| - All Amethyst Buds & Clusters | ||
| - Dripstone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| id: gm4_blossoming_pots | ||
| name: Blossoming Pots | ||
| version: 3.1.X | ||
|
|
||
| data_pack: | ||
| load: . | ||
| overlays: | ||
| - formats: | ||
| min_inclusive: 61 | ||
| max_inclusive: 61 | ||
| directory: since_61 | ||
|
|
||
| resource_pack: | ||
| load: . | ||
|
|
||
| pipeline: | ||
| - gm4.plugins.extend.module | ||
|
|
||
| meta: | ||
| gm4: | ||
| versioning: | ||
| schedule_loops: [main] | ||
| website: | ||
| description: Decorated Pots and Flower Pots extended to allow all kinds of things to be placed in them! Decorate in Style! | ||
| recommended: [] | ||
| notes: [] | ||
| #modrinth: | ||
| #project_id: null | ||
| #smithed: | ||
| #pack_id: null | ||
| planetminecraft: | ||
| uid: null | ||
| video: null | ||
| wiki: https://wiki.gm4.co/wiki/Blossoming_Pots | ||
| credits: | ||
| Creator: | ||
| - runcows | ||
| Icon Design: | ||
| - runcows | ||
24 changes: 24 additions & 0 deletions
24
gm4_blossoming_pots/data/gm4_blossoming_pots/advancement/interact_with_decorated_pot.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "criteria": { | ||
| "use_pot": { | ||
| "conditions": { | ||
| "location": [ | ||
| { | ||
| "condition": "minecraft:location_check", | ||
| "predicate": { | ||
| "block": { | ||
| "blocks": [ | ||
| "minecraft:decorated_pot" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "trigger": "minecraft:any_block_use" | ||
| } | ||
| }, | ||
| "rewards": { | ||
| "function": "gm4_blossoming_pots:decorated/as_player" | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
gm4_blossoming_pots/data/gm4_blossoming_pots/advancement/interact_with_flower_pot.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "criteria": { | ||
| "use_pot": { | ||
| "conditions": { | ||
| "location": [ | ||
| { | ||
| "condition": "minecraft:location_check", | ||
| "predicate": { | ||
| "block": { | ||
| "blocks": [ | ||
| "minecraft:flower_pot" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "trigger": "minecraft:any_block_use" | ||
| } | ||
| }, | ||
| "rewards": { | ||
| "function": "gm4_blossoming_pots:flower/as_player" | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
...lossoming_pots/data/gm4_blossoming_pots/advancement/interact_with_vanilla_flower_pot.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "criteria": { | ||
| "use_pot": { | ||
| "conditions": { | ||
| "location": [ | ||
| { | ||
| "condition": "minecraft:location_check", | ||
| "predicate": { | ||
| "block": { | ||
| "blocks": "#gm4_blossoming_pots:potted_plants" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| }, | ||
| "trigger": "minecraft:any_block_use" | ||
| } | ||
| }, | ||
| "rewards": { | ||
| "function": "gm4_blossoming_pots:vanilla_pot_handling/as_player" | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/as_player.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Raycasts for pot the player interacted with, then proceeds if necessary | ||
| # @s = player who interacted with a decorated pot | ||
| # at @s | ||
| # run from advancement gm4_blossoming_pots:interact_with_decorated_pot | ||
|
|
||
| # Reset advancement | ||
| advancement revoke @s only gm4_blossoming_pots:interact_with_decorated_pot | ||
| # Reset temp | ||
| data remove storage gm4_blossoming_pots:decorated_pots temp | ||
|
|
||
| function gm4_blossoming_pots:decorated/get_player_rotation | ||
| # raycast | ||
| execute store result score @s gm4_blossoming_pots.range run attribute @s minecraft:block_interaction_range get 200 | ||
| execute anchored eyes positioned ^ ^ ^ run function gm4_blossoming_pots:decorated/raycast |
9 changes: 9 additions & 0 deletions
9
...blossoming_pots/data/gm4_blossoming_pots/function/decorated/check_if_pot_empty.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Checks if decorated pot has any items inside before trying to instantiate macro | ||
| # @s = temp marker inside decorated pot | ||
| # at @s align xyz positioned ~.5 ~.5 ~.5 | ||
| # with {id, count} | ||
| # run from decorated/raycast | ||
|
|
||
| # kills marker and returns, if pot empty | ||
| execute unless data block ~ ~ ~ item run return run kill @s | ||
| function gm4_blossoming_pots:decorated/set_count with block ~ ~ ~ item |
13 changes: 13 additions & 0 deletions
13
...lossoming_pots/data/gm4_blossoming_pots/function/decorated/get_player_rotation.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Gets player rotation data for later | ||
| # @s = player who interacted with a decorated pot | ||
| # at @s | ||
| # run from decorated/as_player | ||
|
|
||
| # player facing west | ||
| execute if entity @s[y_rotation=45..135] unless entity @s[y_rotation=45] run return run data modify storage gm4_blossoming_pots:decorated_pots temp.rotation set value 0 | ||
| # player facing north | ||
| execute if entity @s[y_rotation=135..225] unless entity @s[y_rotation=135] run return run data modify storage gm4_blossoming_pots:decorated_pots temp.rotation set value 90 | ||
| # player facing east | ||
| execute if entity @s[y_rotation=225..315] unless entity @s[y_rotation=225] run return run data modify storage gm4_blossoming_pots:decorated_pots temp.rotation set value 180 | ||
| # player facing south | ||
| execute if entity @s[y_rotation=315..405] unless entity @s[y_rotation=315] run return run data modify storage gm4_blossoming_pots:decorated_pots temp.rotation set value -90 |
17 changes: 17 additions & 0 deletions
17
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/in_decorated_pot.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Checks the temp markers physical location in the block, to see if it is in the collision box of the decorated pot | ||
| # @s = temp marker summoned in parent function | ||
| # at @s | ||
| # run from decorated/raycast | ||
|
|
||
| # merge marker data for if it doesn't get killed | ||
| data merge entity @s {Tags:["gm4_blossoming_pots.temp.decorated_pot","smithed.strict","smithed.entity"],CustomName:'{"text":"gm4_blossoming_pots.temp_marker"}'} | ||
|
|
||
| # if temp marker in physical hit box, return 1 | ||
| # dxdydz all 0 bc of MC-123441. | ||
| execute at @s align xyz positioned ~0.062499 ~ ~0.062499 if entity @s[dx=0,dy=0,dz=0] \ | ||
| at @s align xyz positioned ~-0.062499 ~ ~-0.062499 if entity @s[dx=0,dy=0,dz=0] \ | ||
| run return 1 | ||
|
|
||
| # else, kill marker, return fail | ||
| kill @s | ||
| return fail |
7 changes: 7 additions & 0 deletions
7
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/play_sound.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Literally just plays sound | ||
| # @s = temp marker inside decorated pot | ||
| # with {place_sound} | ||
| # at @s align xyz positioned ~.5 ~.5 ~.5 | ||
| # run from decorated/prepare_data | ||
|
|
||
| $playsound $(place_sound) block @a[distance=..16] ~ ~ ~ |
28 changes: 28 additions & 0 deletions
28
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/prepare_data.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Sets up loop for plant stage changes | ||
| # @s = temp marker inside decorated pot | ||
| # at @s align xyz positioned ~.5 ~.5 ~.5 | ||
| # with {id, count} | ||
| # run from decorated/set_count | ||
|
|
||
| # early return if displays are already on desired stage, does not check plant type | ||
| $execute if score @e[type=minecraft:block_display,distance=..0.1,tag=gm4_blossoming_pots.display.decorated_pot,limit=1] gm4_blossoming_pots.display_stage $(count) run return run kill @s | ||
|
|
||
| $execute store result score $array_len gm4_blossoming_pots.loop run data get storage gm4_blossoming_pots:decorated_pots $(id).$(count) | ||
|
|
||
| # check how many block displays there are present, if there are more than we need, kill all of them and resummon after. This solves partial display cannibalizing | ||
| execute store result score $display_count gm4_blossoming_pots.loop if entity @e[type=minecraft:block_display,tag=gm4_blossoming_pots.display.decorated_pot,distance=..0.1] | ||
| execute if score $array_len gm4_blossoming_pots.loop < $display_count gm4_blossoming_pots.loop run kill @e[type=minecraft:block_display,tag=gm4_blossoming_pots.display.decorated_pot,distance=..0.1] | ||
|
|
||
| # only use rotation from player if there's no plant there, else overwrite with the plant's rotation value | ||
| data modify storage gm4_blossoming_pots:decorated_pots temp.rotation set from entity @e[type=minecraft:block_display,tag=gm4_blossoming_pots.display.decorated_pot,distance=..0.1,limit=1] Rotation[0] | ||
|
|
||
| # initialize other loop data | ||
| execute store result storage gm4_blossoming_pots:decorated_pots temp.score int 1 run scoreboard players set @s gm4_blossoming_pots.loop 0 | ||
| $data merge storage gm4_blossoming_pots:decorated_pots {temp:{id:"$(id)",count:$(count)}} | ||
| $data modify storage gm4_blossoming_pots:decorated_pots temp.data set from storage gm4_blossoming_pots:decorated_pots $(id).$(count)[0] | ||
|
|
||
| function gm4_blossoming_pots:decorated/set_displays with storage gm4_blossoming_pots:decorated_pots temp | ||
|
|
||
| # play sound | ||
| $execute if score @s gm4_blossoming_pots.sound matches 1 \ | ||
| run function gm4_blossoming_pots:decorated/play_sound with storage gm4_blossoming_pots:decorated_pots $(id) |
15 changes: 15 additions & 0 deletions
15
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/raycast.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Main loop for raycasting for the decorated pot the player interacted with | ||
| # @s = player who interacted with a decorated pot | ||
| # at @s anchored eyes, then marched forward 0.005 over and over | ||
| # run from decorated/as_player and self | ||
|
|
||
| # if current location is within the decorated pots hit box, summon a temp marker, set its data with the player rotation, and exit raycast | ||
| execute if block ~ ~ ~ minecraft:decorated_pot \ | ||
| summon minecraft:marker if function gm4_blossoming_pots:decorated/in_decorated_pot \ | ||
| at @s align xyz positioned ~.5 ~.5 ~.5 \ | ||
| run return run function gm4_blossoming_pots:decorated/check_if_pot_empty | ||
|
|
||
| scoreboard players remove @s gm4_blossoming_pots.range 1 | ||
|
|
||
| # repeat until find decorated pot or out of range | ||
| execute if score @s gm4_blossoming_pots.range matches 1.. positioned ^ ^ ^0.005 run function gm4_blossoming_pots:decorated/raycast |
22 changes: 22 additions & 0 deletions
22
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/set_count.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # Decides if decorated/prepare_data should use maximum or count | ||
| # @s = temp marker inside decorated pot | ||
| # at @s align xyz positioned ~.5 ~.5 ~.5 | ||
| # with {id, count} | ||
| # run from decorated/check_if_pot_empty | ||
|
|
||
| # early return for unsupported item | ||
| $execute unless data storage gm4_blossoming_pots:decorated_pots $(id) run return run kill @s | ||
|
|
||
| $execute store result score @s gm4_blossoming_pots.loop run data get storage gm4_blossoming_pots:decorated_pots $(id).maximum | ||
| # if pot over maximum use maximum as count | ||
| $execute unless score @s gm4_blossoming_pots.loop matches $(count).. \ | ||
| run data modify storage gm4_blossoming_pots:decorated_pots temp.count set from storage gm4_blossoming_pots:decorated_pots $(id).maximum | ||
| # if not, just use count as is | ||
| $execute if score @s gm4_blossoming_pots.loop matches $(count).. run data modify storage gm4_blossoming_pots:decorated_pots temp.count set value $(count) | ||
|
|
||
| # set id as well | ||
| $data merge storage gm4_blossoming_pots:decorated_pots {temp:{id:"$(id)"}} | ||
|
|
||
| function gm4_blossoming_pots:decorated/prepare_data with storage gm4_blossoming_pots:decorated_pots temp | ||
|
|
||
| kill @s |
25 changes: 25 additions & 0 deletions
25
gm4_blossoming_pots/data/gm4_blossoming_pots/function/decorated/set_displays.mcfunction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Main Loop for setting displays to desired stage | ||
| # @s = temp marker inside decorated pot | ||
| # at @s align xyz positioned ~.5 ~.5 ~.5 | ||
| # with {rotation, score, id, count, data} | ||
| # run from decorated/prepare_data and self | ||
|
|
||
| # summon if needed | ||
| $execute unless entity @e[type=minecraft:block_display,distance=..0.1,tag=gm4_blossoming_pots.display.decorated_pot.$(score),limit=1] \ | ||
| run summon minecraft:block_display ~ ~ ~ {view_range:0.7935f,Tags:["gm4_blossoming_pots.display.decorated_pot","gm4_blossoming_pots.display.decorated_pot.$(score)","smithed.entity"],Rotation:[$(rotation)f,0f]} | ||
| # merge data and store the success | ||
| $execute store success score @s gm4_blossoming_pots.merge_success \ | ||
| run data merge entity @e[type=minecraft:block_display,distance=..0.1,tag=gm4_blossoming_pots.display.decorated_pot.$(score),limit=1] $(data) | ||
| # set display_stage score to prevent running the loop when the displays are already on the right stage number | ||
| $scoreboard players set @e[type=minecraft:block_display,distance=..0.1,tag=gm4_blossoming_pots.display.decorated_pot.$(score),limit=1] gm4_blossoming_pots.display_stage $(count) | ||
|
|
||
| # if a single merge success set sound to play | ||
| execute if score @s gm4_blossoming_pots.merge_success matches 1 run scoreboard players set @s gm4_blossoming_pots.sound 1 | ||
|
|
||
| # increment score | ||
| execute store result storage gm4_blossoming_pots:decorated_pots temp.score int 1 run scoreboard players add @s gm4_blossoming_pots.loop 1 | ||
|
|
||
| # sets temp.data to next score's data | ||
| function gm4_blossoming_pots:decorated/set_temp_data with storage gm4_blossoming_pots:decorated_pots temp | ||
| # run again if needed | ||
| execute unless score @s gm4_blossoming_pots.loop >= $array_len gm4_blossoming_pots.loop run function gm4_blossoming_pots:decorated/set_displays with storage gm4_blossoming_pots:decorated_pots temp |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.