Minecraft Wiki
Minecraft Wiki
Advertisement
This article is about the item used to point to the world spawn or to a lodestone. For the item used to point to the location of the player's last death, see Recovery Compass.

A compass is an item used to point to the world spawn or to a lodestone.

Obtaining[]

Crafting[]

Ingredients Crafting recipe
Iron Ingot +
Redstone Dust

Compass

Chest loot[]

Item Structure Container Quantity Chance
Java Edition
Compass Ancient City Chest 1 16.1%
Shipwreck Map chest 1 7.7%
Stronghold Library chest 1 10.9%
Village Cartographer's chest 1 26.3%
Bedrock Edition
Compass Ancient City Chest 1 16.1%
Shipwreck Map chest 1 7.7%
Stronghold Library chest 1 10.5%
Village Cartographer's chest 1 26.3%

Trading[]

In Java Edition, expert-level librarian villagers have a 50% chance to sell a single compass for 4 emeralds.

In Bedrock Edition, expert-level librarian villagers have a 13 chance to sell a single compass for 4 emeralds.

Usage[]

Normally, the compass' needle points toward the world spawn point. The compass points to spawn when viewed in any way, including as a dropped item, in a player's hand, in an inventory or the crafting table, or in an item frame. The direction the needle points to is relative to the player who is viewing it. When a compass in an item frame is rotated, the needle turns accordingly.

In the Nether or the End, the compass' needle spins and points in random directions.

The compass can be used on a lodestone, after which it is named lodestone compass by default and points to that lodestone as long as the compass is in the same dimension as the lodestone, but if the compass is taken to a different dimension, it spins randomly, as a normal compass would in the Nether or the End. If the lodestone is destroyed, it also spins randomly, even if the lodestone is replaced afterward. However, if a lodestone compass is placed in storage, the lodestone can be broken and replaced without the compass losing the attunement, as long as the compass remains in storage while the lodestone is missing.

A lodestone compass appears enchanted, similar to the enchanted golden apple.

Using /setworldspawn to change the world spawn also changes where the compass points.

Crafting ingredient[]

Name Ingredients Crafting recipe Description
Empty Map Paper +
Compass
Compass
This variation is called an "empty locator map" in Bedrock Edition, or an "empty map" in Java Edition.

When the player first creates a map, it is blank. It needs to be activated by holding it and pressing use item. after which it records terrain and location markers as the player travels within (or close to) the area it maps.

Map
(with marker)
Map or Empty Map +
Compass
Compass

Bedrock Edition only.

Maps crafted from only paper do not show the location marker; to add it, a compass must be added to the map.

Recovery Compass Echo Shard +
Compass
Compass
Recovery Compass

Anvil usage[]

Name Ingredients Anvil usage Description
Locator Map Map +
Compass
Repair & NameMapCompass


Bedrock Edition only.

Maps crafted with only paper do not show the location marker; to add it, a compass must be added to the map.

Trading[]

A single compass can be sold to a journeyman-level cartographer villager for 1 emerald.‌[Java Edition only]

A single compass can be sold to an expert-level cartographer villager for 1 emerald as their sixth trade.‌[Bedrock Edition only]

A compass is also part of the cost of explorer maps:

  • An ocean explorer map and‌[JE only]/or‌[BE only] a woodland explorer map can be bought from a journeyman-level cartographer for 12 emeralds and one compass, as part of their fifth trade.‌[Bedrock Edition only]
  • In Java Edition, apprentice-level cartographer villagers offer to sell an ocean explorer map for 13 emeralds and a compass, and journeyman-level cartographer villagers offer to sell a woodland explorer map for 14 emeralds and one compass.

Enchantments[]

A compass can receive the following enchantments:

Name Max Level Method
Curse of Vanishing I

Sounds[]

Java Edition:

SoundSubtitlesSourceDescriptionResource locationTranslation keyVolumePitchAttenuation
distance
Lodestone Compass locks onto LodestonePlayersWhen a compass is used on a lodestoneitem.lodestone_compass.locksubtitles.item.lodestone_compass.lock1.0varies [sound 1]16
  1. Can be 0.85 or 0.95 for each sound

Bedrock Edition:

SoundSourceDescriptionResource locationVolumePitch
BlocksWhen a compass is used on a lodestonelodestone_compass.link_compass_to_lodestone1.00.85-0.95

Data values[]

ID[]

Java Edition:

NameIdentifierFormTranslation key
CompasscompassItemitem.minecraft.compass
item.minecraft.lodestone_compass

Bedrock Edition:

NameIdentifierAlias ID Numeric ID FormTranslation key
CompasscompassNone391Itemitem.compass.name
Lodestone Compasslodestone_compasslodestonecompass602Itemitem.lodestonecompass.name

Item data[]

Java Edition:

Main article: Player.dat format
  •  tag: The item's tag tag.
    •  LodestoneTracked: Optional. 1 or 0 (true/false) - true if the compass is connected to a lodestone. When false, LodestoneDimension and LodestonePos is not automatically removed when the lodestone is destroyed, but the compass still points to that location.
    •  LodestoneDimension: Optional. The dimension of the lodestone to which the compass is pointing.
    •  LodestonePos: Optional. The coordinates of the lodestone to which the compass is pointing.
      •  X: x coordinate
      •  Y: y coordinate
      •  Z: z coordinate

Bedrock Edition:

See Bedrock Edition level format/Item format.

Advancements[]

Icon Advancement In-game description Parent Actual requirements (if different) Resource location
Advancement-plain-rawCountry Lode, Take Me Home
Use a Compass on a Lodestone Hidden in the Depthsnether/use_lodestone

History[]

Java Edition Alpha
v1.1.0Compass JE1 Added compasses.
They have 102 visually distinct frames due to how the texture is generated - see the section below.
Java Edition Beta
1.8Pre-releaseCompasses can now be found in library chests in the new strongholds.
Java Edition
1.3.112w21aLibrarian villagers now sell 1 compass for 10–11 emeralds, making them renewable.
1.4.212w34aSince the mapping system has been changed, a compass can now be used to craft an empty map.
1.513w02aCompass JE2 BE2 Compasses now, instead of splitting two textures, use the new animation feature included in texture packs. As a result, they are considerably less precise, having only 29 visually distinct frames.
1.814w02aLibrarian villagers now sell 1 compass for 10–12 emeralds.
1.915w31aCompasses are now broken up into individual textures, instead of having every individual frame on one vertical strip like with animated textures.
15w43aThe average yield of compasses in stronghold library chests has been increased.
1.1116w39aCartographer villagers have been added, who buy compasses as their tier 2 trade.
1.1317w47aPrior to The Flattening, this item's numeral ID was 345.
18w11aCompasses can now generate in shipwreck chests.
1.1418w48aCompasses can now generate in chests in village cartographer houses.
1.1620w13aLodestone Compass JE1 Compasses can now be used on lodestones to make them point to the stones.
Compasses now point to the center of the spawn point block, instead of its north-west corner.
20w14aCompasses now have the LodestonePos, LodestoneDimension, and LodestoneTracked data fields. If LodestoneTracked is zero, the game skips checking for a lodestone in the specified position.
Compasses can now have the Curse of Vanishing enchantment on them.
20w19aCompasses no longer work in the recipe book.[1]
20w22aCompasses no longer work in the villager trading GUI.[2]
1.1720w48aCompass JE3 Lodestone Compass JE2 The textures of compass and lodestone compass have been changed.
1.1922w13aCompasses may now be found in ancient city chests.
22w14aCompasses can now used to craft recovery compasses.
Pocket Edition Alpha
v0.2.0Compass BE1 Added compasses.
Compasses currently have no function or legitimate method of obtaining them.
v0.8.0build 1Compass JE2 BE2 Added animated texture to compasses.
Compasses are now functional and craftable. They have been added into the Creative Inventory.
v0.14.0build 1Compasses must now be added to a map using an anvil to add the location marker.
Pocket Edition
1.0.0?Windows 10 Edition can now use the anvil, as well as the crafting table, to apply position markers, with compasses just as Pocket Edition can in general.
1.0.4alpha 1.0.4.0Librarian villagers now sell 1 compass for 10–12 emeralds.
1.1.0alpha 1.1.0.3Cartographer villagers have been added, who buy compasses as part of their tier 2 trade.
Compasses used with emeralds can be used to buy explorer maps as part of cartographer villagers' fourth tiers trade.
Bedrock Edition
1.4.0beta 1.2.14.2Compasses can now be found inside map room chests in shipwrecks.
1.10.0beta 1.10.0.3Compasses can now be found in village cartographer house chests.
1.11.0beta 1.11.0.4Trading has been changed, cartographer villagers now buy compassess as part of their fourth tier trades.
Compasses used with emeralds can now be used to buy explorer maps as part of cartographer and fletcher villagers' third tier trades.
Librarian villagers now have a 13 chance to sell compasses for 4 emeralds as part of their fourth tier trades.
1.16.0beta 1.16.0.57Lodestone Compass BE1 Compasses can now be used on lodestones to make them point to the stones.
Compasses now have the LodestonePos, LodestoneDimension, and LodestoneTracked data fields. If LodestoneTracked is zero, the game skips checking for a lodestone in the specified position.
Compasses can now have the Curse of Vanishing enchantment on them.
1.16.100beta 1.16.100.56Changed the ID lodestonecompass to lodestone_compass.
1.17.0beta 1.17.0.54Compass JE3 The texture of compass has been changed.
1.18.10beta 1.18.10.20Lodestone Compass JE2 The texture of lodestone compass has been changed.
Legacy Console Edition
TU1CU1 1.0 Patch 11.0.1Compass JE2 BE2 Added compasses.
New Nintendo 3DS Edition
0.1.0Compass JE2 BE2 Added compasses.

Texture generation prior to Java Edition 13w02a[]

Compasses simply draw two lines over the item sprite to form the needle.

Much like clocks, the code responsible for moving the needle is also present with the "setup" code, however it is omitted here as it is not pertinent to the actual drawing of the sprite. Also like clocks, an oversight in how the compass sprite is set to be loaded prevents texture packs from overriding the compass's base sprite.

def setup_compass_sprite (item: Image, angle: float, output: Image):
	NX      = 8.5
	NY      = 7.5
	SCALE_X = 0.3
	SCALE_Y = SCALE_X * 0.5
	
	# copy the item's texture into the output
	for i, pix in enumerate(item):
		output.set_pixeli(i, pix)
	
	rx = sin(angle)
	ry = cos(angle)
	
	# draw the smaller horizontal spurs of the needle
	# 1 is added to the endpoint, as `range` here is
	# end-exclusive. The original loops did `i <= 4`
	for i in range(-4, 4 + 1):
		x = int(NX + ry * i * SCALE_X)
		y = int(NY - rx * i * SCALE_Y)
		output.set_pixel(x, y, '#646464')
	
	# draw the main part needle
	for i in range(-8, 16 + 1):
		x = int(NX + rx * i * SCALE_X)
		y = int(NY + ry * i * SCALE_Y)
		if i >= 0:
			# Main red pointer
			output.set_pixel(x, y, '#FF1414')
		else:
			# Grey back half
			output.set_pixel(x, y, '#646464')

The generated compass sprite has 102 possible unique frames, while the pre-rendered compass has significantly less, at only 32 frames.

Issues[]

Issues relating to "Compass" are maintained on the bug tracker. Report issues there.

Gallery[]

See also[]

External Links[]

Advertisement