• Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Solved CustomStateMapper ignoré ?

    1.12.x
    1.12.x
    4
    8
    1144
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EmotionFox
      EmotionFox last edited by

      Bonjour à tous, je rencontre encore une difficulté avec la 1.12 (je vous raconte même pas l’histoire des crafts en json qui vont me prendre une éternité) qui est du ressort de la fonction ModelLoader.setCustomStateMapper(). Voilà l’histoire, dans mon fichier proxy coté client j’ai tout un tas de ces méthodes (notamment pour les portes, les feuilles, les portillons etc.) qui ne semble plus fonctionner donc j’aurais juste voulue savoir si en plus de ces méthodes il fallait maintenant rajouter autre chose; je précise que j’appelle cette fonction en pré initialisation.

      • Méthode customStateMapper -
      @Override
      public void customStateMapper()
      {
      // Ignore Properties
      ModelLoader.setCustomStateMapper(EmotionBlock.LEAVES, (new StateMap.Builder()).ignore(new IProperty[]
      { EmotionLeaves.CHECK_DECAY, EmotionLeaves.DECAYABLE }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.NEW_LEAVES, (new StateMap.Builder()).ignore(new IProperty[]
      { EmotionNewLeaves.CHECK_DECAY, EmotionNewLeaves.DECAYABLE }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.CHERRY_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.CHERRY_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.PEAR_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.PEAR_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.ORANGE_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.ORANGE_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.ATLAS_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.ATLAS_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.PINE_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.PINE_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.COCO_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.COCO_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      
      ModelLoader.setCustomStateMapper(EmotionBlock.DREAM_FENCE_GATE, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseFenceGate.POWERED }).build());
      ModelLoader.setCustomStateMapper(EmotionBlock.DREAM_DOOR, (new StateMap.Builder()).ignore(new IProperty[]
      { BaseDoor.POWERED }).build());
      }
      

      1 Reply Last reply Reply Quote 0
      • SpyMan
        SpyMan last edited by

        Ha la 1.12 toujours aussi sympa de modder en coopération avec le Cancer

        1 Reply Last reply Reply Quote -1
        • EmotionFox
          EmotionFox last edited by

          Le problème également c’est que passant de la 1.8 à la 1.12 je n’est eu aucunement vent des changements progressifs, du coup je me retrouve à devoir fouiller partout pour savoir comment m’y prendre 😕

          1 Reply Last reply Reply Quote 0
          • LeBossMax2
            LeBossMax2 last edited by

            Salut,
            peux tu nous montrer un de tes json de blockstates et préciser ce que tu veux dire par “ne semble plus fonctionner” : est-ce un problème d’affichage du block ? de l’item ?

            1 Reply Last reply Reply Quote 0
            • EmotionFox
              EmotionFox last edited by

              Bonsoir LeBossMax2, ce que je veux dire par ne fonctionne plus c’est que ces valeurs qui non normalement plus à être définies puisque ignorées grâce à cette méthode me demande à nouveau de les définir dans le blockstates; le rendue en jeu depuis la 1.12 je pense, me montre un bloc violet et noir avec la propriété nécessaire en texte (image en bas).

              • Blockstates atlas_door.json (propriété non définie: powered (car simple valeur boolean sans changement de modèle)) -
              {
                 "variants":
                 {
                     "facing=east,half=lower,hinge=left,open=false":  { "model": "emomod:atlas_door_bottom" },
                     "facing=south,half=lower,hinge=left,open=false": { "model": "emomod:atlas_door_bottom", "y": 90 },
                     "facing=west,half=lower,hinge=left,open=false":  { "model": "emomod:atlas_door_bottom", "y": 180 },
                     "facing=north,half=lower,hinge=left,open=false": { "model": "emomod:atlas_door_bottom", "y": 270 },
                     "facing=east,half=lower,hinge=right,open=false":  { "model": "emomod:atlas_door_bottom_rh" },
                     "facing=south,half=lower,hinge=right,open=false": { "model": "emomod:atlas_door_bottom_rh", "y": 90 },
                     "facing=west,half=lower,hinge=right,open=false":  { "model": "emomod:atlas_door_bottom_rh", "y": 180 },
                     "facing=north,half=lower,hinge=right,open=false": { "model": "emomod:atlas_door_bottom_rh", "y": 270 },
                     "facing=east,half=lower,hinge=left,open=true":  { "model": "emomod:atlas_door_bottom_rh", "y": 90 },
                     "facing=south,half=lower,hinge=left,open=true": { "model": "emomod:atlas_door_bottom_rh", "y": 180 },
                     "facing=west,half=lower,hinge=left,open=true":  { "model": "emomod:atlas_door_bottom_rh", "y": 270 },
                     "facing=north,half=lower,hinge=left,open=true": { "model": "emomod:atlas_door_bottom_rh" },
                     "facing=east,half=lower,hinge=right,open=true":  { "model": "emomod:atlas_door_bottom", "y": 270 },
                     "facing=south,half=lower,hinge=right,open=true": { "model": "emomod:atlas_door_bottom" },
                     "facing=west,half=lower,hinge=right,open=true":  { "model": "emomod:atlas_door_bottom", "y": 90 },
                     "facing=north,half=lower,hinge=right,open=true": { "model": "emomod:atlas_door_bottom", "y": 180 },
                     "facing=east,half=upper,hinge=left,open=false":  { "model": "emomod:atlas_door_top" },
                     "facing=south,half=upper,hinge=left,open=false": { "model": "emomod:atlas_door_top", "y": 90 },
                     "facing=west,half=upper,hinge=left,open=false":  { "model": "emomod:atlas_door_top", "y": 180 },
                     "facing=north,half=upper,hinge=left,open=false": { "model": "emomod:atlas_door_top", "y": 270 },
                     "facing=east,half=upper,hinge=right,open=false":  { "model": "emomod:atlas_door_top_rh" },
                     "facing=south,half=upper,hinge=right,open=false": { "model": "emomod:atlas_door_top_rh", "y": 90 },
                     "facing=west,half=upper,hinge=right,open=false":  { "model": "emomod:atlas_door_top_rh", "y": 180 },
                     "facing=north,half=upper,hinge=right,open=false": { "model": "emomod:atlas_door_top_rh", "y": 270 },
                     "facing=east,half=upper,hinge=left,open=true":  { "model": "emomod:atlas_door_top_rh", "y": 90 },
                     "facing=south,half=upper,hinge=left,open=true": { "model": "emomod:atlas_door_top_rh", "y": 180 },
                     "facing=west,half=upper,hinge=left,open=true":  { "model": "emomod:atlas_door_top_rh", "y": 270 },
                     "facing=north,half=upper,hinge=left,open=true": { "model": "emomod:atlas_door_top_rh" },
                     "facing=east,half=upper,hinge=right,open=true":  { "model": "emomod:atlas_door_top", "y": 270 },
                     "facing=south,half=upper,hinge=right,open=true": { "model": "emomod:atlas_door_top" },
                     "facing=west,half=upper,hinge=right,open=true":  { "model": "emomod:atlas_door_top", "y": 90 },
                     "facing=north,half=upper,hinge=right,open=true": { "model": "emomod:atlas_door_top", "y": 180 }
                 }
              }
              

              1 Reply Last reply Reply Quote 0
              • LeBossMax2
                LeBossMax2 last edited by

                Essaie d’appeler customStateMapper() plutôt dans l’event fait pour ça (je me souviens plus de son nom EDIT : c’est ModelRegistryEvent) et si ça ne change rien donne nous les erreurs dans les logs / la console ?

                1 Reply Last reply Reply Quote 1
                • EmotionFox
                  EmotionFox last edited by

                  Arf je me sens idiot du coup, j’aurais due y penser depuis qu’on ma dit qu’il fallait y mettre les fonctions ModelLoader.setCustomModelResourceLocation()… Merci beaucoup en tous cas LeBossMax2 tu gère ! En espérant ne pas t’avoir fait perdre trop temps.

                  1 Reply Last reply Reply Quote 0
                  • robin4002
                    robin4002 Moddeurs confirmés Rédacteurs Administrateurs last edited by

                    @‘SpyMan’:

                    Ha la 1.12 toujours aussi sympa de modder en coopération avec le Cancer

                    N’importe quoi.

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    • First post
                      Last post
                    Design by Woryk
                    Contact / Mentions Légales

                    MINECRAFT FORGE FRANCE © 2018

                    Powered by NodeBB