đą Tridents
Overviewâ
Oraxen lets you create custom tridents using the trident mechanic.
This requires Paper 1.21.4 or higher, including Folia.
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.modelandappearance.thrown-modelare required resource-pack models.appearance.charging-modelis optional and uses the held model when not specified.appearance.transformapplies to the thrown model and defaults toNONE.
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.
Soundsâ
Sounds can be vanilla sound identifiers or
When a sound is not specified.
throwandhituse their vanilla sounds.hit-grounduseshit.returnusesthrow.
Troubleshootingâ
-
If the model's tip extends far ahead of the projectile position, the tip can enter a wall before the projectile stops.
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-modelrather than the handheld model.Set
appearance.transformtoFIXEDin the trident mechanic. In the thrown model JSON, replacedisplay.fixedwith 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, wheretipYis 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.