V4300 .java

net.minecraft.util.datafix.schemas.V4300 (class): members: registerEntities. strings: "minecraft:skeleton_horse", "minecraft:trader_llama", "Items".

net.minecraft.util.datafix.schemasclass32 linescommonextends NamespacedSchema1.2 KB

API Surface (1)

Map<String, Supplier<TypeTemplate>> registerEntities(final Schema schema)

String literals (8)

"minecraft:llama"
"minecraft:trader_llama"
"minecraft:donkey"
"minecraft:mule"
"minecraft:horse"
"minecraft:skeleton_horse"
"minecraft:zombie_horse"
"Items"

Code Graph: Dependencies (2)

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

Full Source

V4300.java32 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.function.Supplier;
8
import net.minecraft.util.datafix.fixes.References;
9
10
public class V4300 extends NamespacedSchema {
11
	public V4300(final int versionKey, final Schema parent) {
12
		super(versionKey, parent);
13
	}
14
15
	@Override
16
	public Map<String, Supplier<TypeTemplate>> registerEntities(final Schema schema) {
17
		Map<String, Supplier<TypeTemplate>> map = super.registerEntities(schema);
18
		schema.register(map, "minecraft:llama", name -> entityWithInventory(schema));
19
		schema.register(map, "minecraft:trader_llama", name -> entityWithInventory(schema));
20
		schema.register(map, "minecraft:donkey", name -> entityWithInventory(schema));
21
		schema.register(map, "minecraft:mule", name -> entityWithInventory(schema));
22
		schema.registerSimple(map, "minecraft:horse");
23
		schema.registerSimple(map, "minecraft:skeleton_horse");
24
		schema.registerSimple(map, "minecraft:zombie_horse");
25
		return map;
26
	}
27
28
	private static TypeTemplate entityWithInventory(final Schema schema) {
29
		return DSL.optionalFields("Items", DSL.list(References.ITEM_STACK.in(schema)));
30
	}
31
}
32

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