World Primer

World Primer

7M Downloads

Ruins mod commands are not being run

ElectroBot opened this issue ยท 3 comments

commented

Minecraft: 1.12.2
Forge: 14.23.5.2768
Worldprimer: 0.6.0-dev.20181206.23
Ruins: 17.1 (Ruins-1.12.2.jar from AtomicStryker's https://minecraft.curseforge.com/projects/ruins-structure-spawning-system)

changes from default:

  • enableDimensionLoadingCommands set to true
  • S:dimensionLoadingCommands:
        worldprimer-dim-command-nth 1 0 worldprimer-load-chunks -1 -1 0 0
        worldprimer-dim-command-nth 1 0 testruin testtree 0 120 0
        worldprimer-dim-command-nth 1 0 say Finished building your ruins!

As shown below, it thinks the command is unknown, but it does work when run as player (/testruin testtree 0 120 0) or from a server console. I tried the "build a bedrock box at 0,0 in the End dimension" on your curse page and have been able to spawn it in the overworld (switching the dim variable).

latest.log - https://paste.dimdev.org/ivuvigakoy.md
debug.log - https://paste.dimdev.org/ukevotixem.md
testtree.tml (needs to be in the config/ruins_config/templateparser/ folder) - https://paste.dimdev.org/agoputasih.makefile

Output in debug.log

[20:58:46] [Server thread/DEBUG] [worldprimer]: WorldEvent.CreateSpawnPosition, DIM: 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: WorldEvent.Load, DIM: 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: WorldEvent.Load - running dimensionLoadingCommands
[20:58:47] [Server thread/DEBUG] [worldprimer]: Attempting to load chunks in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Attempting to load chunks [-1,-1] to [0,0] in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Loading chunk [-1,-1] in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Loading chunk [-1,0] in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Loading chunk [0,-1] in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Loading chunk [0,0] in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Queueing chunk [-1,-1] for unloading in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Queueing chunk [0,-1] for unloading in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Queueing chunk [0,0] for unloading in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Queueing chunk [-1,0] for unloading in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Running a (possibly substituted) command: 'testruin testtree 0 120 0' in dimension 0
[20:58:47] [Server thread/DEBUG] [worldprimer]: Unknown command. Try /help for a list of commands
[20:58:47] [Server thread/DEBUG] [worldprimer]: Running a (possibly substituted) command: 'say Finished building your ruin!' in dimension 0
[20:58:47] [Server thread/INFO] [net.minecraft.server.MinecraftServer]: [World Primer] Finished building your ruin!
commented

Hmm, no idea why it wouldn't find the command... I was looking at the Ruins mod's repo, and the command looks like a regular command and nothing special or weird.

Do any of the other commands from that Ruins mod work? Have you tried any of the other command types in World Primer, maybe for example the timed command with like a few hundred ticks delay (just in case their command isn't registered early enough, although it does look like it's registered in the usual event).

I guess I'll have to try to dig into this tomorrow to figure out what is going wrong.

commented

I did try the following (from your curse page):
Here is an example of how to build a bedrock box at 0,0 in the End dimension when it loads for the first time. These would be added as dimensionLoadingCommands: worldprimer-dim-command-nth 1 1 worldprimer-load-chunks -1 -1 0 0 worldprimer-dim-command-nth 1 1 fill 10 0 10 -10 7 -10 minecraft:bedrock worldprimer-dim-command-nth 1 1 fill 9 1 9 -9 6 -9 minecraft:air worldprimer-dim-command-nth 1 1 say Finished building your box! and it does work in the S:dimensionLoadingCommands.

The ruins commands do work when run by OP player or from console. I tried it in having the tml file in another folder, but noticed that your mod prefers it without back/forward slashes.

worldprimer-timed-command %1200-800 0 testruin testtree 0 120 0 does work as a timed command, so maybe the command is run too early?

commented

Okay I added a couple of new log messages that were missing for some reason, and then I got this log output from logging into a new test world: https://pastebin.com/8HKwkta4

On line 45 the FMLServerStartingEvent fires, which is where mods register their commands. This seems to be after some of the dimensions have already been loaded, and the spawn chunks have been generated etc...

The best workaround I can find atm is to just run your ruin commands on the first/second tick (tick 1) of the overworld. I first tried tick 0, but it looks like the timed commands won't get initialized or run for that tick, or maybe the world starts at tick 1, I can't remember... anyway, running them on tick 1 works:

    S:timedCommands <
        worldprimer-timed-command 1 0 say Timed ruin commands start
        worldprimer-timed-command 1 0 worldprimer-load-chunks -1 -1 0 0
        worldprimer-timed-command 1 0 testruin testtree 0 120 0
        worldprimer-timed-command 1 0 say Timed ruin commands end
     >