Started by
RgiCieZje
on
Topic category: Troubleshooting, bugs, and solutions
I created dynamic light to make a mining helmet. It works very well, but some blocks that simulate light do not perform the Update Tick.
pls, help.
Topic category: Troubleshooting, bugs, and solutions
I created dynamic light to make a mining helmet. It works very well, but some blocks that simulate light do not perform the Update Tick.
pls, help.
If you're trying to do something similar to dynamic light, an easier method would be to have your block programmed with a built in update tick- wait procedures are always kind of unreliable. If the block is set to tick, say, every 20 ticks, you can then have the block itself check if the player is nearby, and despawn otherwise, instead of running the procedure through the player.
I don't know if I understood correctly (because I'm using the x'D translator) but I'm using the update tick in the block. "Wait 20 ticks" was to check whether the update tick in the block works at all. It turned out that it didn't work. And I don't understand why, but only for certain blocks
In a block's advanced settings, you can tell it to 'tick randomly,' or to have a 'tick rate,' which will cause it to have update ticks based on how quickly you want it to update. If you make a block with a tick rate of 2, and give it an update-tick procedure that causes it to vanish if there is no player nearby, it will run this procedure every two ticks. Then you can just place the block, and it should work automatically.
This is exactly what I did and this is exactly what doesn't work. Update Tick does not appear on some blocks. For most, everything works perfectly
https://youtu.be/fo_V7kDZNEY - Here is a video of how it looks like. Maybe it's just lag, but it would still be good to eliminate it
In that case, the problem more likely has to do with how you're trying to reference the target entity? I'd recommend trying it with just any entity of subtype player, or removing the requirement entirely for testing purposes. Also, how are you setting the NBT tag in the first place? If the NBT tag isn't set, it won't know what entity to reference for the target.
If the wait procedure isn't working, it's also possible one of your procedures isn't connected properly?
NBT is working properly.
Previously, I checked what UUID was assigned to the block after right-clicking and there was no problem with it
Even if the problem was with NBT, removing the block after 20 ticks should work
Regarding the procedures, they all seem connected
This is how it works:
Hm, you're right, that all looks correct. I've had trouble getting UUID to work in the past, but I still don't know why the wait procedure wouldn't be working. Another method you could try would be to have the block use an entity iterator to simply check for a player with a mining cap in their head slot, and remove the block otherwise. Then set the block's tick rate to however long you want it to wait before despawning.