#[1.20.1 Datapack] place template returns success (1) but blocks do not generate at remote coordinat

1 messages · Page 1 of 1 (latest)

rapid helm
#

Hi everyone, I'm working on a PvP Tournament datapack. The goal is to generate multiple arenas starting at specific coordinates (e.g., 0 200 10000)

The Problem: My function runs a loop to place arenas. The command executes successfully according to the scoreboard (returns 1), entities (markers) are summoned correctly at the location, and players are teleported there. However, the actual blocks of the structure do not appear. The area remains empty air.

Context:

Version: 1.20.1

Command used: execute at @ e[tag=builder] run place template my_namespace:arena ~ ~ ~

Location: 0 200 10000  (and subsequent arenas at +100 X).

What works:

Running /place template my_namespace:arena ~ ~ ~  manually at those coordinates works.

Running a test function that places the arena at the player's position works.

The logic does summon an invisible armor stand at the correct center, so the coordinates/chunks are accessible.

What I have tried:

Force Loading: I used forceload add 0 10000 500 10000  to ensure chunks are loaded before placement.

Dimension: I wrapped the entire execution in execute in minecraft:overworld  to ensure context isn't lost.

Alignment: Tried align xyz  to ensure integer coordinates.

Debug: execute store success score  returns 1 for the place command, meaning the game thinks it placed it.

Has anyone encountered place template "ghosting" or failing silently in loaded chunks far from spawn?

Datapack url: https://drive.google.com/file/d/1OpsenV9yggTppBebkw_9PhgEfeApdP5d/view?usp=sharing

hidden loom
#

Are these chunks loaded when the place command is called?

rapid helm
#

Yes, I specifically included a forceload add 0 10000 500 10000 command at the beginning of the start function, immediately before the generation loop runs. The debug output confirms this command is executed. I also verified that the chunks are loaded by teleporting players there.

brazen geyser
#

I believe forceload command needs at least a tick before the chunk actually becomes loaded, so doing it in the same function as whatever you're trying to generate in that chunk won't work

hidden loom
#

Actually it should register as failed if it wasn't loaded. Are you running this in vanilla or some modded Minecraft?

rapid helm
#

I don't use any mods, but I'm running the world on a server

hidden loom
#

Sole exception being when it rotates to a different chunk but I guess you don't do any rotation of the template right?

rapid helm
rapid helm
hidden loom
#

I am at a loss, I might test this myself when I get home and run some debugging to see if there is anything. Did you check server logs for any errors?

rapid helm
#

That would be great, thanks! I looked through the logs, but nothing stood out as suspicious

hidden loom
#

uh where are the structures/templates in your datapack?

#

this might be why it fails

#

the above linked datapack contains no template files so hg:duel_arena fails to place. it might work from chat if you generated it with structure blocks, but for the datapack you probably have to actually put it in the data/hg/worldgen/structure folder

rapid helm
hidden loom
#

I am not 100% sure, but this seems like the most plausible cause

rapid helm
#

I can't test it right now, but did you spot any other issues while looking through it? The datapack was a bit of a rush job

hidden loom
#

I didn't check the rest of the pack as I had no way to test it without making some templates myself

rapid helm
#

Okay, thanks. I'll ping you later once I've tested it.

rapid helm