1
Help troubleshooting datapack function
I'm having trouble getting my function to work, its supposed to fill a huge area, 5x5 maps big and entire chunks within with air, then fabricate a new skyblock.
it doesnt do any of that, nor does it seem to work when im outside of the target chunks (which i thought was the purpose of using functions)
I don't know where i keep going wrong, but its ruining my plans for my skyblock map!
heres the function:
it doesnt do any of that, nor does it seem to work when im outside of the target chunks (which i thought was the purpose of using functions)
I don't know where i keep going wrong, but its ruining my plans for my skyblock map!
heres the function:
#e:reset
#summon first armor stand
summon minecraft:armor_stand ~4672 ~-64 ~4672 {NoGravity:1b,Tags:["move"]}
#move first armor stand and then summon another at relative position
#1
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#2
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#3
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#4
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#5
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#6
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#7
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#8
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#9
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#10
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#11
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#12
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#13
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#14
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#15
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#16
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#17
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#18
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#19
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#20
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#21
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#22
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#23
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#24
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#25
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#26
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#27
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#28
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#29
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#30
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#31
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#32
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#33
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#34
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#35
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#36
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#37
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#38
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#39
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#40
execute at @e[type=armor_stand,tag=move] run teleport @e[type=armor_stand,tag=move] ~ ~ ~16
execute at @e[type=armor_stand,tag=move] run summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Tags:["spawn1"]}
#2
execute at @e[type=minecraft:armor_stand,tag=spawn1] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn2"]}
#3
execute at @e[type=minecraft:armor_stand,tag=spawn2] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn3"]}
#4
execute at @e[type=minecraft:armor_stand,tag=spawn3] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn4"]}
#5
execute at @e[type=minecraft:armor_stand,tag=spawn4] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn5"]}
#6
execute at @e[type=minecraft:armor_stand,tag=spawn5] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn6"]}
#7
execute at @e[type=minecraft:armor_stand,tag=spawn6] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn7"]}
#8
execute at @e[type=minecraft:armor_stand,tag=spawn7] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn8"]}
#9
execute at @e[type=minecraft:armor_stand,tag=spawn8] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn9"]}
#10
execute at @e[type=minecraft:armor_stand,tag=spawn9] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn10"]}
#11
execute at @e[type=minecraft:armor_stand,tag=spawn10] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn11"]}
#12
execute at @e[type=minecraft:armor_stand,tag=spawn11] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn12"]}
#13
execute at @e[type=minecraft:armor_stand,tag=spawn12] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn13"]}
#14
execute at @e[type=minecraft:armor_stand,tag=spawn13] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn14"]}
#15
execute at @e[type=minecraft:armor_stand,tag=spawn14] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn15"]}
#16
execute at @e[type=minecraft:armor_stand,tag=spawn15] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn16"]}
#17
execute at @e[type=minecraft:armor_stand,tag=spawn16] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn17"]}
#18
execute at @e[type=minecraft:armor_stand,tag=spawn17] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn18"]}
#19
execute at @e[type=minecraft:armor_stand,tag=spawn18] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn19"]}
#20
execute at @e[type=minecraft:armor_stand,tag=spawn19] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn20"]}
#21
execute at @e[type=minecraft:armor_stand,tag=spawn20] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn21"]}
#22
execute at @e[type=minecraft:armor_stand,tag=spawn21] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn22"]}
#23
execute at @e[type=minecraft:armor_stand,tag=spawn22] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn23"]}
#24
execute at @e[type=minecraft:armor_stand,tag=spawn23] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn24"]}
#25
execute at @e[type=minecraft:armor_stand,tag=spawn24] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn25"]}
#26
execute at @e[type=minecraft:armor_stand,tag=spawn25] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn26"]}
#27
execute at @e[type=minecraft:armor_stand,tag=spawn26] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn27"]}
#28
execute at @e[type=minecraft:armor_stand,tag=spawn27] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn28"]}
#29
execute at @e[type=minecraft:armor_stand,tag=spawn28] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn29"]}
#30
execute at @e[type=minecraft:armor_stand,tag=spawn29] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn30"]}
#31
execute at @e[type=minecraft:armor_stand,tag=spawn30] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn31"]}
#32
execute at @e[type=minecraft:armor_stand,tag=spawn31] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn32"]}
#33
execute at @e[type=minecraft:armor_stand,tag=spawn32] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn33"]}
#34
execute at @e[type=minecraft:armor_stand,tag=spawn33] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn34"]}
#35
execute at @e[type=minecraft:armor_stand,tag=spawn34] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn35"]}
#36
execute at @e[type=minecraft:armor_stand,tag=spawn35] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn36"]}
#37
execute at @e[type=minecraft:armor_stand,tag=spawn36] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn37"]}
#38
execute at @e[type=minecraft:armor_stand,tag=spawn37] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn38"]}
#39
execute at @e[type=minecraft:armor_stand,tag=spawn38] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn39"]}
#40
execute at @e[type=minecraft:armor_stand,tag=spawn39] run summon minecraft:armor_stand ~16 ~ ~ {NoGravity:1b,Tags:["spawn40"]}
execute at @e[type=minecraft:armor_stand] run summon minecraft:armor_stand ~ ~ ~ {NoGraqvity:1b,Tags:["build"]}
execute at @e[type=minecraft:armor_stand,tag=build] run fill ~ -63 ~ ~15 63 ~15 minecraft:air replace
execute at @e[type=minecraft:armor_stand,tag=build] run fill ~ 64 ~ ~15 191 ~15 minecraft:air replace
execute at @e[type=minecraft:armor_stand,tag=build] run fill ~ 192 ~ ~15 319 ~15 minecraft:air replace
kill @e[type=minecraft:armor_stand]
summon minecraft:armor_stand ~5001 ~64 ~5001 {NoGravity:1b,Tags:["island"]}
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~1 ~-1 ~1 ~1 ~-1 ~1 minecraft:bedrock
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~2 ~ ~ ~ ~1 ~5 minecraft:dirt
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~5 ~ ~ ~ ~1 ~2 minecraft:dirt
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~2 ~2 ~ ~ ~2 ~5 minecraft:grass_block
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~5 ~2 ~ ~ ~2 ~2 minecraft:grass_block
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~1 ~1 ~1 ~1 ~1 ~1 minecraft:sand replace
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~4 ~1 ~1 ~4 ~1 ~1 minecraft:sand replace
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~1 ~1 ~4 ~1 ~1 ~4 minecraft:sand replace
execute at @e[type=minecraft:armor_stand,tag=island] run fill ~1 ~3 ~4 ~1 ~3 ~4 minecraft:oak_sapling[stage=1]
execute at @e[type=minecraft:armor_stand,tag=island] run setblock ~5 ~3 ~1 chest[facing=west]{Items:[{Slot:0,id:melon_slice,Count:1},{Slot:1,id:pumpkin,Count:1},{Slot:2,id:cactus,Count:1},{Slot:3,id:sugar_cane,Count:1},{Slot:4,id:bone,Count:2},{Slot:5,id:oak_sapling,Count:1},{Slot:6,id:ice,Count:2},{Slot:7,id:lava_bucket,Count:1},{Slot:8,id:beetroot_seeds,Count:1},{Slot:13,id:bread,Count:5},{Slot:20,id:leather_helmet,Count:1},{Slot:21,id:leather_chestplate,Count:1},{Slot:22,id:leather_leggings,Count:1},{Slot:23,id:leather_boots,Count:1}]} replace
kill @e[type=minecraft:armor_stand,tag=island]
2
To fix the chunk loading issue, you can force load the chunks at the beginning of the function, then remove the forceload at the end. Forceload is documented here.
As for the fill issue, I'm not sure why it won't work, though it may be related to your use of relative coordinates in the first summon command. It's also likely a problem that you only fill one row and column of chunks; you first summon markers along the z axis, then switch to the x axis. I would try to test it, but unfortunately that's not possible just now. Hopefully someone else can provide more help based on that.
As for the fill issue, I'm not sure why it won't work, though it may be related to your use of relative coordinates in the first summon command. It's also likely a problem that you only fill one row and column of chunks; you first summon markers along the z axis, then switch to the x axis. I would try to test it, but unfortunately that's not possible just now. Hopefully someone else can provide more help based on that.
is there a limit to how far the forceload coords can be apart from eachother?
edit: ive tested and found the limit to fit perfectly into a map sized area... which fits perfectly into my designs. >:3
edit: ive tested and found the limit to fit perfectly into a map sized area... which fits perfectly into my designs. >:3
