mojira.dev
MC-198150

Command blocks won't run when used in custom structures together with custom dimensions

When saving command blocks as a structure, they won't run any commands inside them, when they get spawned into the world through custom dimensions.

 

When the command is say test, it won't run the command, nor does it return anything in the output box.

However, when the command is function example:test, it will return unknown function example:test, even though that function does exist and can be run manually.

 

A redstone source next to the command block (also inside the structure) won't help, nor does a repeating - always active command block work.

The only way to fix this is by switching the command block's state to needs redstone, and turning it back to always active.

Linked issues

Attachments

Comments 5

Please include a data pack for testing this issue

Can confirm in 1.17.1. I expected naturally generated command blocks to work like command blocks loaded through manually placed structure blocks, but it seems like they don't due to this bug. I'll upload a simple data pack if I get around to it.

Also worth noting, I experienced this bug in the nether as well as my custom dimension (since I'm dealing with nether fossils) so It's probably dimension-agnostic.

I was able to reproduce this in the overworld as well so I think the title should be changed to end at "...in custom structures". To test the bug for yourself, open a new creative world, pause the game and drag

[media]

into saves/<world_name>/generated/minecraft/structures/igloo and naturally generate a new igloo (i.e. find one with /locate and teleport to it). Notice how none of the 5 command blocks (nor the piston) will activate. Then give yourself a structure block and load minecraft:igloo/top and notice how all 5 command blocks (and the piston) activate. (The repeat ones spam the chat but I've confirmed that all 5 do activate as expected).

Likely blocked by MC-241288 as of 1.18-pre1. Nvm my brain musta turned off when I wrote this, of course you can still modify the vanilla structures.

No, your igloo method would still work; MC-241288 only affects custom biomes that had structure spawning defined.

Fabian Hummel

(Unassigned)

Community Consensus

(Unassigned)

1.16.2, 1.17.1

Retrieved