MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / addInformation

Method addInformation

src/main/java/net/minecraft/item/ItemMap.java:289–305  ·  view source on GitHub ↗

allows items to add custom lines of information to the mouseover description @param tooltip All lines to display in the Item's tooltip. This is a List of Strings. @param advanced Whether the setting "Advanced tooltips" is enabled

(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)

Source from the content-addressed store, hash-verified

287 * @param advanced Whether the setting "Advanced tooltips" is enabled
288 */
289 public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
290 {
291 MapData mapdata = this.getMapData(stack, playerIn.worldObj);
292
293 if (advanced)
294 {
295 if (mapdata == null)
296 {
297 tooltip.add("Unknown map");
298 }
299 else
300 {
301 tooltip.add("Scaling at 1:" + (1 << mapdata.scale));
302 tooltip.add("(Level " + mapdata.scale + "/" + 4 + ")");
303 }
304 }
305 }
306}

Callers

nothing calls this directly

Calls 2

getMapDataMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected