• Récent
  • Mots-clés
  • Populaire
  • Utilisateurs
  • Groupes
  • S'inscrire
  • Se connecter
  • S'inscrire
  • Se connecter
  • Recherche
  • Récent
  • Mots-clés
  • Populaire
  • Utilisateurs
  • Groupes

Résolu CustomStateMapper ignoré ?

1.12.x
1.12.x
4
8
1.4k
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.
  • EmotionFox
    EmotionFox dernière édition par 30 sept. 2017, 13:05

    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 réponse Dernière réponse Répondre Citer 0
    • SpyMan
      SpyMan dernière édition par 30 sept. 2017, 14:35

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

      1 réponse Dernière réponse Répondre Citer -1
      • EmotionFox
        EmotionFox dernière édition par 30 sept. 2017, 19:07

        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 réponse Dernière réponse Répondre Citer 0
        • LeBossMax2
          LeBossMax2 dernière édition par 30 sept. 2017, 20:40

          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 réponse Dernière réponse Répondre Citer 0
          • EmotionFox
            EmotionFox dernière édition par 30 sept. 2017, 21:16

            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 réponse Dernière réponse Répondre Citer 0
            • LeBossMax2
              LeBossMax2 dernière édition par 30 sept. 2017, 21:23

              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 réponse Dernière réponse Répondre Citer 1
              • EmotionFox
                EmotionFox dernière édition par 1 oct. 2017, 05:32

                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 réponse Dernière réponse Répondre Citer 0
                • robin4002
                  robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par 1 oct. 2017, 07:50

                  @‘SpyMan’:

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

                  N’importe quoi.

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

                  MINECRAFT FORGE FRANCE © 2018

                  Powered by NodeBB