The Spear Gun is a craftable ranged weapon introduced the Shipwrecked DLC. It requires 3 Bamboo, and 1 Jellyfish to craft and requires a Science Machine to prototype. To be fired, it needs to be loaded with a Spear, Poison Spear, Obsidian Spear, or Battle Spear by right-clicking when holding a spear over the Spear Gun in the player's inventory. Spears cannot be unloaded from Spear Gun while in player's inventory, however dropping the Spear Gun will drop the loaded spear separately, allowing both the Spear Gun and the spear to be retrieved without durability loss.
When fired, it throws the loaded spear at the target, which deals 3 times the normal damage of the spear. The spear lands on the ground next to the attacked mob and must be picked up and loaded again. The spears lose 10 uses when fired though the Spear Gun. The Spear Gun itself has 8 uses. Poison and fire effects of Poison Spear and Obsidian Spear apply when they are launched with a Spear Gun.