
pudge hook
Hi, make a Minecraft mod of Pudge's hook from the online game Dota 2, which, when you left-click, shoots a hook about 7 blocks forward, and if there's a mob...
00—fabricServer1.21.1mod
pudge hook server mod
- Left-click with your main hand to fire a short hook; it raycasts about 7 blocks ahead, stopping at solid blocks and snagging the first living mob or player in line of sight.
- When a target is caught, it plays a quick launch sound, applies a short pull over a few ticks, and settles the target just in front of you.
- Hooks have a brief cooldown (about half a second) to prevent spam.
Implementation details
- Uses Fabric’s attack callbacks for server-side left-click detection and a server tick hook to drive the pull motion.
- Active hooks track the initiating player, target UUID, and world so invalid targets or missing players are safely discarded mid-pull.
- Final placement zeroes velocity and moves the target slightly in front of the player for a consistent landing spot.
Known limitations
- Swinging at empty air may not trigger a hook; a left-click that registers against a block or entity is needed for activation.
- Only living entities are pulled; armor stands and other non-living entities are ignored.
- Hooks respect blocks and cannot pass through walls or across dimensions.
Server Validation
✅ Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.