Skip to content

Commit

Permalink
rx: fix dim stuff + books -1 when manual
Browse files Browse the repository at this point in the history
  • Loading branch information
RitikShah committed Oct 12, 2020
1 parent fc81187 commit 6060ad3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions data/rx.ec/functions/upgrade/gen.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions data/rx.ec/functions/upgrade/root.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6060ad3

Please sign in to comment.