Sprache

Andrew's Datapack Utils

Modrinth

Useful utilities for datapacks, such as a calculator and allowing player data modification, and more.

1.7k Downloads 5 Follower aktualisiert 2mo ago
neueste v1.26.0-SNAPSHOT10 Modrinth
Fabric Forge Neoforge Paper Quilt 1.20.3 – 26.1 LibraryManagementUtility

Regarding support for various minecraft versions

Lots of changes have been happening recently that has made it difficult for me to support many versions with a single mod jar, so if you need support for a version, make an issue on github and I'll make a branch that supports your version. Otherwise, I will only be otherwise officially supporting the latest version of Minecraft.

About

Andrew's Datapack Utils is a Fabric/NeoForge/Forge/Paper 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.
  • Distance Calculation
    • /aputils calc distance <pos 1> <pos 2> or /aputils calc distance entities <selector1> <selector2>
    • Can calculate distance between 2 entities or 2 blocks, for entities use /aputils calc distance entities, for blocks use /aputils calc distance (notice the lack of entities)
  • 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.
    • Unavailable on paper.
  • /aputils velocity <xyz> [add|set|multiply]
    • allows you to manipulate the velocity of entities in ways you can't with normal methods, such as modifying the velocity of players (you can't with a player data modification mod because it doesn't send the velocity update packet to the client)
    • 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.
  • /aputils despawn <entities> [force]
    • Despawns one or more entities. Not the same as /kill, as this simply removes the entity/entities from your world without triggering any sort of death event, just silently removing the entity in the same manner as an entity despawning normally.
    • 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
  • /aputils check_damage <entity> [type]
    • Returns true if the entity took damage on the tick the command was run, and type isn't provided
    • Returns true if the entity took damage of the provided type on that tick, if type is provided.
    • Doesn't work on older game versions, oldest tested and working version is 1.21.2
      • This command always returns 0 if the required mixin doesn't load
  • /aputils pathfind <entity: selector> <xyz: Vec3d> [speed: double] or /aputils pathfind <entity: selector> entity <target: selector> [speed: double]
    • Makes a mob navigate to a certain position using vanilla mob pathfinding.
    • Overrides the mob's current path, if any.
    • Has an optional 'speed' parameter that makes the mob move at this speed while travelling to the specified position. Note that for some mobs such as iron golems their default (1) speed is their running speed. This isn't the case for every mob, but it is for some.
    • If unspecified, defaults to 1.
    • If the target specified is an entity, the mob will navigate to where the entity was when the command was run.
    • Does not affect dolphins, but does affect other fish. Why this is I do not currently know, but the dolphin likely uses a different navigation method than other mobs.
    • Currently does not produce command feedback, but it does work.
    • Mobs sometimes stop navigating to the position early. This is due to normal mob AI behavior.
  • /aputils target <entity> <target>
    • Forces a mob to change their target to the specified entity.
    • Conditions such as distance, gamemode, or having an existing target/attacker are ignored.
    • Only applies to mobs that can have a target, so passive mobs cannot be affected.
    • Does not affect to the ender dragon due to the ender dragon not being a mob with normal behavior.
    • Currently does not produce command feedback, but it does work.
      Datapacks can detect if this mod is installed using /aputils heartbeat, which always outputs 1 to /execute store result.
      Datapacks can detect if the NeoForge or Fabric version of the mod is being used with /aputils version. Returns 1 if NeoForge is being used and 0 if Fabric is being used.

Known Issues

  • Every time /aputils velocity is run, it prints "The new velocity is (x, y, z)" to the server console/game logs which can be annoying
    • This was a debugging feature that was left on accidentally and will be disabled next update.

Notes

This can be included in any modpack without my permission.

If you want to port this to Forge, go ahead.

To Developers

Any contributions would be greatly appreciated!

Fun Facts

This is the first actual mod I've made in my entire history of Minecraft development. Before this I've only ever made datapacks for minecraft.

About the work-in-progress Paper port

It's always bothered me that I can't get the full features of some of my datapacks (like Old Combat Datapack) on a plugin-based server software like Paper due to ADPU not being a Plugin, so I decided to teach myself paper, and now ADPU for Paper is officially in the works! It's important to note that stuff like player data modification and damage checking will not be available due to mixins not being a thing on paper, so be prepared for that. Workarounds will be available though with a work in progress "aputils manipulate" command that will be available on all loaders and will be able to do stuff like modify health-based and hunger-based values, among other things.

Versionen

Release
1.26.0-SNAPSHOT10
neoforge · 1.21.11 · 2mo ago
fix yet another feature being somewhere it shouldn't
30
Release
1.26.0-SNAPSHOT10
forge · 1.21.11 · 2mo ago
fix yet another feature being somewhere it shouldn't
12
Release
1.26.0-SNAPSHOT10
fabric · 1.21.11 · 2mo ago
fix yet another feature being in the wrong spot
32
Release
1.26.0-SNAPSHOT9
neoforge · 1.21.11 · 2mo ago
fix some erratic behavior caused by inputs to a method being in the wrong order change of plans, 1.21.11- will be discontinued after the full 1.26.0 release…
10
Release
1.26.0-SNAPSHOT9
forge · 1.21.11 · 2mo ago
fix some erratic behavior caused by inputs to a method being in the wrong order change of plans, 1.21.11- will be discontinued after the full 1.26.0 release…
7
Release
1.26.0-SNAPSHOT9
fabric · 1.21.11 · 2mo ago
fix some erratic behavior caused by inputs to a method being in the wrong order change of plans, 1.21.11- will be discontinued after the full 1.26.0 release…
14
Release
1.26.0-SNAPSHOT8
neoforge · 1.21.11 · 2mo ago
Ok so apparently it decided last version didn't want to commit so it just undid all of that
7
Release
1.26.0-SNAPSHOT8
forge · 1.21.11 · 2mo ago
Ok so apparently it decided last version didn't want to commit so it just undid all of that
4
Release
1.26.0-SNAPSHOT8
fabric · 1.21.11 · 2mo ago
Ok so apparently it decided last version didn't want to commit so it just undid all of that
6
Release
1.26.0-SNAPSHOT7
neoforge · 1.21.11 · 2mo ago
fix an accidental undoing of the velocity lerp by vector 3 command's existence this is the actual last 1.21.11 version
9
Release
1.26.0-SNAPSHOT7
forge · 1.21.11 · 2mo ago
fix an accidental undoing of the velocity lerp by vector 3 command's existence this is the actual last 1.21.11 version
5
Release
1.26.0-SNAPSHOT7
fabric, quilt · 1.21.11 · 2mo ago
fix an accidental undoing of the velocity lerp by vector 3 command's existence this is the actual last 1.21.11 version
11

Kommentare 0

Noch keine Kommentare. Sei der Erste, der seine Meinung teilt.

Herunterladen Andrew's Datapack Utils

R 1.26.0-SNAPSHOT10 1.21.11 neoforge 37 KB R 1.26.0-SNAPSHOT10 1.21.11 forge 37 KB R 1.26.0-SNAPSHOT10 1.21.11 fabric 37 KB R 1.26.0-SNAPSHOT9 1.21.11 neoforge 37 KB R 1.26.0-SNAPSHOT9 1.21.11 forge 37 KB R 1.26.0-SNAPSHOT9 1.21.11 fabric 37 KB R 1.26.0-SNAPSHOT8 1.21.11 neoforge 37 KB R 1.26.0-SNAPSHOT8 1.21.11 forge 37 KB R 1.26.0-SNAPSHOT8 1.21.11 fabric 37 KB R 1.26.0-SNAPSHOT7 1.21.11 neoforge 36 KB R 1.26.0-SNAPSHOT7 1.21.11 forge 36 KB R 1.26.0-SNAPSHOT7 1.21.11 fabric, quilt 36 KB R 1.26.0-SNAPSHOT6 1.21.11 neoforge 36 KB R 1.26.0-SNAPSHOT6 1.21.11 forge 36 KB R 1.26.0-SNAPSHOT6 1.21.11 fabric 36 KB R 1.26.0-SNAPSHOT5 1.21, 1.21.1, 1.21.2 neoforge 37 KB R 1.26.0-SNAPSHOT5 1.20.6, 1.21, 1.21.1 forge 37 KB R 1.26.0-SNAPSHOT5 1.21, 1.21.1, 1.21.2 fabric, quilt 37 KB R 1.26.0-SNAPSHOT4 1.21, 1.21.1, 1.21.2 neoforge 37 KB R 1.26.0-SNAPSHOT4 1.20.6, 1.21, 1.21.1 forge 37 KB R 1.26.0-SNAPSHOT4 1.21, 1.21.1, 1.21.2 fabric, quilt 37 KB R 1.26.0-SNAPSHOT3 1.21, 1.21.1, 1.21.2 neoforge 37 KB R 1.26.0-SNAPSHOT3 1.20.6, 1.21, 1.21.1 forge 37 KB R 1.26.0-SNAPSHOT3 1.21, 1.21.1, 1.21.2 fabric, quilt 37 KB R 1.26.0-SNAPSHOT3 1.21, 1.21.1, 1.21.2 paper 14 KB R 1.26.0-SNAPSHOT2 1.21, 1.21.1, 1.21.2 paper 14 KB R 1.26.0-SNAPSHOT 1.21, 1.21.1, 1.21.2 paper 14 KB R 1.26.0-SNAPSHOT2 1.21.11 neoforge 37 KB R 1.26.0-SNAPSHOT-2 1.20.6, 1.21, 1.21.1 forge 37 KB R 1.26.0-SNAPSHOT2 1.20.6, 1.21, 1.21.1 fabric, quilt 37 KB R 1.26.0-SNAPSHOT 1.20.5, 1.20.6, 1.21 forge 36 KB R 1.26.0-SNAPSHOT 1.21.11 neoforge 36 KB R 1.26.0-SNAPSHOT 1.21.2, 1.21.3, 1.21.4 fabric 36 KB R 1.3.0 1.20.3, 1.20.4, 1.20.5 fabric 44 KB R 1.2.6 1.20.3, 1.20.4, 1.20.5 fabric 42 KB R 1.2.5 1.20.3, 1.20.4, 1.20.5 fabric 40 KB R 1.2.4 1.20.3, 1.20.4, 1.20.5 fabric, quilt 40 KB R 1.2.3 1.20.3, 1.20.4, 1.20.5 fabric, quilt 40 KB R 1.2.2-hotfix-1 1.20.3, 1.20.4, 1.20.5 fabric, quilt 39 KB R 1.2.2 1.21.2, 1.21.3, 1.21.4 fabric 39 KB R 1.2.2 1.21.2, 1.21.3, 1.21.4 neoforge 29 KB R 1.2.1 1.21.5 neoforge 11 KB R 1.2.1 1.21.2, 1.21.3, 1.21.4 fabric 36 KB R 1.2.0 1.21.2, 1.21.3, 1.21.4 fabric 18 KB R 1.1.0 1.21.5, 25w15a, 25w16a fabric 16 KB R 1.0.0 1.21.5 fabric 15 KB

Dateien werden direkt von der Originalquelle bereitgestellt. Modgrid hostet oder verändert sie nicht.