DebugProfileOverlayReferenceFix.java

net.minecraft.util.datafix.fixes.DebugProfileOverlayReferenceFix

信息

  • 全限定名:net.minecraft.util.datafix.fixes.DebugProfileOverlayReferenceFix
  • 类型:public class
  • 包:net.minecraft.util.datafix.fixes
  • 源码路径:src/main/java/net/minecraft/util/datafix/fixes/DebugProfileOverlayReferenceFix.java
  • 起始行号:L8
  • 继承:DataFix
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

public DebugProfileOverlayReferenceFix(Schema outputSchema) @ L9

  • 构造器名:DebugProfileOverlayReferenceFix
  • 源码定位:L9
  • 修饰符:public

参数:

  • outputSchema: Schema

说明:

TODO

方法

下面的方法块按源码顺序生成。

protected TypeRewriteRule makeRule() @ L13

  • 方法名:makeRule
  • 源码定位:L13
  • 返回类型:TypeRewriteRule
  • 修饰符:protected

参数:

说明:

TODO

代码

public class DebugProfileOverlayReferenceFix extends DataFix {
    public DebugProfileOverlayReferenceFix(Schema outputSchema) {
        super(outputSchema, false);
    }
 
    @Override
    protected TypeRewriteRule makeRule() {
        return this.fixTypeEverywhereTyped(
            "DebugProfileOverlayReferenceFix",
            this.getInputSchema().getType(References.DEBUG_PROFILE),
            typed -> typed.update(
                DSL.remainderFinder(),
                file -> file.update(
                    "custom",
                    custom -> custom.updateMapValues(
                        pair -> pair.mapSecond(value -> value.asString("").equals("inF3") ? value.createString("inOverlay") : value)
                    )
                )
            )
        );
    }
}

引用的其他类