BabyGoatModel.java
net.minecraft.client.model.animal.goat.BabyGoatModel
信息
- 全限定名:net.minecraft.client.model.animal.goat.BabyGoatModel
- 类型:public class
- 包:net.minecraft.client.model.animal.goat
- 源码路径:src/main/java/net/minecraft/client/model/animal/goat/BabyGoatModel.java
- 起始行号:L14
- 继承:GoatModel
- 职责:
TODO
字段/常量
HEAD_MAIN- 类型:
String - 修饰符:
private static final - 源码定位:
L15 - 说明:
TODO
- 类型:
内部类/嵌套类型
- 无
构造器
public BabyGoatModel(ModelPart root) @ L17
- 构造器名:BabyGoatModel
- 源码定位:L17
- 修饰符:public
参数:
- root: ModelPart
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static LayerDefinition createBodyLayer() @ L21
- 方法名:createBodyLayer
- 源码定位:L21
- 返回类型:LayerDefinition
- 修饰符:public static
参数:
- 无
说明:
TODO
public void setupAnim(GoatRenderState state) @ L72
- 方法名:setupAnim
- 源码定位:L72
- 返回类型:void
- 修饰符:public
参数:
- state: GoatRenderState
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class BabyGoatModel extends GoatModel {
private static final String HEAD_MAIN = "HeadMain";
public BabyGoatModel(ModelPart root) {
super(root);
}
public static LayerDefinition createBodyLayer() {
MeshDefinition mesh = new MeshDefinition();
PartDefinition root = mesh.getRoot();
root.addOrReplaceChild(
"left_hind_leg", CubeListBuilder.create().texOffs(29, 12).addBox(-1.0F, -0.5F, -1.0F, 2.0F, 5.0F, 2.0F), PartPose.offset(1.5F, 19.5F, 3.0F)
);
root.addOrReplaceChild(
"right_hind_leg", CubeListBuilder.create().texOffs(21, 12).addBox(-1.0F, -0.5F, -1.0F, 2.0F, 5.0F, 2.0F), PartPose.offset(-1.5F, 19.5F, 3.0F)
);
root.addOrReplaceChild(
"right_front_leg", CubeListBuilder.create().texOffs(21, 5).addBox(-1.0F, -0.5F, -1.0F, 2.0F, 5.0F, 2.0F), PartPose.offset(-1.5F, 19.5F, -2.0F)
);
root.addOrReplaceChild(
"left_front_leg", CubeListBuilder.create().texOffs(29, 5).addBox(-1.0F, -0.5F, -1.0F, 2.0F, 5.0F, 2.0F), PartPose.offset(1.5F, 19.5F, -2.0F)
);
root.addOrReplaceChild(
"body",
CubeListBuilder.create().texOffs(0, 10).addBox(-3.0F, -2.3F, -4.5F, 6.0F, 5.0F, 9.0F).texOffs(0, 24).addBox(-2.5F, -2.2F, -4.0F, 5.0F, 4.0F, 8.0F),
PartPose.offset(0.0F, 17.8F, 0.0F)
);
PartDefinition head = root.addOrReplaceChild(
"head",
CubeListBuilder.create().texOffs(0, 0).addBox(-2.0F, -3.8126F, -5.1548F, 4.0F, 4.0F, 6.0F),
PartPose.offsetAndRotation(0.0F, 15.5F, -3.0F, 0.4363F, 0.0F, 0.0F)
);
head.addOrReplaceChild(
"right_horn",
CubeListBuilder.create().texOffs(24, 0).mirror().addBox(0.0F, -4.5F, 0.0F, 1.0F, 2.0F, 1.0F).mirror(false),
PartPose.offsetAndRotation(-1.5F, -1.5F, -1.0F, (float) (-Math.PI / 8), 0.0F, 0.0F)
);
head.addOrReplaceChild(
"left_horn",
CubeListBuilder.create().texOffs(24, 0).mirror().addBox(2.0F, -4.5F, 0.0F, 1.0F, 2.0F, 1.0F).mirror(false),
PartPose.offsetAndRotation(-1.5F, -1.5F, -1.0F, (float) (-Math.PI / 8), 0.0F, 0.0F)
);
head.addOrReplaceChild(
"right_ear",
CubeListBuilder.create().texOffs(0, 12).mirror().addBox(-2.0F, -0.5F, -0.5F, 2.0F, 1.0F, 1.0F).mirror(false),
PartPose.offsetAndRotation(-1.7F, -2.3126F, 0.1452F, 0.0F, -0.5236F, 0.0F)
);
head.addOrReplaceChild(
"left_ear",
CubeListBuilder.create().texOffs(0, 12).addBox(0.0F, -0.5F, -0.5F, 2.0F, 1.0F, 1.0F),
PartPose.offsetAndRotation(1.7F, -2.3126F, 0.1452F, 0.0F, 0.5236F, 0.0F)
);
head.addOrReplaceChild(
"HeadMain", CubeListBuilder.create().texOffs(0, 0).addBox(-2.0F, -2.5F, -4.0F, 4.0F, 4.0F, 6.0F), PartPose.offset(0.0F, -1.3126F, -1.1548F)
);
return LayerDefinition.create(mesh, 64, 64);
}
@Override
public void setupAnim(GoatRenderState state) {
super.setupAnim(state);
if (state.rammingXHeadRot == 0.0F) {
this.head.xRot = (float) (Math.PI / 8);
}
}
}引用的其他类
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PartPose.offset(), PartPose.offsetAndRotation()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CubeListBuilder.create()
- 引用位置:
-
- 引用位置:
方法调用/返回值 - 关联成员:
LayerDefinition.create()
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
MeshDefinition()
- 引用位置:
-
- 引用位置:
参数
- 引用位置: