Minecraft.How
Se încarcă...
Sari la conținut

Ranged Weapon API

de ZsoltMolnarrr

Ranged Weapon API is a Fabric, Neoforge, and Forge library by ZsoltMolnarrr giving developers one component to set bow and crossbow pull time, damage, and velocity.

Rezumatul nostru

Ce face acest proiect

What It Does

Ranged Weapon API is a library mod for Minecraft by ZsoltMolnarrr that gives developers a ready-made system for building bows and crossbows. Instead of writing custom arrow physics and animation code for every weapon, developers attach one data component to an item and get working pull time, damage, and projectile speed handled for them.

Who It's For

This isn't something you install to get new weapons while playing survival. It's aimed at mod and modpack developers who want to add their own ranged weapons, or who want existing third-party bows and crossbows to behave correctly, without writing rendering and physics code from scratch.

How the Properties Component Works

At the core of the mod is a properties component that can be attached to any item. Once present, that item can define its own pull time along with optional damage and velocity values, so its feel doesn't have to match vanilla's bow or crossbow defaults. This works on vanilla bows and crossbows automatically, and on weapons from other mods too, with no Java-side integration required from the other mod's author.

Items using the component get their item model predicates registered automatically, matching the same predicates vanilla bows and crossbows use, so first-person and third-person rendering line up correctly and the pull animation reaches full draw at the right field of view. Weapon tooltips also display the item's properties, giving players a clear read on how a custom weapon compares to the vanilla version.

Attributes That Stack on Top

Two attributes let other systems add bonuses without touching a weapon's base values: a Ranged Damage attribute and a Draw Speed, or haste, attribute. These stack from any source that applies them, such as the weapon itself, gear, or effects. A separate Pull Time attribute exists only to keep tooltips accurate; the actual pull time used in game always comes from the properties component, not from this attribute.

Mob Support

Skeletons, along with strays, bogged, and illusioners, can use custom bows, while pillagers and piglins can use custom crossbows, complete with correct pull time, damage scaling, and arm poses for whatever weapon they're holding. Here's the thing, that said, mobs don't spawn with custom weapons on their own; getting one into a mob's hands still takes a summon command, a datapack, or another mod that handles the equipping.

Compatibility

Ranged Weapon API supports the Fabric, Neoforge, and Forge mod loaders, and both the client and the server are required for weapons to work correctly. It lists support for Minecraft versions 26.3, 26.2, 26.1.2, 26.1.1, 26.1, and 1.20.1. It's released under the MIT License, so other developers are free to build on it.

Reacții

Autentifică-te ca să reacționezi.

Compatibilitate

Versiuni și loadere

10 versiuni înregistrate

4.0.0+26.3-fabric

release

Descarcă (155 KB)

4.0.0+26.3-neoforge

release

Descarcă (157 KB)

2.3.4+1.20.1-fabric

release

Descarcă (157 KB)

2.3.4+1.20.1-forge

release

Descarcă (776 KB)

4.0.0+26.2-neoforge

release

Descarcă (156 KB)

4.0.0+26.2-fabric

release

Descarcă (154 KB)

4.0.0+26.1.2-neoforge

release

Descarcă (156 KB)
Arată toate cele 10 versiuni

4.0.0+1.21.11-neoforge

release

Descarcă (156 KB)

4.0.0+1.21.11-fabric

release

Descarcă (152 KB)

Galerie

Ranged Weapon API icon

Folosim cookie-uri pentru a-ți îmbunătăți experiența. Continuând să folosești acest site, ești de acord cu utilizarea cookie-urilor de către noi. Citește Politica noastră de confidențialitate