Spawn attach to an item.

Started by XSpeedRate on Sun, 08/02/2020 - 23:05

Topic category: Help with modding (Java Edition)

Last seen on 13:14, 8. Mar 2021
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Spawn attach to an item.
Sun, 08/02/2020 - 23:05

I'm trying to make an item that when the player dies well wearing it, turns them into a ghost or something and the only way to spawn back is for another player to wear it. So every time the player who was killed with the item first dies, they can't respawn until someone else picks up the item. Is there a way of handling this? 

Last seen on 13:14, 8. Mar 2021
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
If your confused about what…
Sun, 08/02/2020 - 23:12

If your confused about what I'm saying, here's another way of putting it. "Whoever dies well wearing the ring, will forever be connected to the ring". I can't really think of any other explanations than this.

Last seen on 16:31, 1. Sep 2021
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i don't think this is…
Sun, 08/02/2020 - 23:35

i don't think this is possible without a lot of code. Also I don't know the code.

Last seen on 17:57, 21. Aug 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well what you could do with…
Sat, 08/08/2020 - 21:20

Well what you could do with procedures is when the player "dies," don't actually kill them, but set their game mode to spectator or something else you want. Then, check if another player equips the ring. Once it is equipped by anyone, change the player's game mode back to survival and set them to the correct coordinates.

Last seen on 13:14, 8. Mar 2021
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thanks that's actually very…
Tue, 08/11/2020 - 13:14

Thanks that's actually very helpful, I still got to figure out the procedures for the item only usable by one player. I'll just do some tests and see what happens.

Last seen on 06:50, 22. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You may want to have a…
Wed, 08/19/2020 - 23:19

You may want to have a living entity (that is immune to damage and just sits there and looks like the ring) spawn when the player "dies", and remove the item from the "dead" player's inventory, otherwise the ring will despawn after 5 minutes of being in a loaded chunk and the player won't be able to change back. Another player touching the entity would despawn it and place the ring in the player's inventory. (or just make the spectator mode only last 5 minutes)

Last seen on 13:14, 8. Mar 2021
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So how do make the player…
Thu, 08/20/2020 - 17:54

So how do make the player teleport back to the ring?

Last seen on 06:50, 22. Apr 2021
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Save the position as a…
Thu, 08/20/2020 - 18:10

Save the position as a variable. In what way would depend on when you want the player to respawn. If you want the player to respawn where the ring was sitting when it is picked up, just have the entity teleport the player when it despawns. If you want the player to teleport to where the ring was sitting only when the other player holds it out, even if they picked it up a while ago and aren't at that place anymore, just save the x y z position of the entity (or player that picked it up) in the item as NBT tags, and use those variables for teleporting the player on the other player holding the ring out. If you just want the player to teleport to the player holding it, use that player's x y z. Etc.

Last seen on 13:14, 8. Mar 2021
Joined Oct 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Do you know what procedures…
Fri, 08/28/2020 - 17:48

Do you know what procedures I should use?