Started by
theheadquarters
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make this block for a structure that when you enter this temple you get cursed and it applies a potion effect. I've tried many different things but I can't get it to activate the curse in a proportionate amount of time.
I can think of two ways to go about this, one is probably quite a bit better for performance, but the other is fairly complicated.
The performance heavy option would be to use the global procedure trigger On Player Tick Update, and then use a modified version of the procedure template Check for Block in 6*6*6 Block Radius, to check for your cursing block in a large radius, and if it is found, give the player the curse. This should work, but it will very likely cause lag, especially on servers, unless the game is being run on extremely powerful computers.
The more complicated option is to have a procedure linked to your cursing block's tick update that iterates over all entities around it, checking if they are players, and giving them the curse if they are players. Then setting the block's tick rate to 20 (once per second). However, blocks that are naturally generated, such as being part of a structure, don't tick naturally by default. You will need to save the structure with a falling block of sand above the cursing block, timed perfectly so that when the structure is generated, the sand will continue to fall and land on the cursing block. This is the only reliable way that I know of to make a naturally generated block tick at a set speed.
Let me try it but do I need to save it free falling?
The gap between the roof and the statue is too small to do this trick :(
You might be able to use the /tick rate 1 command to cause time to massively slow down and give yourself a much larger window of time to save the structure before the sand reaches the ground.
I think I might just make an entity that replaces the block when the player gets close and despawns itself. However the problem is I don't know how to place a block facing in a particular direction.
The problem is that there isn't a gap I have for the sand to be free falling as it's a 1 block height between the roof and the totem