Skip to content

Commit

Permalink
Update to 1.20.2-pre2, reset random sequences based on Fetchr seed
Browse files Browse the repository at this point in the history
  • Loading branch information
NeunEinser committed Sep 9, 2023
1 parent 9f60160 commit 59ffa38
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.insertSpaces": false, // TABS!!!
"files.eol": "\n",
"datapack.env.cmdVersion": "1.20",
"datapack.env.dataVersion": "1.20.1",
"datapack.env.dataVersion": "1.20.2-pre2",
"datapack.env.defaultVisibility": "public",
"datapack.env.dependsOnVanilla": true,
"datapack.env.detectionDepth": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ kill @e[type=minecraft:marker, tag=fetchr.command_cloud, limit=1]
function neun_einser.math:random/next_int
execute store result storage fetchr:card spawnLocation int 1 run scoreboard players get $rand.seed 91.math.io

function neun_einser.math:random/next_int
execute store result storage fetchr:card randomSequenceData.seed int 1 run scoreboard players get $rand.seed 91.math.io

# Reset teams
data remove storage fetchr:card teams
data modify storage fetchr:card teams append value {id: "fetchr:none"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kill @e[y=-128, distance=..1]
execute if score $start_game.countdown fetchr.tmp matches 1.. run tellraw @a[predicate=fetchr:is_in_game] {"score":{"name": "$start_game.countdown", "objective": "fetchr.tmp"}}
execute if score $start_game.countdown fetchr.tmp matches 1.. as @a[predicate=fetchr:is_in_game] at @s run playsound minecraft:block.note_block.pling voice @s ~ ~ ~ 1 2

execute if score $start_game.countdown fetchr.tmp matches 0 at @e[type=minecraft:marker, tag=fetchr.spawn] positioned over motion_blocking_no_leaves run function fetchr:game/start/start_game
execute if score $start_game.countdown fetchr.tmp matches 0 at @e[type=minecraft:marker, tag=fetchr.spawn] positioned over motion_blocking_no_leaves run function fetchr:game/start/start_game with storage fetchr:card randomSequenceData

scoreboard players remove $start_game.countdown fetchr.tmp 1
execute if score $start_game.countdown fetchr.tmp matches 0.. run schedule function fetchr:game/start/countdown 1s
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# @internal

scoreboard players set $game_state fetchr.state 1
execute if score $pregen_status fetchr.state matches 0 in fetchr:default run function fetchr:game/start/pre_gen/start
execute if score $pregen_status fetchr.state matches 0 in fetchr:default run function fetchr:game/start/pre_gen/start with storage fetchr:card randomSequenceData
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# @within function fetchr:game/start/spawn_skybox

scoreboard players set $pregen_status fetchr.state 1
$random reset * $(seed) false

gamerule doDaylightCycle false
time set 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

execute as @e[distance=..10000] run function fetchr:game/start/unfreeze_entity

$random reset * $(seed) false

forceload remove all
forceload add 0 0
forceload add ~ ~
Expand Down
3 changes: 2 additions & 1 deletion datapack/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"pack": {
"pack_format": 15,
"pack_format": 18,
"supported_formats": {"min_inclusive": 16, "max_inclusive": 18},
"description": "Fetchr"
}
}
2 changes: 1 addition & 1 deletion neunscript.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Fetchr",
"version": "5.1-rc1",
"mc": "1.20.1",
"mc": "1.20.2-pre2",
"target": "dist",
"vars": {
"version_long_name": "5.1 Release Candidate 1",
Expand Down
3 changes: 2 additions & 1 deletion resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"pack": {
"pack_format": 15,
"pack_format": 18,
"supported_formats": {"min_inclusive": 16, "max_inclusive": 18},
"description": "Fetchr resources"
}
}

0 comments on commit 59ffa38

Please sign in to comment.