Nameable .java

net.minecraft.world.Nameable (interface, 25 lines): members: getPlainTextName, hasCustomName, getCustomName, getDisplayName, getName. imports: Component.

net.minecraft.worldinterface25 linescommon459 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

Nameable.java25 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world;
2
3
import net.minecraft.network.chat.Component;
4
import org.jspecify.annotations.Nullable;
5
6
public interface Nameable {
7
	Component getName();
8
9
	default String getPlainTextName() {
10
		return this.getName().getString();
11
	}
12
13
	default boolean hasCustomName() {
14
		return this.getCustomName() != null;
15
	}
16
17
	default Component getDisplayName() {
18
		return this.getName();
19
	}
20
21
	default @Nullable Component getCustomName() {
22
		return null;
23
	}
24
}
25

Decompiled Minecraft 26.3 source of Nameable (net/minecraft/world/Nameable.java) with Mojang official mappings, stored verbatim on the site.