Minecraft Data Packs / Server Utility

Minigame PID Assigner

  • check_circle Functions
  • 285 views, 1 today
  • 1 downloads, 0 today
  • 0
  • 0
I_Cement's Avatar I_Cement
Level 24 : Expert Pixel Painter
7

Player ID Assigner - Backstory

This is something that I made originally for my wave minigame and why did i need something like a ID assigner? I wanted to make this feature where you can buy back teammates at a cost and i wanted there to be a unlimited limit to the player count so I decided to make the IDs and this is where this now exists.

Player ID Assigner - Info

This is a utility tool for data pack creators that are making minigames that may need something to identify players by IDs.

PID Assigner and What it Does

My ID System assigns ID as said multiple times and it has multiple tasks:
  1. Begin the ID process for any player that hasnt have a ID yet.
  2. It starts from ID 0 and checks for if a player has that ID. Unless there are no players with that ID. Increment ID by 1
  3. Do ID checks to ensure no one has the specified ID.
  4. Once there is a free ID. Give that player that ID but also run a dobule check just incase.
  5. If a player with a ID leaves and rejoins. They will start the ID process as if they were a new player. If another player left before they left. The relogged player will take the disconnected player's ID to use the unused IDs.

How to Use

My ID Data Pack is just a series of functions that your minigame data pack can run at anytime. Keep in mind that my Data Pack doesnt automatically do something so your minigame has to call a function if you want the IDs to work. You can call upon the loop by running function ice_pid:pid/loop. Once you have started that function. It will do the ID work for you automatically. You can schedule clear this if needed but you will have to run the function manually to start the looping.

Projects using the ID System
Mobberode
Experimental Mob AI / Glacier Players
CompatibilityMinecraft 1.20
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome