mirror of
https://github.com/nimsolated/Nims-Random-BS.git
synced 2026-04-02 02:05:20 -07:00
78 lines
3.6 KiB
Java
78 lines
3.6 KiB
Java
// Made with Blockbench 5.0.7
|
|
// Exported for Minecraft version 1.17 or later with Mojang mappings
|
|
// Paste this class into your mod and generate all required imports
|
|
|
|
public class Modelpeguin<T extends Entity> extends EntityModel<T> {
|
|
// This layer location should be baked with EntityRendererProvider.Context in
|
|
// the entity renderer and passed into this model's constructor
|
|
public static final ModelLayerLocation LAYER_LOCATION = new ModelLayerLocation(
|
|
new ResourceLocation("modid", "peguin"), "main");
|
|
private final ModelPart root;
|
|
private final ModelPart Head;
|
|
private final ModelPart BodySegment;
|
|
private final ModelPart LeftLeg;
|
|
private final ModelPart RightLeg;
|
|
private final ModelPart Body;
|
|
private final ModelPart RightArm;
|
|
private final ModelPart LeftArm;
|
|
|
|
public Modelpeguin(ModelPart root) {
|
|
this.root = root.getChild("root");
|
|
this.Head = this.root.getChild("Head");
|
|
this.BodySegment = this.root.getChild("BodySegment");
|
|
this.LeftLeg = this.BodySegment.getChild("LeftLeg");
|
|
this.RightLeg = this.BodySegment.getChild("RightLeg");
|
|
this.Body = this.BodySegment.getChild("Body");
|
|
this.RightArm = this.BodySegment.getChild("RightArm");
|
|
this.LeftArm = this.BodySegment.getChild("LeftArm");
|
|
}
|
|
|
|
public static LayerDefinition createBodyLayer() {
|
|
MeshDefinition meshdefinition = new MeshDefinition();
|
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
|
|
|
PartDefinition root = partdefinition.addOrReplaceChild("root", CubeListBuilder.create(),
|
|
PartPose.offsetAndRotation(-0.3125F, 24.0F, -0.0938F, 0.0F, 1.5708F, 0.0F));
|
|
|
|
PartDefinition Head = root.addOrReplaceChild("Head",
|
|
CubeListBuilder.create().texOffs(42, 46)
|
|
.addBox(0.5625F, -2.7188F, 1.0625F, 2.0F, 2.0F, 4.0F, new CubeDeformation(0.0F)).texOffs(0, 30)
|
|
.addBox(-7.0F, -8.0F, -1.0F, 8.0F, 8.0F, 8.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(2.875F, -16.0625F, -2.8438F));
|
|
|
|
PartDefinition BodySegment = root.addOrReplaceChild("BodySegment", CubeListBuilder.create(),
|
|
PartPose.offset(-1.5625F, 0.0F, -2.0F));
|
|
|
|
PartDefinition LeftLeg = BodySegment.addOrReplaceChild("LeftLeg", CubeListBuilder.create().texOffs(30, 46)
|
|
.addBox(-1.8125F, -2.0F, -1.125F, 2.0F, 2.0F, 4.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(9.6875F, 0.0F, 5.2188F));
|
|
|
|
PartDefinition RightLeg = BodySegment.addOrReplaceChild("RightLeg", CubeListBuilder.create().texOffs(18, 46)
|
|
.addBox(-1.8125F, -2.0F, -1.3438F, 2.0F, 2.0F, 4.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(9.6875F, 0.0F, -2.5625F));
|
|
|
|
PartDefinition Body = BodySegment.addOrReplaceChild("Body", CubeListBuilder.create().texOffs(0, 0)
|
|
.addBox(-14.0F, -16.0F, 0.0F, 14.0F, 16.0F, 14.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(8.5938F, 0.0F, -4.7813F));
|
|
|
|
PartDefinition RightArm = BodySegment.addOrReplaceChild("RightArm", CubeListBuilder.create().texOffs(32, 30)
|
|
.addBox(-4.25F, 0.0F, -0.0625F, 8.0F, 15.0F, 1.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(1.6875F, -16.0313F, -5.6875F));
|
|
|
|
PartDefinition LeftArm = BodySegment.addOrReplaceChild("LeftArm", CubeListBuilder.create().texOffs(0, 46)
|
|
.addBox(-4.0F, -0.0313F, -1.0F, 8.0F, 15.0F, 1.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(1.4375F, -16.0F, 10.125F));
|
|
|
|
return LayerDefinition.create(meshdefinition, 64, 64);
|
|
}
|
|
|
|
@Override
|
|
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay,
|
|
float red, float green, float blue, float alpha) {
|
|
root.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
}
|
|
|
|
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
|
float headPitch) {
|
|
}
|
|
} |