30 lines
905 B
Java
30 lines
905 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.mojang.datafixers.DSL
|
|
* com.mojang.datafixers.DataFix
|
|
* com.mojang.datafixers.TypeRewriteRule
|
|
* com.mojang.datafixers.schemas.Schema
|
|
*/
|
|
package net.minecraft.util.datafix.fixes;
|
|
|
|
import com.mojang.datafixers.DSL;
|
|
import com.mojang.datafixers.DataFix;
|
|
import com.mojang.datafixers.TypeRewriteRule;
|
|
import com.mojang.datafixers.schemas.Schema;
|
|
import java.util.Map;
|
|
import net.minecraft.util.datafix.fixes.References;
|
|
|
|
public class MapIdFix
|
|
extends DataFix {
|
|
public MapIdFix(Schema schema) {
|
|
super(schema, false);
|
|
}
|
|
|
|
protected TypeRewriteRule makeRule() {
|
|
return this.fixTypeEverywhereTyped("Map id fix", this.getInputSchema().getType(References.SAVED_DATA_MAP_INDEX), input -> input.update(DSL.remainderFinder(), tag -> tag.createMap(Map.of(tag.createString("data"), tag))));
|
|
}
|
|
}
|
|
|