Request: Command to force spawn chunks
SylisMC opened this issue ยท 4 comments
Hey, I've been playing around with this mod for a few days now, and I've started creating a premade world for playing chunk by chunk as a multiplayer team effort for a group of my friends. But the project is turning out to be a lotta fun to make and I think others would get enjoyment out of it aswell.
If you would be willing to add a way for users to force spawn in chunks via command, I could try to edit this world into a datapack to allow people to generate their own worlds with random seeds and have it automatically spawn in the chains and other islands.
Thanks for considering my request :)
I've added chunkbychunk:spawnChunk [location]
and chunkbychunk:spawnRandomChunk [location]
commands in 1.7.0.
Similar to your suggestion I've added extra invisible blocks that run the chunk spawning process as well, but recommend using the commands because they do the majority of the spawning immediately. Also shields from future changes.
It would probably be a lot easier if 0,0 was always spawn, but it's not critical I should be able to find ways around it. maybe by scanning the bedrock on the chunk to identify where the corner of the chunk is. it should all just be math from there. as long as I can find a way to determine a baseline that is always consistent.
Perhapse adding a block state to the chunkspawner would be the easiest way to make spawning chunks with a command possible?, a player could use setblock as following
/setblock [x] [y] [z] chunkbychunk:chunkspawner[active=true]
I apologize for my delay in response. This is going to be a busy week
It is a fair request. Technically, there is a slight issue to resolve - it takes a little time between making a generation dimension chunk relevant, and its entities being available to copy. For the chunk spawn block this is resolved by having the block placement bring the chunk into relevance, and then activation do the copy. I guess I could make a command that spawns an invisible block that then waits a tick and activates, that would fix it.