A scarab gem is an extremely rare but very important item. When obtained, it can be used to tame a Tyrannosaurus or Allosaurus, or to make powerful tools. These tools also can be repaired on an Archeology Workbench with Relic Scraps, although this will clear all enchantments. It can also be crafted into an aquatic scarab gem, which is used to tame aquatic and semi-aquatic creatures.
Scarab gems are obtained by mining fossil blocks. They are extremely rare drops, with a drop rate of 0.01% (1⁄10,000). This drop rate can be increased by placing an Archeology III enchantment on a pickaxe. They can also be obtained as extremely rare loot in dungeon chests.
Certain prehistoric creatures are virtually untamable unless presented with a magical scarab gem. Once the animal reaches adulthood (exact days listed on the creature's pages), the player must fight it and lower its health until the mob goes into a "weak" posture (which looks as if they are sleeping). The weakened creature then must be right-clicked with a scarab gem, which results in the loss of the gem and the complete healing of the now-tamed creature.
The scarab gem can be used to craft an aquatic scarab gem, which is used to tame aquatic and semi-aquatic creatures. These mobs are Sarcosuchus in the 7.2 update and mosasaurus, Liopleurodon and Spinosaurusin the 7.3 update. It requires a scarab and a piece of Dominican amber to craft.
Other than the aquatic scarab gem, the regular scarab gem has the potential to craft a few different items and blocks. The most useful things the scarab gem can craft are scarab tools and weapons. When a gold or diamond axe, hoe, pickaxe, shovel, or sword is combined with the gem, it creates a scarab axe, scarab hoe, scarab pickaxe, scarab shovel, or scarab sword, respectively.
Other than tools and weapons, the scarab gem is used to craft the time-machine. Though it can be crafted, the time-machine does not currently do anything. It will be used to transport players to a "Past" dimension in which dinosaurs spawn naturally, but this feature will likely not be added until a 1.10 update.