Started by
BlockSmart
on
Topic category: Help with Minecraft modding (Java Edition)
I'm trying to make my teleporter detect an entity above it, run the animation and wait, and then teleport. However, it will run the animation and teleport me over and over because the procedure keeps running. Here's what I have right now. Any idea on how to fix it? Thanks.
You should add a cooldown to the detector.
Like a variable "isInCooldown" is originally false.
Once the procedure ran, the variable turn to true.
Now, instead of mafkink the procedure first check if if the player is above, you make it check if the cooldown variable is true .
If it is, you do a "Wait 40 ticks", if no you check if the player is above.