Create a server-side Fabric mod for Minecraft 26.1.2 (using Mojang mappings, Fabric API, and DataComponents) with "environment": "*" in fabric.mod.json and no client-only classes. Implement two features:
- Villager Pickup: Register a UseEntityCallback on the server. When a player sneaks and right-clicks a Villager entity with an empty main hand, serialize the villager's full entity state (including profession, level, XP, trade offers, health, and custom name) into a custom DataComponent on a vanilla Items.VILLAGER_SPAWN_EGG (or Items.PAPER with custom item name and lore), remove the villager entity, and give the item to the player. Register a UseBlockCallback so right-clicking a block with that tagged item spawns the exact saved villager at that location with its profession, level, XP, and trades intact, then consumes the item.
- Hidden Orbital Strike Fishing Rod: Register an operator-only server command /giveorbitalrod using CommandRegistrationCallback (requiring permission level 2) that gives the player a vanilla Items.FISHING_ROD with a custom DataComponent and gold display name 'Orbital Designator'. On server tick, track FishingHook bobbers thrown by that rod; when the bobber hits a block or entity (or when the player reels it in after landing), trigger an orbital strike at the bobber's exact X/Z coordinates: spawn a vertical beam of white/flame server particles from Y+120 down to the target, play a beacon/anvil warning sound, and after a 30-tick (1.5-second) server delay, summon 25 primed PrimedTnt entities (with a 20-tick fuse) and LightningBolt entities raining down from Y+80 across a 7-block radius around the target, then discard the bobber.
KodariWed at 10:32 pm 3
VillagerOrbitalStrike
Server-side Fabric mod for Minecraft 26.1.2 with two features. First, villager pickup: when sneaking and right-clicking a villager with an empty hand, the entity's full state (profession, level, XP, trades, health, custom name) is serialized into a custom DataComponent on a villager spawn egg item, the entity is removed, and right-clicking a block spawns the exact saved villager and consumes the item. Second, an operator-only /giveorbitalrod command grants a fishing rod with a custom DataComponent and gold name 'Orbital Designator'. When a bobber from that rod lands, an orbital strike triggers: vertical white/flame particles from Y+120, warning sound, then after 30 ticks, 25 primed TNT and lightning bolts rain across a 7-block radius, then the bobber is discarded.
This project targets Fabric 26.2, but you requested Fabric 26.1.2. Kodari doesn’t currently offer Fabric 26.1.2; the closest options are Fabric 26.2 and NeoForge 26.1.2.
Kodari can make mistakes. Review important code before using.
Files
No files in this session
Code