AreaEffectCloudDurationScaleFix.java

net.minecraft.util.datafix.fixes.AreaEffectCloudDurationScaleFix

信息

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

    TODO

字段/常量

内部类/嵌套类型

构造器

public AreaEffectCloudDurationScaleFix(Schema outputSchema) @ L8

  • 构造器名:AreaEffectCloudDurationScaleFix
  • 源码定位:L8
  • 修饰符:public

参数:

  • outputSchema: Schema

说明:

TODO

方法

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

protected Typed<?> fix(Typed<?> entity) @ L12

  • 方法名:fix
  • 源码定位:L12
  • 返回类型:Typed<?>
  • 修饰符:protected

参数:

  • entity: Typed<?>

说明:

TODO

代码

public class AreaEffectCloudDurationScaleFix extends NamedEntityFix {
    public AreaEffectCloudDurationScaleFix(Schema outputSchema) {
        super(outputSchema, false, "AreaEffectCloudDurationScaleFix", References.ENTITY, "minecraft:area_effect_cloud");
    }
 
    @Override
    protected Typed<?> fix(Typed<?> entity) {
        return entity.update(DSL.remainderFinder(), tag -> tag.set("potion_duration_scale", tag.createFloat(0.25F)));
    }
}

引用的其他类