Minecraft.How
Lädt...
Zum Inhalt springen

Ranged Weapon API

von 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.

Unsere Zusammenfassung

Was dieses Projekt macht

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.

Reaktionen

Melde dich an, um zu reagieren.

Kompatibilität

Versionen und Loader

10 Releases erfasst

4.0.0+26.3-fabric

release

Herunterladen (155 KB)

4.0.0+26.3-neoforge

release

Herunterladen (157 KB)

2.3.4+1.20.1-fabric

release

Herunterladen (157 KB)

4.0.0+26.2-neoforge

release

Herunterladen (156 KB)

4.0.0+26.2-fabric

release

Herunterladen (154 KB)
Alle 10 Versionen anzeigen

4.0.0+1.21.11-neoforge

release

Herunterladen (156 KB)

4.0.0+1.21.11-fabric

release

Herunterladen (152 KB)

Galerie

Ranged Weapon API icon

Wir verwenden Cookies, um dein Erlebnis zu verbessern. Wenn du diese Website weiterhin nutzt, stimmst du unserer Verwendung von Cookies zu. Lies unsere Datenschutzrichtlinie