Started by
kujojotaro
on
Topic category: Help with Minecraft modding (Java Edition)
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
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.
like this?
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.