Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @skyaccess
# @optional

execute positioned ~1.5 ~1.5 ~1.5 run function gm4_block_compressors:machine/create
item replace block ~1 ~1 ~1 container.0 with cobblestone 7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~ ~1 ~
# @optional

execute positioned ~1.5 ~1.5 ~1.5 run function gm4_block_compressors:machine/create
give @s diamond_pickaxe
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Make sure that the armor stand with fixed UUID is present
assert entity 344d47-4-4-4-f04ce104d
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~ ~1 ~
# @optional

fill ~2 ~1 ~ ~2 ~1 ~2 gray_concrete
give @s item_frame
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~1 ~1 ~
# @optional

loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning
execute at @s run tp @s ~ ~ ~ facing ~ ~-1.5 ~1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~1 ~1 ~
# @optional

summon pillager ~1.5 ~1 ~1.5
loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~1 ~1 ~
# @optional

setblock ~1 ~ ~1 prismarine_bricks
loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~1 ~1 ~
# @optional

summon pillager ~1.5 ~1 ~1.5
loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @template gm4:test_platform
# @dummy ~1 ~1 ~
# @optional

setblock ~1 ~ ~1 purpur_block
loot give @s loot gm4_lightning_in_a_bottle:items/splash_bottle_of_lightning
Expand Down
2 changes: 1 addition & 1 deletion lib_forceload/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ meta:
gm4:
versioning:
extra_version_injections:
advancements: [dimension_marking]
advancements: [change_dimension, join]
smithed:
pack_id: gm4_lib_forceload
credits:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"criteria": {
"change_inventory": {
"change_dimension": {
"trigger": "minecraft:changed_dimension"
}
},
"rewards": {
"function": "gm4_forceload:check_dimension"
"function": "gm4_forceload:mark_dimension"
}
}
10 changes: 10 additions & 0 deletions lib_forceload/data/gm4_forceload/advancement/join.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"criteria": {
"join": {
"trigger": "minecraft:tick"
}
},
"rewards": {
"function": "gm4_forceload:mark_dimension"
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# run from load and mark_dimension
# run from init_ow_chunk and mark_dimension

forceload remove 29999999 7134
forceload add 29999999 7134
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# @s = marker entity to forceload overworld
# run from load

tag @s add gm4_dimension
data merge entity @s {CustomName:"minecraft:overworld"}

function gm4_forceload:init_chunk
setblock 29999998 1 7131 minecraft:repeating_command_block{auto:1b,Command:"function #gm4_forceload:command_block_tick"}
summon armor_stand 29999999 0 7135 {UUID:[I;3427655,262148,262159,80613453],Invulnerable:1b,Invisible:1b,Marker:1b,Tags:["smithed.entity","smithed.strict"],CustomName:"lib_forceload_armorstand"}
Expand All @@ -9,4 +12,3 @@ summon armor_stand 29999999 0 7135 {UUID:[I;3427655,262148,262159,80613453],Invu
scoreboard players add #max gm4_dimension 1
scoreboard players operation @s gm4_dimension = #max gm4_dimension
tp @s 29999999 0 7135
tag @s remove gm4_new_dimension
4 changes: 1 addition & 3 deletions lib_forceload/data/gm4_forceload/function/load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ scoreboard objectives add gm4_dimension dummy
gamerule command_block_output false

execute store success score $initialized gm4_dimension if block 29999998 1 7133 birch_wall_sign
execute if score $initialized gm4_dimension matches 0 run summon marker ~ 0 ~ {CustomName:"minecraft:overworld",Tags:["gm4_dimension","gm4_new_dimension"]}
execute if score $initialized gm4_dimension matches 0 as @e[type=marker,tag=gm4_new_dimension,limit=1] run function gm4_forceload:init_ow_chunk
function gm4_forceload:load_wait
execute if score $initialized gm4_dimension matches 0 positioned ~ 0 ~ summon marker run function gm4_forceload:init_ow_chunk

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# @s = player who entered a new dimension
# run from advancement dimension_marking and function load
# @s = player who changed dimensions or joined for the first time
# run from advancements "change_dimension" and "join"

function gm4_forceload:init_chunk
advancement revoke @s only gm4_forceload:change_dimension

# spawn dimension marker
summon minecraft:marker ~ 0 ~ {Tags:["gm4_dimension","gm4_new_dimension"]}
# exit if the dimension is already initialized
execute if block 29999998 1 7133 birch_wall_sign run return 0

# give dimension marker a scoreboard ID and name
tag @s add gm4_in_new_dimension
execute as @e[type=marker,tag=gm4_new_dimension,limit=1] in minecraft:overworld run function gm4_forceload:set_marker_data
function gm4_forceload:init_chunk

# remove temporary tags
# spawn dimension marker with scoreboard ID and name
tag @s add gm4_in_new_dimension
execute summon minecraft:marker in minecraft:overworld run function gm4_forceload:set_marker_data
tag @s remove gm4_in_new_dimension
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ data modify entity @s CustomName set from block 29999998 1 7133 front_text.messa

# move to forceloaded chunk
execute at @s run tp @s 29999999 0 7135
tag @s remove gm4_new_dimension
tag @s add gm4_dimension
Loading