Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ModelBolt extends ModelBase {
- // Fields
- ModelRenderer MainPart;
- public ModelBolt() {
- textureWidth = 64;
- textureHeight = 32;
- MainPart = new ModelRenderer(this, 0, 0);
- MainPart.addBox(0F, 0F, 0F, 5, 5, 5);
- MainPart.setRotationPoint(0F, 0F, 0F);
- MainPart.setTextureSize(64, 32);
- MainPart.mirror = true;
- setRotation(MainPart, 0F, 0F, 0F);
- }
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float factor) {
- super.render(entity, f, f1, f2, f3, f4, factor);
- setRotationAngles(f, f1, f2, f3, f4, factor, entity);
- MainPart.render(factor);
- }
- @Override
- public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
- super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
- }
- private void setRotation(ModelRenderer model, float x, float y, float z) {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement