Compatibility
Minecraft: Java Edition
Platforms
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
About
Andrew's Datapack Utils is a Fabric Mod aimed at creating useful utilities for datapacks (mainly for datapack functions). It adds a command which holds most of the utilities, and allows modification of player data using /data
and /execute store
, allowing for easy manipulation of players and allows for things that were previously impossible.
Features
- Basic Math Calculation
- used by using the
/aputils calc <add|sub|mul|div|power|sqrt>
command. Works great with/execute store result
and function macroes.
- used by using the
- Editing Player Data
- Normally, you can't use
/data
or/execute store (result|success) entity
to change player entity data, it just throws an error,Unable to modify player data
, and doesn't change anything. With this mod, that restriction is removed, allowing for easy modification of player entity data. Note that not everything can be modified, attempting to change certain values such as Motion or Pos does nothing. Use other commands such as /aputils velocity or /tp to change these instead.
- Normally, you can't use
/aputils velociy <xyz> [add|set]
- allows you to manipulate the velocity of entities in ways you can't with normal methods
- requires permission level 2, meaning you nead cheats in a single player world or permission level 2 in a server
/aputils attack_cooldown <player>
- Outputs the attack cooldown progress of the provided player, as a percent if using
/execute store result
.
- Outputs the attack cooldown progress of the provided player, as a percent if using
aputils despawn <entities> [force]
- Despawns one or more entities.
- If
force
isn't applied and the target selecter includes one or more players at the time of the command being run (not if the selector allows players), the command fails. - Requires permission level 2, or permission level 4 if
force
is included
Datapacks can detect if this mod is installed using /aputils heartbeat
, which always outputs 1 to /execute store result
.
Notes
This can be included in any modpack without my permission.
If you'd like to port this to a different modloader(e.g forge or neoforge) or version of minecraft, go ahead, it'd actually be helpful if you did.
Fun Facts
This is the first actual fabric mod I've made in my entire history of Minecraft development. Before this I've only ever made datapacks for minecraft.