V4312 .java

net.minecraft.util.datafix.schemas.V4312 (class): members: registerTypes, entityTypes. strings: "ShoulderEntityRight", "ShoulderEntityLeft", "recipeBook".

net.minecraft.util.datafix.schemasclass39 linescommonextends NamespacedSchema1.5 KB

API Surface (1)

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

Fields & Constants (1)

entityTypes

String literals (10)

"RootVehicle"
"Entity"
"ender_pearls"
"Inventory"
"EnderItems"
"ShoulderEntityLeft"
"ShoulderEntityRight"
"recipeBook"
"recipes"
"toBeDisplayed"

Code Graph: Dependencies (2)

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

Full Source

V4312.java39 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 com.mojang.datafixers.util.Pair;
7
import java.util.Map;
8
import java.util.function.Supplier;
9
import net.minecraft.util.datafix.fixes.References;
10
11
public class V4312 extends NamespacedSchema {
12
	public V4312(final int versionKey, final Schema parent) {
13
		super(versionKey, parent);
14
	}
15
16
	@Override
17
	public void registerTypes(
18
		final Schema schema, final Map<String, Supplier<TypeTemplate>> entityTypes, final Map<String, Supplier<TypeTemplate>> blockEntityTypes
19
	) {
20
		super.registerTypes(schema, entityTypes, blockEntityTypes);
21
		schema.registerType(
22
			false,
23
			References.PLAYER,
24
			() -> DSL.and(
25
				References.ENTITY_EQUIPMENT.in(schema),
26
				DSL.optionalFields(
27
					Pair.of("RootVehicle", DSL.optionalFields("Entity", References.ENTITY_TREE.in(schema))),
28
					Pair.of("ender_pearls", DSL.list(References.ENTITY_TREE.in(schema))),
29
					Pair.of("Inventory", DSL.list(References.ITEM_STACK.in(schema))),
30
					Pair.of("EnderItems", DSL.list(References.ITEM_STACK.in(schema))),
31
					Pair.of("ShoulderEntityLeft", References.ENTITY_TREE.in(schema)),
32
					Pair.of("ShoulderEntityRight", References.ENTITY_TREE.in(schema)),
33
					Pair.of("recipeBook", DSL.optionalFields("recipes", DSL.list(References.RECIPE.in(schema)), "toBeDisplayed", DSL.list(References.RECIPE.in(schema))))
34
				)
35
			)
36
		);
37
	}
38
}
39

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