Minecraft Data Packs / Cosmetic

Art's Simple Spectator Seer

  • check_circle Functions
  • 3,391 views, 1 today
  • 203 downloads, 0 today
  • 13
  • 9
Art1f4ct's Avatar Art1f4ct
Level 21 : Expert Miner
0
Let the spectators be seen! This datapack makes spectators visible to players in other gamemodes (such as survival) by spawning in particles at their location that everyone (but the spectators) can see. This gives spectators a number of new fun ways to interact with players in the world.

• Light the way; lead your survival folks to cool stuff!
• Haunt your friends by phasing through the floor.
• Crash someone's stream when they go afk
• Have a body in the MC world that people in the VC can look at while talking to you
• Get creative!

Features:
• Choose between six ten thought out particle effects, each with its own small quirks:
  * Crow, Ender, Fairy, Flame, Ocean, Plant, Soot (all versions)
  * Aqua, Snow, Spark (1.17+)
• A single easy-to-remember trigger (/trigger spectator-config) to choose/change effect
• Choosing a particle effect doesn't require op!
  * Any spectator can use the trigger and choose an effect (or turn it off) at any time
  * This datapack will NOT however grant players access to /gamemode or to spectator mode
• Particle effects are off by default per-player
• The datapack will NEVER interrupt the player, except to display a welcome prompt.
Unbranded: No branding or advertising is revealed to normal players, ever.
  * Branding is only visible in the datapack name and in the readme file.
Tamper-proof trigger: the datapack will not break if an invalid number is sent to the trigger
Tested in 1.14.4-1.18.2. Some features will only work in newer versions of MC
Optimized: The entire datapack is gated so nothing runs when no spectator exists
Cleanly uninstall via disable function (op required)


This is my most complex datapack yet. Let me know how your experience was, and please share any suggestions or feedback you have.


Why use particles?
Particles are sort of perfect for this purpose, since they can clip through objects, don't have a hitbox, don't interfere with the world in any way, don't obstruct the spectator's view, and don't create server lag. Besides, using particles in this way makes them look almost ethereal, which (in my opinion) makes it look alright for them to clip through the ground (unlike, say, an armor stand, which would look very goofy phasing into and out of the ground).


Datapack usage permissions
  I permit anyone to use this datapack for any purpose without crediting me or linking the datapack page, although I'd appreciate to be credited if reasonable.

  I permit making a modified copy of the datapack for your own personal use, but I do not permit uploading / sharing modified or original copies of my work unless you are clearly improving the pack and are crediting me as the base author. I'd also appreciate credit if you are building a datapack that uses ideas or code from my pack, although don't fret this one.


What to expect / Advanced information
  When the datapack is enabled, it will show a welcome message to each player the moment they are first detected to be in spectator mode. This could be the moment a player joins a server (if spectator mode is the default gamemode), or it could be when that player types /gamemode spectator, or it could be when that player dies in hardcore mode. This message does not show the name or author of the datapack, it just explains what it does and tells them how to activate a particle effect. Apart from the once-per-player welcome message, the datapack will never interrupt any player except for when the command is triggered. If the server.properties line broadcast-console-to-ops is true, all ops will see feedback any time a player uses the trigger.

  The datapack is designed to be as out-of-the-way as possible. Until they use the trigger to choose an effect, spectators will remain invisible to normal players. Spectators cannot see any particle effects apart from ambient particles unless they have self-preview enabled. Particles vanish when spectators get too close to a player's head or enter first-person-view so they cannot obstruct players' vision. Every particle effect is reactive to flight speed and fewer particles show when a spectator is standing still.

Particle effects consist of the following types of particles:
Base: These particles represent the location of the spectator. Since particles do not vanish immediately and cannot track the player, they also form a tail when the spectator moves. These particles are forced so they render even when a player has their particles set to minimum (unless particles are disabled via OptiFine settings or via another mod).
Extra: These particles only spawn when the spectator is in motion (determined when the Minecraft statistic minecraft.custom:minecraft.fly_one_cm is advanced). In most of my effects these particles fly out sporadically from the spectator's location. Some particles require the spectator to reach a certain speed before displaying, and additionally one of those is tied to a clock and can only display at a maximum rate of once per second.
Ambient: These particles spawn in an area around spectators who have certain effects selected (fire, plant, soot, and snow). These are the only particles, spawned in by this datapack, that are visible to spectators (unless self-preview is enabled). Some ambient particles are tied to a clock and only spawn in once per second to lower their frequency.

  When a spectator runs the command /trigger spectator-config, they see a couple lines of clickable text. This text includes buttons to turn particles off, enable self-preview, and select an effect. Each effect shows some short lore when it is hovered over. The self-preview button enables self-preview for 30 seconds, during which a spectator will see their own particles as if they were a player in another gamemode. Self-preview automatically shuts itself off so spectators can't accidentally enable it and forget how to turn it off.

  The trigger is multi-function, so the same "command" can cause many things to happen. For example, typing the base command sets it to "1" which triggers the GUI, and setting it to -3 tells the datapack to change your particle effect to fairy. This is how the entire preference menu can be used without op while only using one single trigger. Minecraft also allows the user to enter any number into it via the command, but I had the oversight that a troublemaker might tinker with this and I've coded art-sss so that it cannot be broken by an invalid number.

  The datapack is also designed to be easy to cleanly uninstall. All data is stored into scoreboards which makes it easy to remove all persistent information if you wish to remove this datapack for whatever reason. This datapack also includes my disable function, which tries to automatically remove the scoreboards and disable the datapack and warns you it if anything goes wrong.


Changelog
Changelog:
v1-7
* Fixed disable function tag error
v1-6
* Disable function now detects and reports that the datapack was renamed
* Disable function now detects and reports that the scoreboards weren't removed
* Disable function now detects and reports a few other potential errors
v1-5
* Added a button that allows spectators to preview their active particle effect
* Made some GUI colors more visible
v1-4
* Changed literally nothing but the version so PMC stops randomly renaming zip
v1-2
* Added ocean particle effect
* Added aqua, snow, and spark particle effects
  - These options will not appear on MC < 1.17 since they use 1.17 particles
* Tweaked and added new particles to plant, ender, fairy, and flame
  - Some extra effects may not display on older MC versions
* Fixed soot effect for MC < 1.16
* Base particles are now forced
* Spectator particles no longer render if they are too close to a player's head
v1-1
* Spectators no longer see any particles except for ambient and ender-extra
* Extra text added to welcome to notify that spectators won't see their own particles
* Reduced frequency of plant-extra and flame-extra particles
v1-0
* First zip
* Added extra verbose to disable function
* Published to PMC
CompatibilityMinecraft 1.14
toMinecraft 1.19
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome