Skip to content

Port to 1.21.11#99

Merged
ErrorCraft merged 10 commits into
0.7.0-preview.1+1.21.11from
port/mc-1.21.11
Jul 17, 2026
Merged

Port to 1.21.11#99
ErrorCraft merged 10 commits into
0.7.0-preview.1+1.21.11from
port/mc-1.21.11

Conversation

@ErrorCraft

@ErrorCraft ErrorCraft commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Item Components

minecraft:useable

  • Added an optional effects field.
    • Its format is the same as the minecraft:use_effects data component.
    • Provides the minecraft:use_effects data component.

minecraft:weapon

  • Replaced the may_smash field with more possibilities in the types field.
    • Its value is a map with melee weapon types and values.
    • See the Melee Weapons section for more information.

So if you had this:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "may_smash": true
  }
}

You now have to use this instead:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "types": {
      "minecraft:smashing": {}
    }
  }
}

Example from the Iron Spear:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 2.0,
      "rules": []
    },
    "attack_range": {
      "hitbox_margin": 0.125,
      "max_creative_reach": 6.5,
      "max_reach": 4.5,
      "min_creative_reach": 2.0,
      "min_reach": 2.0,
      "mob_factor": 0.5
    },
    "attack_speed": 0.2631579041481018,
    "damage_type": "minecraft:spear",
    "minimum_attack_charge": 1.0,
    "swing_animation": {
      "type": "stab",
      "duration": 19
    },
    "types": {
      "minecraft:kinetic": {
        "damage_conditions": {
          "max_duration_ticks": 225,
          "min_relative_speed": 4.6
        },
        "damage_multiplier": 0.95,
        "delay_ticks": 12,
        "dismount_conditions": {
          "max_duration_ticks": 50,
          "min_speed": 8.0
        },
        "forward_movement": 0.38,
        "hit_sound": "minecraft:item.spear.hit",
        "knockback_conditions": {
          "max_duration_ticks": 135,
          "min_speed": 5.1
        },
        "sound": "minecraft:item.spear.use"
      },
      "minecraft:piercing": {
        "hit_sound": "minecraft:item.spear.hit",
        "sound": "minecraft:item.spear.attack"
      }
    }
  }
}
  • Added an optional attack_range field.
    • Determines the attack range and hitbox margin when trying to attack entities.
    • Its format is the same as the minecraft:attack_range data component.
    • Provides the minecraft:attack_range data component.
  • Added an optional damage_type field.
    • Specifies the damage type the weapon deals.
    • Its format is an id pointing to a damage type.
    • Provides the minecraft:damage_type data component.
  • Added an optional minimum_attack_charge field.
    • Specifies the minimum attack charge on the attack indicator required to attack with the weapon.
    • Its format is a float ranging from 0 to 1 inclusive.
    • Provides the minecraft:minimum_attack_charge data component.
  • Added an optional swing_animation field.
    • Allows a different animation to be used when attacking.
    • Its format is the same as the minecraft:swing_animation data component.
    • Provides the minecraft:swing_animation data component.

Melee Weapons

Allows a melee weapon to be used in a specific way. Its value is a component map with melee weapon components.

minecraft:kinetic

  • Allows this weapon to have a charging attack when using the item.
  • Its format is the same as the minecraft:kinetic_weapon data component.

Example:

{
  "minecraft:kinetic": {
    "damage_conditions": {
      "max_duration_ticks": 225,
      "min_relative_speed": 4.6
    },
    "damage_multiplier": 0.95,
    "delay_ticks": 12,
    "dismount_conditions": {
      "max_duration_ticks": 50,
      "min_speed": 8.0
    },
    "forward_movement": 0.38,
    "hit_sound": "minecraft:item.spear.hit",
    "knockback_conditions": {
      "max_duration_ticks": 135,
      "min_speed": 5.1
    },
    "sound": "minecraft:item.spear.use"
  }
}

minecraft:piercing

  • Allows this weapon to damage multiple entities along a ray instead of a single entity.
  • Its format is the same as the minecraft:piercing_weapon data component.

Example:

{
  "minecraft:piercing": {
    "hit_sound": "minecraft:item.spear.hit",
    "sound": "minecraft:item.spear.attack"
  }
}

minecraft:smashing

  • Allows this weapon to attack entities by falling on them.
  • Its format is an empty map.

Example:

{
  "minecraft:smashing": {}
}

Predicates

Item Predicates

  • Removed the data_components field in favour of vanilla's component predicates.

So if you had this:

{
  "data_components": [
    "minecraft:bees"
  ]
}

You now have to use this instead:

{
  "predicates": {
    "minecraft:bees": {}
  }
}

Fixes

  • Skeleton-like entities can now use any direct shooter instead of just Bows
  • Piglins and Pillagers can now use any chargeable shooter instead of just Crossbows

@ErrorCraft
ErrorCraft merged commit a247bbf into 0.7.0-preview.1+1.21.11 Jul 17, 2026
2 checks passed
@ErrorCraft
ErrorCraft deleted the port/mc-1.21.11 branch July 17, 2026 02:34
ErrorCraft added a commit that referenced this pull request Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant