Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
Silver Star Library is a development tool for datapack creators. It was originally a library I created for my own use, but its usage is not specifically catered to my own projects, and can be used across a wide variety of applications.
Please note! For many features of SSL, you will be required to invoke the ss_lib:_pre_function and ss_lib:_post_function functions. These files are designed to be run before all other functions, and after all other functions, respectively. I achieve this by having a "core" module which invokes these functions at the proper time, but do it however you like.
Features
Scores / Smart Score "Fetching"
SSL adds a wide array of scores that cover entity data, condition, location, and more. These scores can be called as needed through a group of "fetch" functions, which have a built-in check for whether they've already been called in the same tick. This drastically increases efficiency compared to calculating scores every tick, because it allows scores to only be calculated when necessary, and means that there won't be redundant calculations.
Generic Scores
SSL also adds ten "generic" scores, along with basic integer scores. "generic" scores are meant to be assigned and used in a single function, as they act just as temporary, placeholder scores. The basic integer scores are used for basic arithmetic operations, again, to cut down on the amount of extraneous, single-use scoreboard objectives.
Quick Destroy Items
SSL adds in a module that allows items to be designated as "quick destroy" items. These items, when dropped on the ground, will disintegrate after five seconds.
Items are designated as Quick Destroy just by adding quick_destroy:true to the custom item data.
Particles
SSL adds in a Particles module, which is just a group of preset particle effects. Most of these effects come from my personal projects, so there's not much of a theme to them. However, they are used for the Quick Destroy module.
Score Parse Module
The Score Parse Module is a sub-module of SSL that takes a macro input of a scoreboard objective and a function, and outputs the value of the scoreboard objective into the target function, as a macro. For example, if a player has a Test score of 50, and they want their maximum health attribute to always match their Test score, the Score Parse Module can read their score and output a string of "50" into the target function. SPM also has the ability to prepend, append, and insert special characters, allowing scores to be converted to floats.
In essence, the Score Parse Module is used to convert scores into macro strings.
A full breakdown of SPM is in a README file in its functions folder.
Raycast Module
The Raycast module adds a group of functions for creating raycasts, for instant straight-line block or entity detection. It allows input of how far the raycast should travel, the integer between each raycast node, and the target block, entity, or both. If the raycast succeeds, and detects the target, it will then run the function the developer specifies.
A full breakdown of the Raycast module is in progress, but feel free to DM me on Discord (@skeleton.toast) if you have any questions.
Rounding Module
The Rounding module is used to increase precision of scores when they're divided. By default, Minecraft will always round scores down to the nearest integer. However, the Rounding module will properly round these values instead of rounding them down every time.
The rounding module is pretty straight forward. It takes one input parameter, "score" which is the scoreboard objective that will be rounded for the executing entity.
Run Module
The Run module is a developer tool for discreet command execution, and easy command repetition. The Run module allows you to specify what command to run and how many times to run it, and in any server console or chat log, the only message displayed will be that the Run function was called. The specific command that was run will not be displayed.
The Run module takes two input parameters, "f" and "r". "f" is the full command to run, and "r" is the amount of times to run it.
Auto-Whitelist
The Auto-Whitelist function is a way to prevent developers from accidentally banning, blacklisting, or de-oping themselves from a server. It can be found in the ss_lib:_load function. Replacing the template username with your username will ensure that your account continues to have the correct permissions tied to it.
SSID
The Silver Star Identifier, or SSID, is a numerical value that is assigned to entities, that essentially gives them a UUID that can be interacted with like a score. SSIDs are an evolution on the previous URID system, and as such, they replace URIDs, which are no longer supported. An SSID is a 9-digit number assigned upon request to any entity, which is stored as a scoreboard value, and cannot be used more than once, EVER, PER WORLD. They're assigned by running the following function as the entity to be assigned:
ssid:assign
SSIDs are meant to be used as a scoreboard-based identifier for entities, which also allows global data storage on a per-entity basis. If you pass their SSID through the Parse module, and use that to create/access a data storage location, this allows for complex (as in more than just scoreboards) storage, that will only be accessed by the right entity.
SSIDs also support some fun developer features:
ssid:request
ssid:reserve
ssid:reset
Request is used to request a specific number, if you as a developer have a number you like to use. Some numbers, including 1-99 and a couple others, have been reserved by default, for myself and some close friends. Using ssid:request with the {"ssid":"<value>"} macro, and inputting your requested SSID, will either assign it to you, or return an error if it's already in use/reserved.
Reserve is used to reserve an SSID for an entity that may not currently exist. It takes two input macros: "player" and "ssid". "player" is typically a player's UUID, and "ssid" is self explanatory.
Reset will remove the SSIDs of all currently existing entities with the specified SSID, and will remove that SSID from the log of used SSIDs, allowing it to be used again later. This will remove the record of that SSID having been used, so only use this if you are CERTAIN that SSID is not in use.
Silver Star Library
This is a project I've been working on for a long time, and I've found it very helpful in my datapack projects. I hope you find it to be just as useful.

