• check_circle Functions
  • 4,250 views, 3 today
  • 198 downloads, 0 today
  • 5
  • 3
  • 16
MeWithNoGoodUsername avatar MeWithNoGoodUsername
Level 47 : Master Modder
39
=========Track Player=========

Simple player tracking
/trigger TrackSwitch
To switch tracking on and off
Trail updates every 5 ticks
Trail last for 30 seconds

============================
CompatibilityMinecraft 1.15
toMinecraft 1.16
Tags

Create an account or sign in to comment.

2
05/11/2020 3:19 am
Level 23 : Expert Engineer
ItsVladGames
ItsVladGames avatar
Thanks bud ;)
1
05/11/2020 6:47 am
Level 23 : Expert Engineer
ItsVladGames
ItsVladGames avatar
How does it work tho?
1
05/11/2020 7:01 am
Level 23 : Expert Engineer
ItsVladGames
ItsVladGames avatar
And what are area affect clouds
1
05/11/2020 6:31 pm
Level 47 : Master Modder
MeWithNoGoodUsername
MeWithNoGoodUsername avatar
The Area Effect Cloud is what is usually seen when you throw a lingering potion or the purple fireball attack from the Ender Dragon. it creates a cloud of particles on the ground that can be giving different properties, in the case of this datapack:

summon minecraft:area_effect_cloud ~ ~.1 ~ {Particle:"dust 1 0 0 .5"Radius:.5f,Duration:600,Tags:["trackbot"]}

this is the summoning code, I'll break it down:

summon minecraft:area_effect_cloud ~ ~.1 ~ {} the command to summon the cloud at the location of the target, in this case i want it to be at a target with the score of 1 (meaning on for this datapack) for TrackSwitch, so you would add this to the begining:

/execute at @p[scores={TrackSwitch=1}] run summon minecraft:area_effect_cloud ~ ~.1 ~ {Particle:"dust 1 0 0 .5"Radius:.5f,Duration:600,Tags:["trackbot"]}

Particle: Any kind of particle in the game can be used, in this case I used the Dust particle (note, unlike the other types of particles, the Dust particle needs to be told extra information which is why I put "dust 1 0 0 .5" the first 3 numbers represent RGB color, in this case I made it red, the fourth number is the size, normal is 1 so I made it 1/2 smaller, or .5)



Radius: how big the cloud would appear, normally at size 1 it is a 2x2 area, so I made it size .5 so it could be 1x1 matching the block's size


Duration: Is the amount of time (in ticks) that the entity will stay alive, this case 600 ticks will last for 30 seconds (20 ticks = 1 second). After when time is up, the area effect cloud will despawn


Tags: This part isn't that all important, I mainly use tags so I can locate that type of entity I created for commands like /kill @e[tag=trackbot]

After that its just a matter of putting this command on a timer, I used the scoreboard command to put mine on a 5 tick timer (every 1/4 of a second) with commands like this:

/execute as @p[scores={TrackSwitch=1}] run

  scoreboard players add @s TrackPlayer 1


/execute as @p[scores={TrackPlayer=5}] run
  function track:on

/execute as @p[scores={TrackPlayer=6..}] run
  scoreboard players set @s TrackPlayer 1

The first command is to make the score TrackPlayer increase by 1 every tick if the TrackSwitch is on (at 1)

The Second command is to run a function, in this case the summon command, every time the scoreboard for TrackPlayer is at 5 (meaning 5 ticks have passed)

The Third command is to reset the score TrackPlayer to 1 whenever it passes 6, so an infinite loop happens



hope this was helpful!
1
05/12/2020 3:31 am
Level 23 : Expert Engineer
ItsVladGames
ItsVladGames avatar
And where do you get your fonts?
1
05/12/2020 6:25 am
Level 47 : Master Modder
MeWithNoGoodUsername
MeWithNoGoodUsername avatar
1
05/12/2020 3:30 am
Level 23 : Expert Engineer
ItsVladGames
ItsVladGames avatar
It was. But how to I make it so it summons a Area effect cloud every 1/2 seconds?
1
05/12/2020 6:24 amhistory
Level 47 : Master Modder
MeWithNoGoodUsername
MeWithNoGoodUsername avatar
10 tick
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome