mirror of
https://github.com/nimsolated/Nims-Random-BS.git
synced 2026-04-02 10:20:42 -07:00
43 lines
2.0 KiB
Java
43 lines
2.0 KiB
Java
// Made with Blockbench 5.1.1
|
|
// Exported for Minecraft version 1.17 or later with Mojang mappings
|
|
// Paste this class into your mod and generate all required imports
|
|
|
|
public class ModelWarTankBullet<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", "wartankbullet"), "main");
|
|
private final ModelPart root;
|
|
|
|
public ModelWarTankBullet(ModelPart root) {
|
|
this.root = root.getChild("root");
|
|
}
|
|
|
|
public static LayerDefinition createBodyLayer() {
|
|
MeshDefinition meshdefinition = new MeshDefinition();
|
|
PartDefinition partdefinition = meshdefinition.getRoot();
|
|
|
|
PartDefinition root = partdefinition.addOrReplaceChild("root",
|
|
CubeListBuilder.create().texOffs(0, 0)
|
|
.addBox(-1.0F, -1.0F, -1.0F, 2.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(0, 4)
|
|
.addBox(-1.0F, 1.0F, -1.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(0, 7)
|
|
.addBox(-1.0F, -2.0F, -1.0F, 2.0F, 1.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(8, 0)
|
|
.addBox(1.0F, -1.0F, -1.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(8, 4)
|
|
.addBox(-2.0F, -1.0F, -1.0F, 1.0F, 2.0F, 2.0F, new CubeDeformation(0.0F)).texOffs(8, 8)
|
|
.addBox(-1.0F, -1.0F, -2.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)).texOffs(0, 10)
|
|
.addBox(-1.0F, -1.0F, 1.0F, 2.0F, 2.0F, 1.0F, new CubeDeformation(0.0F)),
|
|
PartPose.offset(0.0F, 22.0F, 0.0F));
|
|
|
|
return LayerDefinition.create(meshdefinition, 16, 16);
|
|
}
|
|
|
|
@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) {
|
|
}
|
|
} |