ReadOnlyScoreInfo .java

net.minecraft.world.scores.ReadOnlyScoreInfo (interface, 19 lines): members: formatValue, numberFormat, isLocked, value. imports: NumberFormat, Nullable.

net.minecraft.world.scoresinterface19 linescommon502 B

API Surface (0)

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

Code Graph: Dependencies (2)

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

Full Source

ReadOnlyScoreInfo.java19 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.scores;
2
3
import java.util.Objects;
4
import net.minecraft.network.chat.MutableComponent;
5
import net.minecraft.network.chat.numbers.NumberFormat;
6
import org.jspecify.annotations.Nullable;
7
8
public interface ReadOnlyScoreInfo {
9
	int value();
10
11
	boolean isLocked();
12
13
	@Nullable NumberFormat numberFormat();
14
15
	default MutableComponent formatValue(final NumberFormat defaultFormat) {
16
		return Objects.requireNonNullElse(this.numberFormat(), defaultFormat).format(this.value());
17
	}
18
}
19

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