From 6060ad35879da399c07b457cecff9d66ba993cdf Mon Sep 17 00:00:00 2001 From: Ritik Shah Date: Mon, 12 Oct 2020 14:15:32 -0700 Subject: [PATCH] rx: fix dim stuff + books -1 when manual --- data/rx.ec/functions/upgrade/gen.mcfunction | 4 ++-- data/rx.ec/functions/upgrade/root.mcfunction | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/data/rx.ec/functions/upgrade/gen.mcfunction b/data/rx.ec/functions/upgrade/gen.mcfunction index 3c6ab00..3876aba 100644 --- a/data/rx.ec/functions/upgrade/gen.mcfunction +++ b/data/rx.ec/functions/upgrade/gen.mcfunction @@ -14,8 +14,8 @@ data modify entity af-0-0-0-1 HandItems[0] set value {id:"minecraft:stick",Count scoreboard players operation $temp rx.temp = @s rx.ec.maxPage execute as af-0-0-0-1 run scoreboard players operation @s rx.ec.maxPage = $temp rx.temp execute as af-0-0-0-1 store result entity @s HandItems[0].tag.Enchantments[{id:"minecraft:aqua_affinity"}].lvl short 1 run scoreboard players get @s rx.ec.maxPage -execute as af-0-0-0-1 run loot spawn -30000000 60 1602 fish rx.ec:upgrade 1000 0 1000 mainhand -# say @e[type=item] +execute at @s as af-0-0-0-1 run loot spawn ~ ~1000 ~ fish rx.ec:upgrade ~ ~ ~ mainhand +say @e[type=item] execute as @e[type=item,nbt={Item:{tag:{rx:{ec:{spawned:1b}}}}}] run function rx.ec:upgrade/add_item # kill af-0-0-0-1 diff --git a/data/rx.ec/functions/upgrade/root.mcfunction b/data/rx.ec/functions/upgrade/root.mcfunction index 7d0b54e..a0f352e 100644 --- a/data/rx.ec/functions/upgrade/root.mcfunction +++ b/data/rx.ec/functions/upgrade/root.mcfunction @@ -40,11 +40,12 @@ execute if score $shulker rx.temp matches 1.. run loot replace entity @s enderch #> Transform into manual execute if score $book rx.temp matches 1.. run function rx.ec:manual +execute if score $book rx.temp matches 1.. store result storage rx:temp ec.upgrade.Count byte 1 run data get storage rx:temp ec.upgrade.Count 0.9999999999 -#> Return items unless book -execute if score $book rx.temp matches ..0 run data modify storage rx:temp ec.items append from storage rx:temp ec.upgrade -execute if score $book rx.temp matches ..0 run data remove storage rx:temp ec.upgrade.tag.display -execute if score $book rx.temp matches ..0 run data remove storage rx:temp ec.upgrade.tag.SkullOwner +#> Return items +data modify storage rx:temp ec.items append from storage rx:temp ec.upgrade +data remove storage rx:temp ec.upgrade.tag.display +data remove storage rx:temp ec.upgrade.tag.SkullOwner #> Test for upgrade items execute if score $shulker rx.temp matches 0 if score $book rx.temp matches ..0 run function rx.ec:upgrade/test