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

Method getDisplayName

src/main/java/net/minecraft/item/ItemStack.java:585–600  ·  view source on GitHub ↗

returns the display name of the itemstack

()

Source from the content-addressed store, hash-verified

583 * returns the display name of the itemstack
584 */
585 public String getDisplayName()
586 {
587 String s = this.getItem().getItemStackDisplayName(this);
588
589 if (this.stackTagCompound != null && this.stackTagCompound.hasKey("display", 10))
590 {
591 NBTTagCompound nbttagcompound = this.stackTagCompound.getCompoundTag("display");
592
593 if (nbttagcompound.hasKey("Name", 8))
594 {
595 s = nbttagcompound.getString("Name");
596 }
597 }
598
599 return s;
600 }
601
602 public ItemStack setStackDisplayName(String displayName)
603 {

Callers 7

getTooltipMethod · 0.95
getChatComponentMethod · 0.95
getCraftingResultMethod · 0.95
getCraftingResultMethod · 0.95
updateRepairOutputMethod · 0.95
interactMethod · 0.95
canOpenMethod · 0.95

Calls 5

getItemMethod · 0.95
hasKeyMethod · 0.95
getStringMethod · 0.95
getCompoundTagMethod · 0.80

Tested by

no test coverage detected