Update tick not working on naturally spawned blocks?

Started by jmods on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Update tick not working on naturally spawned blocks?

I have a block that when a player is in a certain radius it triggers a procedure. This works absolutely fine if its manually placed in the world. However when Its placed via structure, feature or normal generation it doesn't trigger the procedure? I've tried setting the block tick to different numbers and random but still no luck. Anyone able to help?

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Found a fix in another…
Sun, 07/23/2023 - 15:16

Found a fix in another thread:

 

RedstoneStick

I know you found a way to fix this but for ppl like me i'll leave a simpler alternative

A simple "schedule tick update of block at xyz in 40 ticks" procedure to run when the structure instance is generated will work

since i'm spawning a structure with 1 block, i only need to update that 1 block. if you have more that 1 block you need to update you have to use multiple lines but as far as i'm aware this does not work with rotated structures, hence why im spawning 1 block and that block randomizes the structure and generates it. Thankfully the structures generated using "place at xyz with rotation: --- mirror: --- structure: ---" command do make it so the blocks in there update on tick update so you can go pretty wild with it

https://mcreator.net/forum/63924/how-update-structures-spawn