Skip to content

Commit

Permalink
feat: implementing compacting drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
edayot committed Aug 8, 2023
1 parent 96b089f commit 32a22f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function simpledrawer:impl/new_drawer/working/io/compacting_input/none:
scoreboard players operation #total_item simpledrawer.math += #nb_ingot simpledrawer.math
scoreboard players operation #total_item simpledrawer.math += #nb_nugget simpledrawer.math

execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #total_item simpledrawer.math
execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #nb_block simpledrawer.math
function simpledrawer:impl/new_drawer/working/io/compacting_input/display_items


Expand Down Expand Up @@ -223,7 +223,7 @@ function simpledrawer:impl/new_drawer/working/io/compacting_input/normal:
scoreboard players operation #total_item simpledrawer.math += #nb_ingot simpledrawer.math
scoreboard players operation #total_item simpledrawer.math += #nb_nugget simpledrawer.math

execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #total_item simpledrawer.math
execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #nb_block simpledrawer.math
function simpledrawer:impl/new_drawer/working/io/compacting_input/display_items
execute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ function simpledrawer:impl/new_drawer/working/io/compacting_output/normal:
scoreboard players operation #total_item simpledrawer.math += #nb_ingot simpledrawer.math
scoreboard players operation #total_item simpledrawer.math += #nb_nugget simpledrawer.math

execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #total_item simpledrawer.math
execute store result entity @s item.tag.simpledrawer.globalCount int 1 run scoreboard players get #nb_block simpledrawer.math
function simpledrawer:impl/new_drawer/working/io/compacting_input/display_items
execute
if score #total_item simpledrawer.math matches 0
run function simpledrawer:impl/new_drawer/working/io/compacting_output/normal/clear_all:
scoreboard players set @s simpledrawer.new_drawer.slot_count 1
data modify entity @s item.tag.simpledrawer.Items set value []
data modify entity @s item.tag.simpledrawer.globalCount set value 0

Expand Down

0 comments on commit 32a22f9

Please sign in to comment.