Download Shots Fired — Minecraft Mods — MetaMods

Shots Fired

Active

Downloads

0

Last update

4 months ago

Versions

1.20.1 — 1.20.6
Client and server
Forge
Weapons and armor
Game mechanics
Technological
Addons

Shots Fired

The Shots Fired mod adds casing drops when firing weapons from the tacz mod. Fire a gun and get an empty casing.

How It Works

Currently, the mod does not include specific casing items or systems for their use. Base configuration will be added with the release of my other project called Create: Mass Munitions — a mod that adds automation tools for working with firearms.

Mod Configuration

Since Shots Fired currently only works with tacz, the instructions will focus specifically on this system.

The entire tacz weapon system uses a single Forge item, differing only in NBT data. Two configuration files are important.

The first links the gunId (tacz's special NBT, not the internal item ID) with the dropped casing in the format "tacz:your_gunId"|"forge:item_id". For example: "tocz:pistol_model|minecraft:cogwheel"

The second sets the number of casing drops when using burst fire mode. Without configuring this parameter, weapons in this mode will drop fewer casings than required. Use the "/kubejs hand" command to learn the NBT structure of your weapon — this significantly simplifies configuration of vanilla and custom modifications.

Development Prospects

The flexible configuration of Shots Fired opens up opportunities for modpack creators to make the player experience more immersive. Active development is underway for a complete reloading and casing recycling system with high-quality 3D models that do not violate third-party rights.


Technical Features

Configuration Separation

When the tacz system transmits data about a shot, the code checks the shotsfired.json file and determines which item should drop. When firing in burst mode, an additional check is made with shotsfiredburst.json, which specifies the multiplier for the number of casings. Thus, one file controls the type of casing, while another controls their quantity under certain conditions. This system accounts for the peculiarities of the tacz API to ensure correspondence between bullets in the magazine and casings on the ground.

Event Processing Specifics

Single and automatic shots are correctly processed by the tacz API, triggering the corresponding event for each shot. However, when firing in burst mode, only one event is registered for the entire burst, despite multiple bullets actually being fired. The additional configuration file compensates for this feature until the corresponding functionality is improved in the base mod.

Project members
melodiccougar7

melodiccougar7

Developer

Created: 25 Jan 2025

ID: 70052