Published Dec 1st, 2022, 12/1/22 7:55 pm
- 556 views, 1 today
- 30 downloads, 0 today
2
CREATED IN VERSION 1.18.2
This is a test ground for my map.
It mainly covers how you can make data arrays in minecraft and turn it into a database for players in a Vanilla game.
In order to check if the target element in the array is the same as the target player (may it be a save inventory target or load inventory target), the array will check if its UUID matches with the player's UUID.
It goes something like,
scoreboard players reset @s success_count
execute as player if score @s uuid_x1 @s uuid_y1 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x2 @s uuid_y2 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x3 @s uuid_y3 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x4 @s uuid_y4 run scoreboard players add @s success_count 1
execute if score @s success_count matches 4 run function <this is where you run the load/save function if the array matches with the player's UUID>
uuid_x1 refers to the player's first UUID value.
uuid_y1 refers to the targeted element's first UUID value from the array.
Anyway, right now, the items do not save at specific item slots. It seems unnecessary at the moment, but it might be crucial, so I'll try to do a workaround for it.
This is a test ground for my map.
It mainly covers how you can make data arrays in minecraft and turn it into a database for players in a Vanilla game.
In order to check if the target element in the array is the same as the target player (may it be a save inventory target or load inventory target), the array will check if its UUID matches with the player's UUID.
It goes something like,
scoreboard players reset @s success_count
execute as player if score @s uuid_x1 @s uuid_y1 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x2 @s uuid_y2 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x3 @s uuid_y3 run scoreboard players add @s success_count 1
execute as player if score @s uuid_x4 @s uuid_y4 run scoreboard players add @s success_count 1
execute if score @s success_count matches 4 run function <this is where you run the load/save function if the array matches with the player's UUID>
uuid_x1 refers to the player's first UUID value.
uuid_y1 refers to the targeted element's first UUID value from the array.
Anyway, right now, the items do not save at specific item slots. It seems unnecessary at the moment, but it might be crucial, so I'll try to do a workaround for it.
Progress | 100% complete |
Tags |
5786263
2
Create an account or sign in to comment.