Slingshot

Slingshot

alaindustrial:slingshot
ItemsImplementeditemtooltorchlightexplorationrangedprojectile

Summary

The Slingshot is a simple first-tier wooden weapon for lighting caves from a distance. Instead of arrows it fires torches: draw it like a bow, release — the torch flies in an arc and stays where it hits, just like a torch placed by hand: on the top of a block it stands on the floor, on a side face it hangs on the wall. If it hits a mob, it hurts it a little and sets it on fire, and the torch drops as an item. The slingshot uses no energy.

Mini-example. Take the slingshot and a stack of torches, aim at a cave wall across a chasm, draw fully and release — a torch lights up on the wall you could never walk to.

Usage

ActionWhat happens
Hold right-click with the slingshot and a torch in the inventorythe draw, like a bow: power grows for 1 s (20 ticks) up to full
Release right-clickone torch is fired; the flight power depends on how long you drew
Release too early (power below 0.1 — about 3 ticks of draw)no shot, the torch is not spent
No torchthe slingshot does not draw, no shot (in Creative mode too)

Ammo is any torch in the item tag. At release the tag holds: Torch, Soul Torch, Copper Torch, Redstone Torch and the Enriched Uranium Torch. A datapack or another mod can add its own torch to the tag. The search order is the same as for a bow's arrows: the off hand first, then the main hand, then the inventory from top to bottom.

Cost: exactly one torch per shot — whether it was placed, dropped or hit a mob. In Creative mode the torch is not spent; a torch fired in Creative mode that was not placed does not drop as an item.

Hit

Where it hitWhat happens
Top of a blocka standing torch in the cell above the block
Side face of a blocka wall torch on that face
Bottom of a block (ceiling)torches do not hang from a ceiling — the torch drops as an item
The cell is taken by a block that cannot be replaced, no supportthe torch drops as an item
Grass, snow and anything else vanilla lets you replace by handthe torch is placed instead of it, as when placed by hand
Water, oilsee "Fluid" below
Mob, player1 damage (half a heart) and set on fire for 3 s; the torch drops as an item
Nothing within 10 s of flightthe torch drops as an item wherever it is
Someone else's claim, Adventure mode, spawn protectionthe torch drops as an item, no block is placed
The shooter left the game while the torch was in the airthe torch drops as an item

The side of the torch is chosen by the face that was hit, not by where the shooter looks. The slingshot never breaks or replaces blocks that cannot be replaced by hand.

Fluid. A torch is never placed into a cell whose fluid it would put out: if after placement the cell does not hold the same fluid it held before, the placement is undone and the torch drops. So a vanilla torch that hits water drops, while the uranium torch stands in still water or oil and keeps burning (the fluid stays in the cell together with the torch), just as when placed by hand. No torch is placed in flowing water.

Protection. Before placement the game checks that the shooter could have placed the torch himself: Adventure mode, a protection mod's claim, spawn protection. On NeoForge the placement also goes through the block-place event — a protection mod that cancels the event gets the same result: the block is rolled back, the torch drops.

Flight

The torch flies in an arc like a snowball: you see the torch's icon with a trail of flame and smoke behind it. Water slows the flight down. A full draw gives a speed of 2.5 blocks per tick — a little less than a vanilla bow (3.0), so the range is a little shorter too. A weak draw is slower and shorter: the speed is proportional to the draw power.

Item properties

FieldValue
Stack1
Durability256 shots (1 per shot)
Energynone
Animationa bow-like draw: 3 draw frames, in the hand you see the band pulling back the pouch with the torch
Enchantmentsnone
Soundvanilla: the shot sounds like a bow, the placement is the torch's own sound

Recipes

S T S
S
S

S — Stick, T — String. The recipe unlocks when the player has String.

Progression

Crafting

Shaped Crafting
Stick
String
Stick
Stick
Stick
Crafting Table
▶
Slingshot
Slingshot