Started by
Gamerhouse
on
Topic category: Help with Minecraft modding (Java Edition)
So i need it to spawn. I want it to spawn every 10 minutes and despawn after 1 minute, Also i want it to spawn behind the player
Topic category: Help with Minecraft modding (Java Edition)
So i need it to spawn. I want it to spawn every 10 minutes and despawn after 1 minute, Also i want it to spawn behind the player
Ok, I don't really understand about what you mean, but I will explain with the minding that you want a slasher mob...
First, you have to add a procedure with a tick event: on the player tick update.
Apply a new potion effect that you already had created (simple method) in this procedure. The effect must be applied only if the player don't already have the effect. You can hide the potion icon if you want ;)
Set the timer of the potion at 10 minutes (12 000 ticks).
Secondly, you add a procedure in the potion effect « When the effect end » that is spawn your mob. In the same procedure, you just have to use the block in «world procedures» that it have the possibility to target the nearest entity of one type. You «teleport» it behind you, using the vectors blocks (in the section entity). Multiplie the valor of X and Z by -0.6 (or adjust the valor if you want an other parameter).
This will simulate a teleportation. If you want to teleport it a a controlable distance in not a solid block, with an access to the player, you will have to use Cos. and Sin. of the player and I don't think it is what you want :D...
Click here for more informations about Sin. and Cos. ;)
i don't exactly get it can you show screenshots or explain more clearly about the code?