Skip to content

Weaponry Data

Sleys edited this page Aug 3, 2026 · 3 revisions

Weaponry Data defines the physical shape of a weapon.

Instead of manually describing particle volumes every time an animation needs them, weapon geometry can be stored once inside a datapack and reused by multiple animation events.


Overview

Each Weaponry Data file maps one or more items to a shared weapon configuration.

Item
      │
      ▼
Weaponry Data
      │
      ├── Shape
      ├── Beam Configuration
      ├── Rotation Configuration
      └── Fire Configuration

Multiple items may reference exactly the same configuration. For example, every vanilla Greatsword can share identical geometry.


File Structure

Every file contains two sections.

ITEMS

"items": [
  "minecraft:diamond_sword",
  "minecraft:netherite_sword"
]

Weaponry Params

weaponry_params
    │
    ├── shape
    ├── beam_config
    ├── rotation_config
    └── fire_config

Shape

The shape describes the volume or path occupied by the weapon.

"shape": {
  "type": "SQUARE",
  "size": 0.7,
  "density": 20,
  "width": 0.7,
  "depth": 2.4
}

Every shape shares two common parameters.

Property Description
size Global scale of the generated shape.
density Number of generated sample points. Higher values produce denser particle effects.

Additional properties depend on the selected shape type.


Supported Shapes

LINEAR

A straight line.

──────────────

Additional properties: None

PARABOLIC

     •
   •
 •
──────────────

Additional parameters:

"height": 1.2

ARC

A circular arc.

   ••••
 •      •
•

Additional parameters:

"angle": 180

SQUARE

A flat rectangular area.

+---------+
|         |
|         |
+---------+

Additional parameters:

"width": 0.7,
"depth": 2.4

This is the most common shape for swords.

CUBE

A three-dimensional volume.

+------+
|\     |\
| +----+-+
| |    | |
+-+----+ |
 \|     \|
  +------+

Additional parameters:

"width": 1.0,
"height": 1.5,
"depth": 3.0

Beam Configuration

Beam configuration determines where the generated shape is attached relative to the weapon.

"beam_config": {
  "is_mirror": false,
  "x_cord": 0,
  "y_cord": -0.01,
  "z_cord": 1.45
}

Parameters

Property Description
is_mirror Mirrors the generated shape.
x_cord Local X offset.
y_cord Local Y offset.
z_cord Local Z offset.

Rotation Configuration

Applies an additional rotation before the shape is generated.

"rotation_config": {
  "x_rotation": 0,
  "y_rotation": 0,
  "z_rotation": 90
}

Parameters

Property Description
x_rotation Rotation around the X axis.
y_rotation Rotation around the Y axis.
z_rotation Rotation around the Z axis.

💡 All rotations are specified in degrees.


Shape Types

Internally, the system supports five geometry generators.

Shape Category
LINEAR Curve
PARABOLIC Curve
ARC Curve
SQUARE Distribution
CUBE Distribution

💡 This distinction is important because curve-based shapes generate particles along a path, while distribution shapes generate particles inside a volume.


Example

Some examples of shapes

SQUARE

{
  "items": [
    "epicfight:wooden_greatsword",
    "epicfight:stone_greatsword",
    "epicfight:iron_greatsword",
    "epicfight:golden_greatsword",
    "epicfight:diamond_greatsword",
    "epicfight:netherite_greatsword"
  ],
  "weaponry_params": {
    "shape": {
      "type": "SQUARE",
      "size": 0.7,
      "density": 20,
      "width": 0.7,
      "depth": 2.4
    },
    "beam_config": {
      "is_mirror": false,
      "x_cord": 0,
      "y_cord": -0.01,
      "z_cord": 1.45
    },
    "rotation_config": {
      "x_rotation": 0,
      "y_rotation": 0,
      "z_rotation": 90
    }
  }
}

ARC

{
  "items": [
    "wom:antitheus"
  ],
  "weaponry_params": {
    "shape": {
      "type": "ARC",
      "size": 3.5,
      "density": 40,
      "angle": 40
    },
    "beam_config": {
      "is_mirror": false,
      "x_cord": 0,
      "y_cord": 0.5,
      "z_cord": -1.35
    },
    "rotation_config": {
      "x_rotation": 0,
      "y_rotation": 55,
      "z_rotation": -90
    },
    "fire_config": {
      "is_disable_fire": false,
      "is_bypass_fire": false,
      "is_alternative_fire": true
    }
  }
}

LINEAR

{
  "items": [
    "minecraft:wooden_sword",
    "minecraft:stone_sword",
    "minecraft:iron_sword",
    "minecraft:golden_sword",
    "minecraft:diamond_sword",
    "minecraft:netherite_sword"
  ],
  "weaponry_params": {
    "shape": {
      "type": "LINEAR",
      "size": 0.7,
      "density": 10
    },
    "beam_config": {
      "is_mirror": false,
      "x_cord": 0,
      "y_cord": 0.05,
      "z_cord": 0.25
    },
    "rotation_config": {
      "x_rotation": 10,
      "y_rotation": 0,
      "z_rotation": 0
    },
    "fire_config": {
      "is_disable_fire": false,
      "is_bypass_fire": false,
      "is_alternative_fire": false
    }
  }
}

EF: Extended Datapacks

📦 Data

🧰 Core

👁️ Visuals

⚔️ Combat

🗝️ Skill Builder

🛠️ Innate Builder

🗡️ Animation Operations

⚙️ Third-Party

Clone this wiki locally