Wiki 9Minecraft Mob Properties Mod Wiki

Mob Properties Mod — Guide

Conditions

Conditions allow for precise targeting of mob modifications. You can nest conditions to create complex requirements.

Condition Description
chance A decimal value (0.0 to 1.0) representing the probability of the function executing.
biome Checks if the mob spawned in a specific biome ID or biome type.
dimension Checks the dimension ID (e.g., 0 for Overworld, -1 for Nether).
height Checks the Y-level of the mob's spawn location.
light Checks the light level at the spawn location.
moon Checks the current phase of the moon (0-7).
difficulty Checks the world difficulty (Peaceful, Easy, Normal, Hard).
player_nearby Checks if a player is within a specified radius of the spawn point.
rng Generates a random number to compare against a range.
spawn Checks if the mob is a natural spawn or from a spawner.

Logical Operators

  • all_of: Returns true only if every nested condition is met.
  • any_of: Returns true if at least one nested condition is met.
  • none_of: Returns true only if none of the nested conditions are met.

Functions

Functions are the actions applied to the mob once conditions are met. These can modify the mob's physical stats, inventory, or metadata.

Attribute Modification

You can modify the base attributes of any mob using the stats function. These values override the default Minecraft settings.

Attribute Description
max_health The maximum HP of the mob.
follow_range How far away the mob can track a target.
knockback_resistance Resistance to being pushed back when hit.
movement_speed The base travel speed of the entity.
attack_damage The amount of damage dealt per hit (for hostile mobs).

Potion Effects

The potion function applies status effects to the mob upon spawning. You can set the effect ID, duration, and amplifier (strength).

NBT Modification

For advanced users, the nbt function allows direct editing of the mob's NBT tags. This can be used to set specific Creeper fuse times, Sheep wool colors, or Villager professions.

Drops and Loot Customization

Mob Properties allows for complete control over what a mob drops upon death, including rare drops and experience points.

  • add: Adds a new item to the mob's loot table. You can specify the item ID, metadata, stack size, and drop weight.
  • remove: Removes a specific item from the mob's default loot table.
  • clear: Removes all default drops from the mob, allowing for a completely custom loot table.
  • xp: Sets the amount of experience points dropped on death.

Drop Example (JSON)

{
 "drops": {
 "clear": true,
 "add": [
 {
 "item": "minecraft:emerald",
 "weight": 0.1,
 "count": "1-3"
 }
 ]
 }
} 

Equipment Customization

You can force mobs to spawn with specific armor and weapons. This applies to any mob, even those that do not normally wear equipment (though they may not render it visually).

Equipment Slots

  • mainhand: The item held in the right hand.
  • offhand: The item held in the left hand (1.10.2+).
  • head: Helmet slot.
  • chest: Chestplate slot.
  • legs: Leggings slot.
  • feet: Boots slot.

Each slot can be assigned a drop_chance, determining if the player can loot the item after killing the mob.

Advanced Mechanics

The 'Choose' Function

The choose function allows for randomized variety. You can define a list of different function blocks, and the mod will pick one based on assigned weights. This can be used to create "Elite" or "Boss" versions of standard mobs that only spawn occasionally.

Command Execution

The command function allows the mod to execute a console command when a mob spawns. This can be used to trigger world events, send messages to players, or interact with other mods' systems (e.g., giving a player a quest update when a specific mob spawns nearby).