MFF

    Minecraft Forge France
    • Récent
    • Mots-clés
    • Populaire
    • Utilisateurs
    • Groupes
    • Forge Events
      • Automatique
      • Foncé
      • Clair
    • S'inscrire
    • Se connecter

    Problème animation de mon entity

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    20 Messages 6 Publieurs 5.4k Vues 1 Watching
    Charger plus de messages
    • Du plus ancien au plus récent
    • Du plus récent au plus ancien
    • Les plus votés
    Répondre
    • Répondre à l'aide d'un nouveau sujet
    Se connecter pour répondre
    Ce sujet a été supprimé. Seuls les utilisateurs avec les droits d'administration peuvent le voir.
    • SCAREXS Hors-ligne
      SCAREX
      dernière édition par

      Mon script ne fais que corriger la plupart des bugs ainsi que rendre le code plus propre, ensuite le rendu se fait comme avec n’importe quelle entité, donc tu auras surement besoin de modifier quelques rotations au niveau du rendu de l’entité mais pas au niveau du model. Sinon renvoi le code de ton model, je te dirais s’il a été correctement corrigé

      Site web contenant mes scripts : http://SCAREXgaming.github.io

      Pas de demandes de support par MP ni par skype SVP.
      Je n'accepte sur skype que l…

      1 réponse Dernière réponse Répondre Citer 0
      • GabsG Hors-ligne
        Gabs
        dernière édition par

        code:

        // Date: 12/08/2015 23:04:29
        // Template version 1.1
        // Java generated by Techne
        // Keep in mind that you still need to fill in some blanks
        // - ZeuX
        
        package com.AltisMine.mob;
        
        import net.minecraft.client.model.ModelBase;
        import net.minecraft.client.model.ModelRenderer;
        import net.minecraft.entity.Entity;
        import net.minecraft.util.MathHelper;
        
        public class Duck extends ModelBase
        {
            public ModelRenderer shape1;
            public ModelRenderer shape2;
            public ModelRenderer shape3;
            public ModelRenderer shape4;
            public ModelRenderer shape5;
            public ModelRenderer shape6;
            public ModelRenderer shape7;
            public ModelRenderer shape8;
            public ModelRenderer shape9;
            public ModelRenderer shape10;
            public ModelRenderer shape12;
            public ModelRenderer shape11;
            public ModelRenderer shape13;
            public ModelRenderer shape15;
            public ModelRenderer shape16;
            public ModelRenderer shape17;
            public ModelRenderer shape14;
        
          public Duck()
          {
              this.textureWidth = 64;
              this.textureHeight = 32;
        
              this.shape1 = new ModelRenderer(this, 0, 26);
              this.shape1.mirror = true;
              this.shape1.addBox(0F, 0F, 0F, 1, 1, 1);
              this.shape1.setRotationPoint(-1F, 23F, -2F);
              this.shape1.setTextureSize(64, 32);
              setRotation(this.shape1, 0F, 0F, 0F);
        
              this.shape2 = new ModelRenderer(this, 4, 26);
              this.shape2.mirror = true;
              this.shape2.addBox(0F, 0F, 0F, 1, 1, 1);
              this.shape2.setRotationPoint(1F, 23F, -2F);
              this.shape2.setTextureSize(64, 32);
              setRotation(this.shape2, 0F, 0F, 0F);
        
              this.shape3 = new ModelRenderer(this, 4, 28);
              this.shape3.mirror = true;
              this.shape3.addBox(0F, 0F, 0F, 1, 3, 1);
              this.shape3.setRotationPoint(1F, 21F, -1F);
              this.shape3.setTextureSize(64, 32);
              setRotation(this.shape3, 0F, 0F, 0F);
        
              this.shape4 = new ModelRenderer(this, 0, 28);
              this.shape4.mirror = true;
              this.shape4.addBox(0F, 0F, 0F, 1, 3, 1);
              this.shape4.setRotationPoint(-1F, 21F, -1F);
              this.shape4.setTextureSize(64, 32);
              setRotation(this.shape4, 0F, 0F, 0F);
        
              this.shape5 = new ModelRenderer(this, 40, 0);
              this.shape5.mirror = true;
              this.shape5.addBox(0F, 0F, 0F, 5, 4, 7);
              this.shape5.setRotationPoint(-2F, 17F, -3F);
              this.shape5.setTextureSize(64, 32);
              setRotation(this.shape5, 0F, 0F, 0F);
        
              this.shape6 = new ModelRenderer(this, 0, 0);
              this.shape6.mirror = true;
              this.shape6.addBox(0F, 0F, 0F, 3, 4, 2);
              this.shape6.setRotationPoint(-1F, 15.53333F, -5F);
              this.shape6.setTextureSize(64, 32);
              setRotation(this.shape6, 0F, 0F, 0F);
        
              this.shape7 = new ModelRenderer(this, 28, 0);
              this.shape7.mirror = true;
              this.shape7.addBox(0F, 0F, 0F, 1, 3, 5);
              this.shape7.setRotationPoint(3F, 17F, -2F);
              this.shape7.setTextureSize(64, 32);
              setRotation(this.shape7, 0F, 0F, 0F);
        
              this.shape8 = new ModelRenderer(this, 27, 17);
              this.shape8.mirror = true;
              this.shape8.addBox(0F, 0F, 0F, 1, 3, 5);
              this.shape8.setRotationPoint(-3F, 17F, -2F);
              this.shape8.setTextureSize(64, 32);
              setRotation(this.shape8, 0F, 0F, 0F);
        
              this.shape9 = new ModelRenderer(this, 23, 8);
              this.shape9.mirror = true;
              this.shape9.addBox(0F, 0F, 0F, 5, 1, 3);
              this.shape9.setRotationPoint(-2F, 17F, 4F);
              this.shape9.setTextureSize(64, 32);
              setRotation(this.shape9, 0F, 0F, 0F);
        
              this.shape10 = new ModelRenderer(this, 25, 12);
              this.shape10.mirror = true;
              this.shape10.addBox(0F, 0F, 0F, 5, 1, 2);
        
              this.shape10.setRotationPoint(-2F, 18F, 4F);
              this.shape10.setTextureSize(64, 32);
              setRotation(this.shape10, 0F, 0F, 0F);
        
              this.shape12 = new ModelRenderer(this, 27, 15);
              this.shape12.mirror = true;
              this.shape12.addBox(0F, 0F, 0F, 5, 1, 1);
              this.shape12.setRotationPoint(-2F, 19F, 4F);
              this.shape12.setTextureSize(64, 32);
              setRotation(this.shape12, 0F, 0F, 0F);
        
              this.shape11 = new ModelRenderer(this, 39, 11);
              this.shape11.mirror = true;
              this.shape11.addBox(0F, 0F, 0F, 5, 1, 8);
              this.shape11.setRotationPoint(-2F, 16F, -2F);
              this.shape11.setTextureSize(64, 32);
              setRotation(this.shape11, 0F, 0F, 0F);
        
              this.shape13 = new ModelRenderer(this, 0, 6);
              this.shape13.mirror = true;
              this.shape13.addBox(0F, 0F, 0F, 3, 1, 1);
              this.shape13.setRotationPoint(-1F, 18F, -6F);
              this.shape13.setTextureSize(64, 32);
              setRotation(this.shape13, 0F, 0F, 0F);
        
              this.shape15 = new ModelRenderer(this, 16, 0);
              this.shape15.mirror = true;
              this.shape15.addBox(0F, 0F, 0F, 1, 1, 2);
              this.shape15.setRotationPoint(-3F, 17F, 3F);
              this.shape15.setTextureSize(64, 32);
              setRotation(this.shape15, 0F, 0F, 0F);
        
              this.shape16 = new ModelRenderer(this, 12, 0);
              this.shape16.mirror = true;
              this.shape16.addBox(0F, 0F, 0F, 1, 1, 1);
              this.shape16.setRotationPoint(-3F, 18F, 3F);
              this.shape16.setTextureSize(64, 32);
              setRotation(this.shape16, 0F, 0F, 0F);
        
              this.shape17 = new ModelRenderer(this, 24, 0);
              this.shape17.mirror = true;
              this.shape17.addBox(0F, 0F, 0F, 1, 1, 1);
              this.shape17.setRotationPoint(3F, 18F, 3F);
              this.shape17.setTextureSize(64, 32);
              setRotation(this.shape17, 0F, 0F, 0F);
        
              this.shape14 = new ModelRenderer(this, 22, 2);
              this.shape14.mirror = true;
              this.shape14.addBox(0F, 0F, 0F, 1, 1, 2);
              this.shape14.setRotationPoint(3F, 17F, 3F);
              this.shape14.setTextureSize(64, 32);
              setRotation(this.shape14, 0F, 0F, 0F);
          }
        
          public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
          {
            super.render(entity, f, f1, f2, f3, f4, f5);
            setRotationAngles(f, f1, f2, f3, f4, f5, entity);
            this.shape1.render(f5);
            this.shape2.render(f5);
            this.shape3.render(f5);
            this.shape4.render(f5);
            this.shape5.render(f5);
            this.shape6.render(f5);
            this.shape7.render(f5);
            this.shape8.render(f5);
            this.shape9.render(f5);
            this.shape10.render(f5);
            this.shape12.render(f5);
            this.shape11.render(f5);
            this.shape13.render(f5);
            this.shape15.render(f5);
            this.shape16.render(f5);
            this.shape17.render(f5);
            this.shape14.render(f5);
          }
        
          public static void setRotation(ModelRenderer model, float x, float y, float z)
          {
            model.rotateAngleX = x;
            model.rotateAngleY = y;
            model.rotateAngleZ = z;
          }
          public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
          {
        
         //Problème ICI:
        
           this.shape6.rotateAngleX = f4 / (180F / (float)Math.PI);
           this.shape6.rotateAngleY = f3 / (190F / (float)Math.PI);
           this.shape13.rotateAngleX = this.shape6.rotateAngleX;
           this.shape13.rotateAngleX = this.shape6.rotateAngleY;
        
              this.shape7.rotateAngleZ = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.7F * f1 * 0.5F;
        
              this.shape17.rotateAngleZ = this.shape7.rotateAngleZ;
        
              this.shape14.rotateAngleZ = this.shape7.rotateAngleZ;
        
              this.shape8.rotateAngleZ = -MathHelper.cos(f * 0.6662F + (float)Math.PI) * 1.7F * f1 * 0.5F;
        
              this.shape15.rotateAngleZ = this.shape8.rotateAngleZ;
        
              this.shape16.rotateAngleZ = this.shape8.rotateAngleZ;
        
              this.shape3.rotateAngleZ = 0.0F;
        
              this.shape3.rotateAngleX = MathHelper.cos(f * 0.6662F) * 0.5F * f;
        
              this.shape4.rotateAngleX = MathHelper.cos(f * 0.6662F + (float)Math.PI) * 0.5F * f;
              this.shape4.rotateAngleZ = 0.0F;
        
              this.shape2.rotateAngleX = this.shape3.rotateAngleX;
        
              this.shape1.rotateAngleX = this.shape4.rotateAngleX;
        
          }
        
        }
        
        

        J’ai refais mon entity c’est beaucoup mieux mais il reste quelque bug au niveau de la tete elle se décolle du corps quand mon entity tourne la tête et un problème aussi au patte elle bouge super vite quand il marche.

        Aussi mon entity a une énorme hombre fin je sais pas si c’est l’hombre de mon entity ou un bug …
        screen: http://puu.sh/jznnr/bf62871098.png

        1 réponse Dernière réponse Répondre Citer 0
        • FlowF Hors-ligne
          Flow
          dernière édition par

          Dans l’entity de ton canard tu dois avoir ceci

              getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
          
          

          Ta juste a modifier la valeur 🙂

          Pour l’ombre c’est dans l’enregistrement dans le client proxy

                  RenderingRegistry.registerEntityRenderingHandler(EntityFrog.class, new RenderFrog(new ModelFrog(), 0.5F));
          
          

          Modifie le 0.5F pour l’ombre pour ton mob envoie de profil car la on voie pas ^^

          Oui ce gif est drôle.

          1 réponse Dernière réponse Répondre Citer 0
          • robin4002R Hors-ligne
            robin4002 Moddeurs confirmés Rédacteurs Administrateurs
            dernière édition par

            Pour la tête qui se détache du corps, il faut changer le centre de rotation.

            1 réponse Dernière réponse Répondre Citer 0
            • FlowF Hors-ligne
              Flow
              dernière édition par

              @‘robin4002’:

              Pour la tête qui se détache du corps, il faut changer le centre de rotation.

              Si tu sais pas ou c’est , dans techne Offset la boule bleu va se déplacer , met la au centre de ta tête

              Oui ce gif est drôle.

              1 réponse Dernière réponse Répondre Citer 0
              • GabsG Hors-ligne
                Gabs
                dernière édition par

                Wuut expliquez moi pour le Offset avec techne plz je comprend pas je vois ou c’est Offset mais je comprend pas se qu’il faut faire car quand je touche le Offset ma tête se déplace …
                Merci 🙂

                1 réponse Dernière réponse Répondre Citer 0
                • DeletedD Hors-ligne
                  Deleted
                  dernière édition par

                  Regarde les autres models inclus dans Techne tu verras que pour chaque jonction de 2 parties du model une boule bleue est placée entre. C’est ce qu’on appelle le point de rotation. Regarde le model biped ou même celui de l’araignée, tu comprendras mieux.

                  1 réponse Dernière réponse Répondre Citer 0
                  • GabsG Hors-ligne
                    Gabs
                    dernière édition par

                    c’est ici qu’il faut touché ? ```java
                    this.shape6.setRotationPoint(-1F, 15.53333F, -5F);

                    1 réponse Dernière réponse Répondre Citer 0
                    • GabsG Hors-ligne
                      Gabs
                      dernière édition par

                      C’est bon j’ai compris merci ^^

                      1 réponse Dernière réponse Répondre Citer 0
                      • FlowF Hors-ligne
                        Flow
                        dernière édition par

                        @‘floriangabet’:

                        C’est bon j’ai compris merci ^^

                        Pour expliquer l’offset c’est comme un articulations dans ton doigts ces les phalanges stu veut 🙂

                        Oui ce gif est drôle.

                        1 réponse Dernière réponse Répondre Citer 1
                        • 1 / 1
                        • Premier message
                          Dernier message
                        Design by Woryk
                        ContactMentions Légales

                        MINECRAFT FORGE FRANCE © 2024

                        Powered by NodeBB