SheepFurModel.java
net.minecraft.client.model.animal.sheep.SheepFurModel
信息
- 全限定名:net.minecraft.client.model.animal.sheep.SheepFurModel
- 类型:public class
- 包:net.minecraft.client.model.animal.sheep
- 源码路径:src/main/java/net/minecraft/client/model/animal/sheep/SheepFurModel.java
- 起始行号:L16
- 继承:QuadrupedModel
- 职责:
TODO
字段/常量
- 无
内部类/嵌套类型
- 无
构造器
public SheepFurModel(ModelPart root) @ L17
- 构造器名:SheepFurModel
- 源码定位:L17
- 修饰符:public
参数:
- root: ModelPart
说明:
TODO
方法
下面的方法块按源码顺序生成。
public static LayerDefinition createFurLayer() @ L21
- 方法名:createFurLayer
- 源码定位:L21
- 返回类型:LayerDefinition
- 修饰符:public static
参数:
- 无
说明:
TODO
public void setupAnim(SheepRenderState state) @ L42
- 方法名:setupAnim
- 源码定位:L42
- 返回类型:void
- 修饰符:public
参数:
- state: SheepRenderState
说明:
TODO
代码
@OnlyIn(Dist.CLIENT)
public class SheepFurModel extends QuadrupedModel<SheepRenderState> {
public SheepFurModel(ModelPart root) {
super(root);
}
public static LayerDefinition createFurLayer() {
MeshDefinition mesh = new MeshDefinition();
PartDefinition root = mesh.getRoot();
root.addOrReplaceChild(
"head",
CubeListBuilder.create().texOffs(0, 0).addBox(-3.0F, -4.0F, -4.0F, 6.0F, 6.0F, 6.0F, new CubeDeformation(0.6F)),
PartPose.offset(0.0F, 6.0F, -8.0F)
);
root.addOrReplaceChild(
"body",
CubeListBuilder.create().texOffs(28, 8).addBox(-4.0F, -10.0F, -7.0F, 8.0F, 16.0F, 6.0F, new CubeDeformation(1.75F)),
PartPose.offsetAndRotation(0.0F, 5.0F, 2.0F, (float) (Math.PI / 2), 0.0F, 0.0F)
);
CubeListBuilder leg = CubeListBuilder.create().texOffs(0, 16).addBox(-2.0F, 0.0F, -2.0F, 4.0F, 6.0F, 4.0F, new CubeDeformation(0.5F));
root.addOrReplaceChild("right_hind_leg", leg, PartPose.offset(-3.0F, 12.0F, 7.0F));
root.addOrReplaceChild("left_hind_leg", leg, PartPose.offset(3.0F, 12.0F, 7.0F));
root.addOrReplaceChild("right_front_leg", leg, PartPose.offset(-3.0F, 12.0F, -5.0F));
root.addOrReplaceChild("left_front_leg", leg, PartPose.offset(3.0F, 12.0F, -5.0F));
return LayerDefinition.create(mesh, 64, 32);
}
public void setupAnim(SheepRenderState state) {
super.setupAnim(state);
this.head.y = this.head.y + state.headEatPositionScale * 9.0F * state.ageScale;
this.head.xRot = state.headEatAngleScale;
}
}引用的其他类
-
- 引用位置:
继承
- 引用位置:
-
- 引用位置:
参数
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
PartPose.offset(), PartPose.offsetAndRotation()
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
CubeDeformation()
- 引用位置:
-
- 引用位置:
方法调用 - 关联成员:
CubeListBuilder.create()
- 引用位置:
-
- 引用位置:
方法调用/返回值 - 关联成员:
LayerDefinition.create()
- 引用位置:
-
- 引用位置:
构造调用 - 关联成员:
MeshDefinition()
- 引用位置:
-
- 引用位置:
参数
- 引用位置: