A NeoForge 1.21.1 mod about the air picture: unmanned aircraft, an air raid alarm system and ground-based air defence. Works with TACZ as a soft dependency — the mod runs with or without it.
NeoForge is the only dependency. The models use the vanilla ModelPart system
and are animated in the renderer.
Drones are not entities. In the air a drone is an object inside
DroneFlightManager; on the ground it is a block with a block entity. The
reasoning is under "How it works".
| Class | Aircraft |
|---|---|
| Shahed loitering munitions | Shahed-131, Shahed-136, Shahed-238 (jet) |
| Reconnaissance | Orlan-10, Orlan-30, Eleron-3, ZALA 421-16E, ZALA 421-08, Granat-4 |
| Strike and loitering | Lancet-1, Lancet-3, KUB-BLA, Inokhodets (Orion), S-70 Okhotnik |
| Ukrainian systems | Leleka-100, SHARK, PD-2, Liutyi (An-196), UJ-22 Airborne, RAM II UAV |
Every aircraft has its own model built to the proportions of the real thing: a
Shahed is a delta with fins on the tips and a pusher propeller, a Lancet has two
X wings, an Orlan is a conventional layout with the tail on a boom, the PD-2 is
an aeroplane with four lift rotors, the S-70 a flying wing with a turbojet.
Performance — speed, ceiling, toughness, warhead — lives in DroneKind and
differs from type to type.
The models carry the detail that is actually visible in flight and on the pad: a gimballed sensor with a lens window and a thermal channel, a pitot boom ahead of the nose, ailerons and elevons as separate strips along the trailing edge, a dorsal spine and access panels, navigation lights on the tips (red to port, green to starboard), intakes and exhaust stubs on piston types, warning stripes by the warhead. Types that land have real gear: tricycle legs and wheels on the aeroplane layouts, landing feet under the booms of the PD-2, a skid on the twin-boom aircraft and flying wings.
The first three work two ways: a gunner sits at the sight (left click fires), or
Shift + right click switches to automatic. MANTIS always runs itself.
IFF. In automatic mode a mount knows where every drone took off from.
Anything launched within 70 blocks of the mount counts as friendly and is
never engaged, deliberately or by a stray burst. Everything launched further out
is tracked. The radius is configurable (turret.friendlyRadius).
Automatic fire misses. Every burst rolls a hit chance that falls off with
range and with target speed. On a failed roll the burst is deliberately walked
wide, and you can watch the tracers go past. The base chance is
turret.autoHitChance (0.55 by default), multiplied by the accuracy of the
individual mount.
Players within earshot get an "AIR RAID ALERT" banner on screen.
A Minecraft entity is convenient while it stays near a player. A drone flies kilometres away while the operator stays put, and at that point the entity gets in the way: it stops being tracked beyond the tracking radius, it ticks with the rest of the world, and it needs the client to "see" it. So the aircraft are built differently:
| State | What it is | What draws it |
|---|---|---|
| On the ground | airsystem:drone block with a block entity |
DroneBlockRenderer |
| Airborne | DroneFlight object in DroneFlightManager |
DroneFlightRenderer, in the world pass |
| Released bomb | Munition object in the same place |
the same renderer |
What that buys:
DroneSyncPayload) to everyone in view range and
instrument data (DroneTelemetryPayload) only to the operator.SavedData and survive a
server restart.ExplosionEvent.W/S pitch, A/D
heading, Space throttle, Shift throttle off), "Strike" (an immediate dive
for a loitering munition, bomb release for a strike carrier) and "View"
(switching between heading-locked and free gimbal).Recovery also starts on its own when there is exactly enough fuel to get home: the aircraft heads for the pad instead of falling. The phase is visible in the telemetry ("Returning", "On approach").
An aircraft on a pad can be picked back up: Shift + right click, or simply
break the block. When a flight ends, the operator returns to their own position
in their previous game mode.
/airsystem flights # what is airborne right now
/airsystem abort # recall everything
/airsystem launch <type> <x y z> # launch at a target, for testing
The explosion is staged. The vanilla picture is disabled entirely
(spawnParticles = false, a silent airsystem:silence) and the client draws
all of it:
flash/explosion_emitter, flame, lava drops,
firework sparks and thrown-up soil;Detail falls off with distance so that far-away impacts do not load the client.
Screen shake — stronger the closer the player is to the epicentre (up to 90 blocks), decaying over time.
Shockwave — spreads from the epicentre over about 16 ticks and breaks
glazing; the Shahed-136 radius is 35 blocks. The further the glass, the lower
the chance it goes. The block list is the airsystem:shockwave_fragile tag.
Fires — from types with an incendiary warhead (Shahed-136, Shahed-238, Lancet-3, Liutyi, RAM II).
Sound — a sharp report up close, a dull boom from far away, arriving late by the speed of sound (about 17 blocks per tick).
The mod is not compiled against TACZ and does not require it:
tacz namespace with "ammo"
or a matching calibre in its id) and fall back to the mod's own
airsystem:ammo_35mm and airsystem:ammo_30mm rounds without it.