Started by
redtrac
on
Topic category: Help with Minecraft modding (Java Edition)
I tried to make an item that set a point, and teleport a Entity/Player to it when it get hit by the Item-user. Here are my "Results" but it doesnt work any ideas ?
yeah so basically mcreator does not like the idea of recipient of attack triggers, so no way to do that as of now I think
without javascript ofc
For now they get teleported, but only to 0 0 0 and not to the wanted postion. I only need an indicator where the player stands when he rightclicked.
what are the results when you try it? i may be able to help
I mean you could do a "jail dimension" where at 0 0 0 there is a jail structure spawned
If I'm understanding you correctly, you're wanting an item that makes an entity stuck, or "jails" them for a desired period of time. One way to do this would be to set a trigger for when an entity is hit with the item that gives it the maximum value of slowness (255) which will effectively freeze the entity in place. You can then specify the time in ticks that the effect will last and whether or not you want it to show particles. Obviously, this method has the side effect of ridiculously zooming in the player's FOV due to the high value of the effect, but it's what I can think of right now. I hope this helps. Have a great day! :D
Entity hurt
Player tick update
So let me explain
When an Entity is hit with your jailing item, their custom tags are set and on next player tick the If Jailed condition will be activated and will not only teleport the player to their jailed spot (in my case ON the spot where they were hit) but it also has a 30 second timer until they are unjailed
The - are to indicate they are inside the function above (mobile cant tab sadly)
20 tick = 1 second
All this should work given you are in 2020.4 and up