CharacterEvent .java

net.minecraft.client.input.CharacterEvent (record, 17 lines): members: codepoint, codepointAsString, isAllowedChatCharacter. imports: StringUtil, EnvType.

net.minecraft.client.inputrecord17 linesclient415 B

API Surface (3)

record CharacterEvent(int codepoint)
String codepointAsString()
boolean isAllowedChatCharacter()

Code Graph: Dependencies (1)

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

Full Source

CharacterEvent.java17 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.input;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
import net.minecraft.util.StringUtil;
6
7
@Environment(EnvType.CLIENT)
8
public record CharacterEvent(int codepoint) {
9
	public String codepointAsString() {
10
		return Character.toString(this.codepoint);
11
	}
12
13
	public boolean isAllowedChatCharacter() {
14
		return StringUtil.isAllowedChatCharacter(this.codepoint);
15
	}
16
}
17

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