Skip to main content

🔱 Tridents

Overview​

Oraxen lets you create custom tridents using the trident mechanic.
This requires Paper 1.21.4 or higher, including Folia.

Throwing a trident.

Configuration​

Tridents are configured as items in .yml files inside the plugins/Oraxen/items folder.

  • 📁 plugins
    • 📁 Oraxen
      • 📁 items
        • 📄 weapons.yml
        • 📄 foods.yml
ender_trident:
itemname: <dark_purple>Ender trident
material: TRIDENT
mechanics:
trident:
sounds:
throw: trident.throw.sound # The sound to play when the trident is thrown.
hit: trident.hit.sound # The sound to play when the trident hits an entity.
hit-ground: trident.hit.sound # The sound to play when the trident hits the ground. Uses sounds.hit when not specified.
return: trident.return.sound # The sound to play when the trident returns to the player. Uses sounds.throw when not specified.
appearance:
model: oraxen:tridents/ender_trident # The model thats used when the trident is held.
thrown-model: oraxen:tridents/ender_trident_throwing # The model thats used when the trident has been thrown.
charging-model: oraxen:tridents/ender_trident_charging # The model thats used when the trident is charging. Uses the held model when not specified.
transform: FIXED # The transformation applied to the thrown model. Uses NONE when not specified.

Appearance​

  • appearance.model and appearance.thrown-model are required resource-pack models.
  • appearance.charging-model is optional and uses the held model when not specified.
  • appearance.transform applies to the thrown model and defaults to NONE.

For example, oraxen:tridents/ender_trident refers to assets/oraxen/models/tridents/ender_trident.json.

For the thrown model, orient the model's shaft along its Y axis, with the tip pointing toward positive Y.

To customize the charging pose, use a separate charging model copied from the held model. Adjust its third-person hand rotations and translations to set the charging direction and grip position without changing the normal held pose. The charging model's first-person display settings determine its first-person appearance.

Behavior​

The mechanic uses a normal trident projectile, so damage, durability, pickup, Loyalty, Channeling, and Riptide keep their vanilla behavior.

Loyalty Riptide

Sounds​

Sounds can be vanilla sound identifiers or

custom sound identifiers
.

When a sound is not specified.

  • throw and hit use their vanilla sounds.
  • hit-ground uses hit.
  • return uses throw.

Troubleshooting​

  • If the model's tip extends far ahead of the projectile position, the tip can enter a wall before the projectile stops.

    Model ahead of projectile, tip extending through a wall.

    To reduce this, use a separate model for flight and move it backward along its shaft so its tip sits near the projectile position. This keeps the model's size and lets the shaft extend behind the collision point. Keep the tip pointing toward positive Y, and edit the file referenced by appearance.thrown-model rather than the handheld model.

    Set appearance.transform to FIXED in the trident mechanic. In the thrown model JSON, replace display.fixed with a transform like this.

    {
    "rotation": [0, 0, 0],
    "translation": [0, -21, 0],
    "scale": [1, 1, 1]
    }

    At scale 1, set the Y translation to 8 - tipY, where tipY is the tip's Y coordinate after element rotations. For a tip at Y=29, use -21. Keep X and Z at zero if the shaft is centered on X=8 and Z=8.