BabyWolfModel.java
net.minecraft.client.model.animal.wolf.BabyWolfModel
信息
- 全限定名:net.minecraft.client.model.animal.wolf.BabyWolfModel
- 类型:public class
- 包:net.minecraft.client.model.animal.wolf
- 源码路径:src/main/java/net/minecraft/client/model/animal/wolf/BabyWolfModel.java
- 起始行号:L15
- 继承:WolfModel
- 职责:
TODO
字段/常量
- 无
内部类/嵌套类型
- 无
构造器
public BabyWolfModel(ModelPart root) @ L16
- 构造器名:BabyWolfModel
- 源码定位:L16
- 修饰符:public
参数:
- root: ModelPart
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static LayerDefinition createBodyLayer() @ L20
- 方法名:createBodyLayer
- 源码定位:L20
- 返回类型:LayerDefinition
- 修饰符:public static
参数:
- 无
说明:
TODO
protected void shakeOffWater(WolfRenderState state) @ L60
- 方法名:shakeOffWater
- 源码定位:L60
- 返回类型:void
- 修饰符:protected
参数:
- state: WolfRenderState
说明:
TODO
protected void setSittingPose(WolfRenderState state) @ L67
- 方法名:setSittingPose
- 源码定位:L67
- 返回类型:void
- 修饰符:protected
参数:
- state: WolfRenderState
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class BabyWolfModel extends WolfModel {
public BabyWolfModel(ModelPart root) {
super(root);
}
public static LayerDefinition createBodyLayer() {
MeshDefinition mesh = new MeshDefinition();
PartDefinition root = mesh.getRoot();
PartDefinition head = root.addOrReplaceChild(
"head",
CubeListBuilder.create()
.texOffs(0, 12)
.addBox(-2.99F, -3.25F, -3.0F, 6.0F, 5.0F, 5.0F, new CubeDeformation(0.025F))
.texOffs(17, 12)
.addBox(-1.5F, -0.24F, -5.0F, 3.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)),
PartPose.offset(0.0F, 18.25F, -4.0F)
);
head.addOrReplaceChild(
"right_ear", CubeListBuilder.create().texOffs(0, 5).addBox(-1.0F, -1.0F, -0.5F, 2.0F, 2.0F, 1.0F), PartPose.offset(-2.0F, -4.25F, -0.5F)
);
head.addOrReplaceChild(
"left_ear", CubeListBuilder.create().texOffs(20, 5).addBox(-1.0F, -1.0F, -0.5F, 2.0F, 2.0F, 1.0F), PartPose.offset(2.0F, -4.25F, -0.5F)
);
root.addOrReplaceChild("body", CubeListBuilder.create().texOffs(0, 0).addBox(-3.0F, -2.0F, -4.0F, 6.0F, 4.0F, 8.0F), PartPose.offset(0.0F, 19.0F, 0.0F));
root.addOrReplaceChild(
"right_hind_leg", CubeListBuilder.create().texOffs(0, 22).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 3.0F, 2.0F), PartPose.offset(-1.5F, 21.0F, 3.0F)
);
root.addOrReplaceChild(
"left_hind_leg", CubeListBuilder.create().texOffs(8, 22).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 3.0F, 2.0F), PartPose.offset(1.5F, 21.0F, 3.0F)
);
root.addOrReplaceChild(
"right_front_leg", CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 3.0F, 2.0F), PartPose.offset(-1.5F, 21.0F, -3.0F)
);
root.addOrReplaceChild(
"left_front_leg", CubeListBuilder.create().texOffs(20, 0).addBox(-1.0F, 0.0F, -1.0F, 2.0F, 3.0F, 2.0F), PartPose.offset(1.5F, 21.0F, -3.0F)
);
PartDefinition tail = root.addOrReplaceChild("tail", CubeListBuilder.create(), PartPose.offsetAndRotation(0.0F, 19.0F, 3.0F, -0.5236F, 0.0F, 0.0F));
tail.addOrReplaceChild(
"tail_r1",
CubeListBuilder.create().texOffs(22, 16).addBox(-1.0F, -5.7F, -1.0F, 2.0F, 6.0F, 2.0F, new CubeDeformation(0.0F)),
PartPose.offsetAndRotation(0.0F, -0.6F, 0.2F, -3.1F, 0.0F, 0.0F)
);
return LayerDefinition.create(mesh, 32, 32);
}
@Override
protected void shakeOffWater(WolfRenderState state) {
super.shakeOffWater(state);
this.head.zRot = state.headRollAngle + state.getBodyRollAngle(0.0F);
this.tail.zRot = state.getBodyRollAngle(-0.2F);
}
@Override
protected void setSittingPose(WolfRenderState state) {
super.setSittingPose(state);
this.body.xRot--;
}
}引用的其他类
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PartPose.offset(), PartPose.offsetAndRotation()
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
CubeDeformation()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CubeListBuilder.create()
- 引用位置:
-
- 引用位置:
方法调用/返回值 - 关联成员:
LayerDefinition.create()
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
MeshDefinition()
- 引用位置:
-
- 引用位置:
参数
- 引用位置: