46 lines
No EOL
1.8 KiB
Java
46 lines
No EOL
1.8 KiB
Java
// Made with Blockbench 4.9.4
|
|
// Exported for Minecraft version 1.17 or later with Mojang mappings
|
|
// Paste this class into your mod and generate all required imports
|
|
|
|
public class Modelbullet<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", "bullet"), "main");
|
|
private final ModelPart bone;
|
|
|
|
public Modelbullet(ModelPart root) {
|
|
this.bone = root.getChild("bone");
|
|
}
|
|
|
|
public static LayerDefinition createBodyLayer() {
|
|
MeshDefinition meshdefinition = new MeshDefinition();
|
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
|
|
|
PartDefinition bone = partdefinition.addOrReplaceChild("bone", CubeListBuilder.create(),
|
|
PartPose.offset(0.0F, 8.0F, 0.0F));
|
|
|
|
PartDefinition bone2 = bone.addOrReplaceChild("bone2", CubeListBuilder.create(),
|
|
PartPose.offset(-2.1213F, 8.5F, 0.0F));
|
|
|
|
PartDefinition cube_r1 = bone2
|
|
.addOrReplaceChild("cube_r1",
|
|
CubeListBuilder.create().texOffs(1, 1).addBox(-1.5F, -21.5F, -1.5F, 1.0F, 5.0F, 1.0F,
|
|
new CubeDeformation(0.0F)),
|
|
PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, 0.7854F, 0.0F));
|
|
|
|
return LayerDefinition.create(meshdefinition, 16, 16);
|
|
}
|
|
|
|
@Override
|
|
public void setupAnim(T entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,
|
|
float headPitch) {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void renderToBuffer(PoseStack poseStack, VertexConsumer vertexConsumer, int packedLight, int packedOverlay,
|
|
float red, float green, float blue, float alpha) {
|
|
bone.render(poseStack, vertexConsumer, packedLight, packedOverlay, red, green, blue, alpha);
|
|
}
|
|
} |