help me please, how to replace a block after a certain time

Started by kujojotaro on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
help me please, how to replace a block after a certain time
Sun, 07/14/2024 - 15:31 (edited)

 i want my block to be replaced by another one after 1 day in Minecraft, I tried the typical thing, using the wait...tick on then on server-side procedure, but it doesn't work correctly (so it breaks the original block that should be replaced , the new block appears after the time is up) I need help please, and excuse me for my English, it is not my first language

 

 

 


 

 

 


 

Edited by kujojotaro on Sun, 07/14/2024 - 15:31
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try using a nbt timer for…
Sun, 07/14/2024 - 18:15

Try using a nbt timer for the block instead, just set the nbt in the "On Block Added" trigger and on the Update Tick trigger set it to count up +1 or however you wish, then replace block after the given time.

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
like this?
Sun, 07/14/2024 - 18:55

like this?


Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
On block added get time of…
Fri, 10/04/2024 - 11:44

On block added get time of world and set it as an nbt number. Then on tick check for if world time = nbt number + 24000, if so then one day has passed eg replace block at x y z. However on block added is not a very reliable trigger and it may or may not trigger at all.

To make it certain to trigger you would need to make a logic nbt as well. On tick update:

If logic nbt = false

    set logic nbt to true

    set number nbt to [get world time]

else if logic nbt = true

            if [get world time] = [number nbt] + [24000]

                replace block at x y z [custom block]

 

The logic nbt will determine the time the block is placed so that it gets the right world time before checking whether a day has passed or not.