Skip to content

Commit 28d6262

Browse files
committed
fix: fixed upgrading issues
1 parent b9edbd4 commit 28d6262

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/main.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ execute as @a run commands player
197197
# on login, chk name change
198198
execute unless score @s rx.pdb.counter = $global rx.pdb.counter
199199
run function ../uuid/check
200-
scoreboard players operation @s rx.pdb.counter = $global rx.pdb.counter
201200
202201
# list trigger
203202
execute unless score @s rx.pdb.list matches 0

src/upgrade.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@ criteria:
3131
```mcfunction
3232
# @function upgrade/player
3333

34-
execute if score @s rx.uuid0 = @s rx.uuid0 unless entity @s[advancements={rx.playerdb:upgrade/v1tov2=true}] run function ./v1tov2/player
34+
execute if score @s rx.uuid0 = @s rx.uuid0
35+
unless entity @s[advancements={rx.playerdb:upgrade/v1tov2=true}]
36+
run function ./v1tov2/player
3537
```
3638

3739
```mcfunction
3840
# @function upgrade/v1tov2/player
3941
#> Quickly migrate has entry
40-
execute if score @s rx.pdb.hasEntry matches 0.. run
41-
scoreboard players operation @s rx.pdb.has_entry = @s rx.pdb.hasEntry
42-
scoreboard players operation $uid rx.temp = @s rx.uuid0
42+
execute if score @s rx.pdb.HasEntry matches 0.. run
43+
scoreboard players operation @s rx.pdb.has_entry = @s rx.pdb.HasEntry
44+
45+
data modify storage rx.playerdb:temp UUID set from entity @s UUID
4346
function {{ ctx.generate.path('uuid/select') }}
44-
execute store result storage rx.playerdb:main uuid[{selected:1b}].entries[-1].has_entry byte 1 run scoreboard players get @s rx.pdb.has_entry
47+
execute store result storage rx.playerdb:main uuid[{selected:1b}].entries[-1].has_entry byte 1
48+
run scoreboard players get @s rx.pdb.has_entry
4549
data remove storage rx.playerdb:main uuid[{selected:1b}].entries[-1].hasEntry
50+
scoreboard players reset @s rx.pdb.HasEntry
4651
tellraw @a[tag=rx.admin] from rx.playerdb:upgrade/v1tov2/player
4752
```

0 commit comments

Comments
 (0)