Download Utils — Minecraft Mods — MetaMods

Utils

Active

Downloads

0

Last update

7 months ago

Versions

1.21 — 1.21.5
Server
Fabric
Forge
Neoforge
Quilt
Libraries
Utils

Utils

Version: 5

Library Capabilities

This mod provides an extensive collection of tools for Minecraft modification developers. It includes global, entity-oriented, and player-specific functions, entity-based data storage mechanisms, constants for frequently used values, and numerous additional features to simplify the creation of complex mechanics.

Core Features

  • Global Functions: Chat clearing for all players, interface hiding, user management via commands
  • Entity Handling: Complete or selective mob removal, creature characteristic reset, health restoration
  • Player Tools: Dialog clearing for individual users, wide-ranging experience point management
  • Data Storage System: Advanced entity-level data management with support for creating custom data structures
  • Constant Values: Predefined scoreboard values from 0 to 1000
  • Player Score ID: Unique identifiers for each player's score tracking
  • Comprehensive Predicates: Wide range of conditional checks of varying complexity
  • Item Modifiers: Flexible system for inventory modification and customization
  • Entity Groups: Universal tags for quickly selecting desired entity types

Movement Control System

function utils:motion/calc

summon fireball ^ ^ ^.5

execute store result entity @n[type=fireball] Motion[0] double -0.00025 run scoreboard players get @s utils.motion.mx
execute store result entity @n[type=fireball] Motion[1] double -0.00025 run scoreboard players get @s utils.motion.my
execute store result entity @n[type=fireball] Motion[2] double -0.00025 run scoreboard players get @s utils.motion.mz

Alternative method using data storage:

function utils:motion/storage {"value":"-0.00025"}

summon fireball ^ ^ ^.5

data modify entity @n[type=fireball] Motion set from storage utils:motion motion

Entity Data Management

Data Creation

# Direct path
/function utils:entity/storage/set {"path":"lives","data":3}
/function utils:entity/storage/set {"path":"name","data":'"lullaby6"'}

# Array manipulation
/function utils:entity/storage/append {"path":"deaths","data":1}
/function utils:entity/storage/append {"path":"deaths","data":2}
/function utils:entity/storage/append {"path":"deaths","data":3}

Processing Stored Data

/function utils:entity/storage/function {"function":"namespace:say_lives"}

Contents of say_lives.mcfunction:

$say $(lives)

Data Removal

# Direct paths
/function utils:entity/storage/remove/data {"path":"lives"}
/function utils:entity/storage/remove/data {"path":"name"}

# For arrays
/function utils:entity/storage/remove/first {"path":"deaths"}
/function utils:entity/storage/remove/index {"path":"deaths","index":1}

Constant Values

The library provides constants from 0 to 1000:

/scoreboard players get 1 utils.const

Advanced Predicates

  • Location: can/see_sky, in/biome/<biome_name>, in/structure/<structure_name>, in/dimension/<dimension_name>
  • Weather: is/raining, is/thundering
  • Physical Status: is/falling, is/flying, is/ground, is/sneaking, is/sprinting
  • Randomization: random/<chance> with probability descriptions (0.1 = 10%, 0.5 = 50%)

Usage example:

/execute as @s if predicate utils:is/on_fire run say I'm on fire :(

Advanced Item Management

  • Item Counting: count/add/<number>, count/remove/<number>, count/set/<number>
  • Visual Customization: enchantment_glint_override, max_stack_size, item rarity settings
  • Functionality: repair_cost, tooltip configuration, cooldown timing

Usage:

/execute if items entity @s weapon.mainhand minecraft:raw_gold run item modify entity @s weapon.mainhand utils:smelting

Entity Organization by Tags

Comprehensive range covering broad spectral categories: dimension-specific creatures, hostile aggressive threats, local resident systems, projectile entities, crowd animals, and specialized game components for systematic gameplay management.

License

MIT license.

Project members
lullaby

lullaby

Developer

Created: 13 Jan 2025

ID: 71035