EntityBrushableBlockFieldsRenameFix .java

net.minecraft.util.datafix.fixes.EntityBrushableBlockFieldsRenameFix (class, 22 lines): members: fixTag, fix. strings: "loot_table_seed", "LootTableSeed".

net.minecraft.util.datafix.fixesclass22 linescommonextends NamedEntityFix759 B

API Surface (2)

Dynamic<?> fixTag(final Dynamic<?> input)
Typed<?> fix(final Typed<?> entity)

String literals (5)

"minecraft:brushable_block"
"loot_table"
"LootTable"
"loot_table_seed"
"LootTableSeed"

Code Graph: Dependencies (1)

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

Full Source

EntityBrushableBlockFieldsRenameFix.java22 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.datafix.fixes;
2
3
import com.mojang.datafixers.DSL;
4
import com.mojang.datafixers.Typed;
5
import com.mojang.datafixers.schemas.Schema;
6
import com.mojang.serialization.Dynamic;
7
8
public class EntityBrushableBlockFieldsRenameFix extends NamedEntityFix {
9
	public EntityBrushableBlockFieldsRenameFix(final Schema outputSchema) {
10
		super(outputSchema, false, "EntityBrushableBlockFieldsRenameFix", References.BLOCK_ENTITY, "minecraft:brushable_block");
11
	}
12
13
	public Dynamic<?> fixTag(final Dynamic<?> input) {
14
		return input.renameField("loot_table", "LootTable").renameField("loot_table_seed", "LootTableSeed");
15
	}
16
17
	@Override
18
	protected Typed<?> fix(final Typed<?> entity) {
19
		return entity.update(DSL.remainderFinder(), this::fixTag);
20
	}
21
}
22

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