V4067.java

net.minecraft.util.datafix.schemas.V4067

信息

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

    TODO

字段/常量

内部类/嵌套类型

构造器

public V4067(int versionKey, Schema parent) @ L11

  • 构造器名:V4067
  • 源码定位:L11
  • 修饰符:public

参数:

  • versionKey: int
  • parent: Schema

说明:

TODO

方法

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

public Map<String,Supplier<TypeTemplate>> registerEntities(Schema schema) @ L15

  • 方法名:registerEntities
  • 源码定位:L15
  • 返回类型:Map<String,Supplier>
  • 修饰符:public

参数:

  • schema: Schema

说明:

TODO

private void registerChestBoat(Map<String,Supplier<TypeTemplate>> map, String id) @ L41

  • 方法名:registerChestBoat
  • 源码定位:L41
  • 返回类型:void
  • 修饰符:private

参数:

  • map: Map<String,Supplier>
  • id: String

说明:

TODO

代码

public class V4067 extends NamespacedSchema {
    public V4067(int versionKey, Schema parent) {
        super(versionKey, parent);
    }
 
    @Override
    public Map<String, Supplier<TypeTemplate>> registerEntities(Schema schema) {
        Map<String, Supplier<TypeTemplate>> map = super.registerEntities(schema);
        map.remove("minecraft:boat");
        map.remove("minecraft:chest_boat");
        this.registerSimple(map, "minecraft:oak_boat");
        this.registerSimple(map, "minecraft:spruce_boat");
        this.registerSimple(map, "minecraft:birch_boat");
        this.registerSimple(map, "minecraft:jungle_boat");
        this.registerSimple(map, "minecraft:acacia_boat");
        this.registerSimple(map, "minecraft:cherry_boat");
        this.registerSimple(map, "minecraft:dark_oak_boat");
        this.registerSimple(map, "minecraft:mangrove_boat");
        this.registerSimple(map, "minecraft:bamboo_raft");
        this.registerChestBoat(map, "minecraft:oak_chest_boat");
        this.registerChestBoat(map, "minecraft:spruce_chest_boat");
        this.registerChestBoat(map, "minecraft:birch_chest_boat");
        this.registerChestBoat(map, "minecraft:jungle_chest_boat");
        this.registerChestBoat(map, "minecraft:acacia_chest_boat");
        this.registerChestBoat(map, "minecraft:cherry_chest_boat");
        this.registerChestBoat(map, "minecraft:dark_oak_chest_boat");
        this.registerChestBoat(map, "minecraft:mangrove_chest_boat");
        this.registerChestBoat(map, "minecraft:bamboo_chest_raft");
        return map;
    }
 
    private void registerChestBoat(Map<String, Supplier<TypeTemplate>> map, String id) {
        this.register(map, id, name -> DSL.optionalFields("Items", DSL.list(References.ITEM_STACK.in(this))));
    }
}

引用的其他类