V4996 .java

net.minecraft.util.datafix.schemas.V4996 (class): members: components, registerTypes, entityTypes. strings: "minecraft:pot_decorations", "front", "back".

net.minecraft.util.datafix.schemasclass42 linescommonextends NamespacedSchema1.3 KB

API Surface (2)

SequencedMap<String, Supplier<TypeTemplate>> components(final Schema schema)
void registerTypes(final Schema schema, final Map<String, Supplier<TypeTemplate>> entityTypes, final Map<String, Supplier<TypeTemplate>> blockEntityTypes)

Fields & Constants (1)

entityTypes

String literals (5)

"minecraft:pot_decorations"
"back"
"left"
"right"
"front"

Code Graph: Dependencies (3)

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

Full Source

V4996.java42 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.datafix.schemas;
2
3
import com.mojang.datafixers.DSL;
4
import com.mojang.datafixers.schemas.Schema;
5
import com.mojang.datafixers.types.templates.TypeTemplate;
6
import java.util.Map;
7
import java.util.SequencedMap;
8
import java.util.function.Supplier;
9
import net.minecraft.util.datafix.fixes.References;
10
11
public class V4996 extends NamespacedSchema {
12
	public V4996(final int versionKey, final Schema parent) {
13
		super(versionKey, parent);
14
	}
15
16
	public static SequencedMap<String, Supplier<TypeTemplate>> components(final Schema schema) {
17
		SequencedMap<String, Supplier<TypeTemplate>> components = V4059.components(schema);
18
		components.put(
19
			"minecraft:pot_decorations",
20
			() -> DSL.optionalFields(
21
				"back",
22
				References.ITEM_STACK.in(schema),
23
				"left",
24
				References.ITEM_STACK.in(schema),
25
				"right",
26
				References.ITEM_STACK.in(schema),
27
				"front",
28
				References.ITEM_STACK.in(schema)
29
			)
30
		);
31
		return components;
32
	}
33
34
	@Override
35
	public void registerTypes(
36
		final Schema schema, final Map<String, Supplier<TypeTemplate>> entityTypes, final Map<String, Supplier<TypeTemplate>> blockEntityTypes
37
	) {
38
		super.registerTypes(schema, entityTypes, blockEntityTypes);
39
		schema.registerType(true, References.DATA_COMPONENTS, () -> DSL.optionalFieldsLazy(components(schema)));
40
	}
41
}
42

Decompiled Minecraft 26.3 source of V4996 (net/minecraft/util/datafix/schemas/V4996.java) with Mojang official mappings, stored verbatim on the site.