ZombieNautilusCoralModel.java
net.minecraft.client.model.monster.nautilus.ZombieNautilusCoralModel
信息
- 全限定名:net.minecraft.client.model.monster.nautilus.ZombieNautilusCoralModel
- 类型:public class
- 包:net.minecraft.client.model.monster.nautilus
- 源码路径:src/main/java/net/minecraft/client/model/monster/nautilus/ZombieNautilusCoralModel.java
- 起始行号:L15
- 继承:NautilusModel
- 职责:
TODO
字段/常量
corals- 类型:
ModelPart - 修饰符:
private final - 源码定位:
L16 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public ZombieNautilusCoralModel(ModelPart root) @ L18
- 构造器名:ZombieNautilusCoralModel
- 源码定位:L18
- 修饰符:public
参数:
- root: ModelPart
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static LayerDefinition createBodyLayer() @ L24
- 方法名:createBodyLayer
- 源码定位:L24
- 返回类型:LayerDefinition
- 修饰符:public static
参数:
- 无
说明:
TODO
public void setupAnim(NautilusRenderState state) @ L74
- 方法名:setupAnim
- 源码定位:L74
- 返回类型:void
- 修饰符:public
参数:
- state: NautilusRenderState
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class ZombieNautilusCoralModel extends NautilusModel {
private final ModelPart corals;
public ZombieNautilusCoralModel(ModelPart root) {
super(root);
ModelPart shell = this.nautilus.getChild("shell");
this.corals = shell.getChild("corals");
}
public static LayerDefinition createBodyLayer() {
MeshDefinition mesh = createBodyMesh();
PartDefinition corals = mesh.getRoot()
.getChild("root")
.getChild("shell")
.addOrReplaceChild("corals", CubeListBuilder.create(), PartPose.offset(8.0F, 4.5F, -8.0F));
PartDefinition yellowCoral = corals.addOrReplaceChild("yellow_coral", CubeListBuilder.create(), PartPose.offset(0.0F, -11.0F, 11.0F));
yellowCoral.addOrReplaceChild(
"yellow_coral_second",
CubeListBuilder.create().texOffs(0, 85).addBox(-4.5F, -3.5F, 0.0F, 6.0F, 8.0F, 0.0F),
PartPose.offsetAndRotation(0.0F, 0.0F, 2.0F, 0.0F, -0.7854F, 0.0F)
);
yellowCoral.addOrReplaceChild(
"yellow_coral_first",
CubeListBuilder.create().texOffs(0, 85).addBox(-4.5F, -3.5F, 0.0F, 6.0F, 8.0F, 0.0F),
PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, 0.7854F, 0.0F)
);
PartDefinition pinkCoral = corals.addOrReplaceChild(
"pink_coral", CubeListBuilder.create().texOffs(-8, 94).addBox(-4.5F, 4.5F, 0.0F, 6.0F, 0.0F, 8.0F), PartPose.offset(-12.5F, -18.0F, 11.0F)
);
pinkCoral.addOrReplaceChild(
"pink_coral_second",
CubeListBuilder.create().texOffs(-8, 94).addBox(-3.0F, 0.0F, -4.0F, 6.0F, 0.0F, 8.0F),
PartPose.offsetAndRotation(-1.5F, 4.5F, 4.0F, 0.0F, 0.0F, 1.5708F)
);
PartDefinition blueCoral = corals.addOrReplaceChild("blue_coral", CubeListBuilder.create(), PartPose.offset(-14.0F, 0.0F, 5.5F));
blueCoral.addOrReplaceChild(
"blue_second",
CubeListBuilder.create().texOffs(0, 102).addBox(-3.5F, -5.5F, 0.0F, 5.0F, 10.0F, 0.0F),
PartPose.offsetAndRotation(0.0F, 0.0F, -2.0F, 0.0F, 0.7854F, 0.0F)
);
blueCoral.addOrReplaceChild(
"blue_first",
CubeListBuilder.create().texOffs(0, 102).addBox(-3.5F, -5.5F, 0.0F, 5.0F, 10.0F, 0.0F),
PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, -0.7854F, 0.0F)
);
PartDefinition redCoral = corals.addOrReplaceChild("red_coral", CubeListBuilder.create(), PartPose.offset(0.0F, 0.0F, 0.0F));
redCoral.addOrReplaceChild(
"red_coral_second",
CubeListBuilder.create().texOffs(0, 112).addBox(-2.5F, -5.5F, 0.0F, 4.0F, 10.0F, 0.0F),
PartPose.offsetAndRotation(-0.5F, -1.0F, 1.5F, 0.0F, -0.829F, 0.0F)
);
redCoral.addOrReplaceChild(
"red_coral_first",
CubeListBuilder.create().texOffs(0, 112).addBox(-4.5F, -5.5F, 0.0F, 6.0F, 10.0F, 0.0F),
PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, 0.7854F, 0.0F)
);
return LayerDefinition.create(mesh, 128, 128);
}
@Override
public void setupAnim(NautilusRenderState state) {
super.setupAnim(state);
this.corals.visible = state.bodyArmorItem.isEmpty();
}
}引用的其他类
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数/字段
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PartPose.offset(), PartPose.offsetAndRotation()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CubeListBuilder.create()
- 引用位置:
-
- 引用位置:
方法调用/返回值 - 关联成员:
LayerDefinition.create()
- 引用位置:
-
- 引用位置:
参数
- 引用位置: