PlayerUUIDFix.java
net.minecraft.util.datafix.fixes.PlayerUUIDFix
信息
- 全限定名:net.minecraft.util.datafix.fixes.PlayerUUIDFix
- 类型:public class
- 包:net.minecraft.util.datafix.fixes
- 源码路径:src/main/java/net/minecraft/util/datafix/fixes/PlayerUUIDFix.java
- 起始行号:L8
- 继承:AbstractUUIDFix
- 职责:
TODO
字段/常量
- 无
内部类/嵌套类型
- 无
构造器
public PlayerUUIDFix(Schema outputSchema) @ L9
- 构造器名:PlayerUUIDFix
- 源码定位:L9
- 修饰符:public
参数:
- outputSchema: Schema
说明:
TODO
方法
下面的方法块按源码顺序生成。
protected TypeRewriteRule makeRule() @ L13
- 方法名:makeRule
- 源码定位:L13
- 返回类型:TypeRewriteRule
- 修饰符:protected
参数:
- 无
说明:
TODO
代码
public class PlayerUUIDFix extends AbstractUUIDFix {
public PlayerUUIDFix(Schema outputSchema) {
super(outputSchema, References.PLAYER);
}
@Override
protected TypeRewriteRule makeRule() {
return this.fixTypeEverywhereTyped(
"PlayerUUIDFix",
this.getInputSchema().getType(this.typeReference),
input -> {
OpticFinder<?> rootVehicleFinder = input.getType().findField("RootVehicle");
return input.updateTyped(
rootVehicleFinder,
rootVehicleFinder.type(),
rootVehicle -> rootVehicle.update(DSL.remainderFinder(), tag -> replaceUUIDLeastMost(tag, "Attach", "Attach").orElse(tag))
)
.update(DSL.remainderFinder(), tag -> EntityUUIDFix.updateEntityUUID(EntityUUIDFix.updateLivingEntity(tag)));
}
);
}
}引用的其他类
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
EntityUUIDFix.updateEntityUUID(), EntityUUIDFix.updateLivingEntity()
- 引用位置: