MFF

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

    Créer une table de craft compatible avec JEI et NEI

    Planifier Épinglé Verrouillé Déplacé Les interfaces (GUI) et les container
    1.8.91.9.x
    90 Messages 11 Publieurs 23.4k Vues 3 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.
    • leo01418L Hors-ligne
      leo01418
      dernière édition par

      je l’ai fait 🙂
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.BlockAnvilDragon:onBlockActivated:21]: je suis dans le onblockactivated
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.BlockAnvilDragon:onBlockActivated:21]: je suis dans le onblockactivated
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.BlockAnvilDragon:onBlockActivated:24]: je suis dans la condition world.IsRemote
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.common.GuiHandler:getServerGuiElement:33]: Je suis dans le getServGuiElement
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.common.GuiHandler:getServerGuiElement:36]: Je suis dans la condition container
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.ContainerDragonAnvil:<init>:39]: Test Container
      [20:13:07] [Server thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.DragonSlotCrafting:<init>:35]: Test Slot
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.common.GuiHandler:getClientGuiElement:45]: Je suis dans le getCLientGuiElement
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.common.GuiHandler:getClientGuiElement:57]: Je suis dans la condition gui
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.ContainerDragonAnvil:<init>:39]: Test Container
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.DragonSlotCrafting:<init>:35]: Test Slot
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.GuiAnvilDragon:<init>:25]: Test Gui
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.TutorielCraftingManager:<init>:32]: Test CraftManager
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.TutorielShapelessRecipe:<init>:27]: Test ShapelessRecipe
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.TutorielShapedRecipes:<init>:45]: Test ShapedR
      [20:13:07] [Client thread/INFO] [STDOUT]: [ed.enderdeath.mod.AnvilDragon.TutorielShapedRecipes:<init>:45]: Test ShapedR

      et sa affiche bien bizarree</init></init></init></init></init></init></init></init></init>

      Voila ma signature

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

        Tout est là, maintenant, enlève ces prints (on a vu que ça marchait) et mets-en 1 dans la fonction draw, si il n’est pas appelé, mais en un dans la fonction initGui() (créées la si tu ne l’as pas).

        Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

        AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

        Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
        Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

          la fonctions draw ou initgui de quel classe ?

          Voila ma signature

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

            Bah du gui ^^
            Et c’est pas draw, c’est drawMachinChose.

            Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

            AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

            Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
            Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

              oki 🙂
              Donc j’ai mis system.out sur c’est 2 fonction

               @Override
              protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) 
              { 
              fontRendererObj.drawString(I18n.format("container.crafting_table"), 100, 5, 0xFFFFFF); //On dessine le "titre" du gui, le I18n.format va traduire le texte donné, n'oubliez pas de l'ajouter dans votre fichier de langues !
              System.out.println("Test draw");
              }
               /**
              * Fonction pour dessiner l'arrière plan
              */
              @Override
              protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
              {
              mc.getTextureManager().bindTexture(texture); //On bind la texture
              drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); //Et on la dessine
              System.out.println("Test draw");
              }
              

              et quand je fais clique droit cela ne fait rien

              Voila ma signature

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

                au passage ma classe

                package ed.enderdeath.mod.AnvilDragon;
                
                import java.util.HashMap;
                
                import org.lwjgl.opengl.GL11;
                
                import ed.enderdeath.mod.Extractor.ContainerAlloyer;
                import ed.enderdeath.mod.Extractor.GuiAlloyer;
                import ed.enderdeath.mod.Extractor.TileEntityAlloyer;
                import ed.enderdeath.mod.common.enderdeath;
                import net.minecraft.client.gui.Gui;
                import net.minecraft.client.gui.inventory.GuiContainer;
                import net.minecraft.client.resources.I18n;
                import net.minecraft.entity.player.InventoryPlayer;
                import net.minecraft.inventory.IInventory;
                import net.minecraft.util.ResourceLocation;
                import net.minecraft.world.World;
                
                public class GuiAnvilDragon extends GuiContainer
                {
                private static final ResourceLocation texture = new ResourceLocation(enderdeath.MODID,"textures/gui/container/GuiAlloyer.png");
                public GuiAnvilDragon(InventoryPlayer invPlayer, World world, int x,int y,int z) 
                {
                super(new ContainerDragonAnvil(invPlayer, world,x,y,z));
                this.xSize = 176; //La largeur du gui en pixels (supprimez-le pour laisser celle par défaut)
                this.ySize = 188; //La hauteur du gui en pixels (supprimez-le pour laisser celle par défaut)
                
                }
                
                /**
                * Fonction pour dessiner le premier plan
                */
                @Override
                protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) 
                { 
                fontRendererObj.drawString(I18n.format("container.crafting_table"), 100, 5, 0xFFFFFF); //On dessine le "titre" du gui, le I18n.format va traduire le texte donné, n'oubliez pas de l'ajouter dans votre fichier de langues !
                System.out.println("Test draw");
                }
                 /**
                * Fonction pour dessiner l'arrière plan
                */
                @Override
                protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
                {
                mc.getTextureManager().bindTexture(texture); //On bind la texture
                drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); //Et on la dessine
                System.out.println("Test draw");
                }
                }
                
                

                Voila ma signature

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

                  Re 
                  Nn ne t’inquiète pas tout est réglé mais c’est une demande que je te fais tu pourrai me passé la texture stp 😛

                  Voila ma signature

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

                    La texture du gui ? Oui sans pb (je vais edit).

                    Ici : http://imgur.com/csgvbSN

                    Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                    AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                    Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                    Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

                    1 réponse Dernière réponse Répondre Citer 1
                    • AymericRedA Hors-ligne
                      AymericRed
                      dernière édition par

                      Un tutoriel sur JEI est en cours de rédaction, il expliquera comment adapter la table de cratf à JEI aussi comment l’utiliser pour un four custom.
                      Un peut plus tard suivra une partie sur NEI.

                      Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                      AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                      Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                      Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                        Salutations,

                        Je me permets d’ajouter une petite amélioration sur la classe Container qui est exposé dans ce tutoriel.

                        Pour la fonction transferStackInSlot, il est en fait possible d’adapter les transferts d’item dans le slots en fonction de la taille du craft.
                        En effet, les valeurs du slotIndex dans les différents if nécessitent juste d’être ajustées. 🙂

                        Je vous redirige vers ce topic pour adapter correctement vos valeurs (elles sont modifiées exprès pour une table de craft 5x5 mais vous ne devriez pas avoir de gros problème d’ajustement pour une 4x4)

                        Si vous patinez un peu, je vous conseille d’aller regarder la classe ContainerWorkbench dans le package package net.minecraft.inventory pour voir un peu la logique de tout le bidule. 😄

                        EDIT: voir ma réponse ici pour avoir les vraies bonnes valeurs !

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

                          Je dois dire que ce n’est pas une mauvaise idée, l’adapterais donc le tuto prochainement, mais par contre dans le lien que tu as donné les valeurs dand la fonction sont les mêmes qu’ici.

                          Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                          AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                          Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                          Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                            @‘AymericRed’:

                            Je dois dire que ce n’est pas une mauvaise idée, l’adapterais donc le tuto prochainement, mais par contre dans le lien que tu as donné les valeurs dand la fonction sont les mêmes qu’ici.

                            Woops, effectivement ! Le comble c’est que je n’arrive plus à retrouver l’endroit exact où j’ai chopé ces valeurs, haha.
                            Pour me faire pardonner, je mets directement mon code ci-dessous (fonctionnant pour une table de craft 5x5 */!*)

                            
                               @Override
                               public ItemStack    transferStackInSlot(EntityPlayer player, int slotId) {
                                   ItemStack       itemstack = null;
                                   Slot            slot = this.inventorySlots.get(slotId);
                            
                                   if (slot != null && slot.getHasStack()) {
                                       ItemStack   itemstack1 = slot.getStack();
                            
                                       itemstack = itemstack1.copy();
                            
                                       /**
                                        *  If the slot belongs to the craftResult slot,
                                        *  Put the itemStack in the 27 slots player inventory
                                        */
                                       if (slotId == 0) {
                                           if (!this.mergeItemStack(itemstack1, 26, 62, true)) {
                                               return (null);
                                           }
                                           slot.onSlotChange(itemstack1, itemstack);
                                       }
                            
                                       /**
                                        *  If the slot belongs to the 27 slots player inventory,
                                        *  Put the itemStack in the 9 slots player hotbar
                                        */
                                       else if (slotId >= 26 && slotId < 53) {
                                           if (!this.mergeItemStack(itemstack1, 53, 62, false)) {
                                               return (null);
                                           }
                                       }
                            
                                       /**
                                        *  If the slot belongs to the 9 slots player hotbar,
                                        *  Put the itemStack in the 27 slots player inventory
                                        */
                                       else if (slotId >= 53 && slotId < 62) {
                                           if (!this.mergeItemStack(itemstack1, 26, 53, false)) {
                                               return (null);
                                           }
                                       }
                            
                                       /**
                                        * If the slot doesn't match with any of the if condition above,
                                        * Put the itemStack in the whole player inventory (hotbar + 27 slots)
                                        */
                                       else if (!this.mergeItemStack(itemstack1, 26, 62, false)) {
                                           return (null);
                                       }
                            
                                       if (itemstack1.stackSize == 0) {
                                           slot.putStack((ItemStack) null);
                                       } else {
                                           slot.onSlotChanged();
                                       }
                            
                                       if (itemstack1.stackSize == itemstack.stackSize) {
                                           return (null);
                                       }
                            
                                       slot.onPickupFromSlot(player, itemstack1);
                                   }
                                   return (itemstack);
                               }
                            
                            

                            J’ai même commenté pour que ce soit plus clair ! 😄

                            Je me permets encore une fois aux personnes qui liront ce message plus tard, qu’en fin de compte ces fameuses valeurs (26, 53, 62) sont propres à la taille du inventorySlots de votre container (qui change à chaque fois que vous faites this.addSlotToContainer). À vous d’adapter ces valeurs en fonction de la grille de craft 4x4, 6x6 ou 100x100, etc…

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

                              Merci d’avoir mis ça, je m’en inspirerait, mais avec un truc dynamique changeant selon la taille de la grille ^^
                              EDIT : C’est fait 🙂

                              Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                              AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                              Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                              Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                Bonjour ! ,
                                Je suis en train de créer la table de craft en 1.7.10 mais j’ai un BIG problem …
                                eclipse me dit qu’il y a une erreur ici (sur le .add), dans la fonction public AdvancedShapedRecipes addRecipe , dans la class container :

                                
                                AdvancedShapedRecipes shapedrecipes = new AdvancedShapedRecipes(j, k, aitemstack, result);
                                        this.recipes.add(shapedrecipes);
                                        return shapedrecipes;
                                
                                

                                J’attends une réponse avec impatience ! (parce que c’est la seule erreur qui reste dans mon code 😕 )

                                Mes Sites(Mes Sites)
                                |
                                |    Site général : Game & play
                                |   Site de projets (en dev !) :Infinite's Ressources
                                J'ai et je suis content d'avoir 16,75 points d'ICRating

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

                                  Bonjour,
                                  “dans la class container”
                                  Tu ne parles pas plutôt de la classe du CraftingManager ?

                                  Quel est l’erreur indiquée exactement ? Et montre la classe entière avec les imports visibles.

                                  Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                  AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                  Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                  Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                    Oui désolé je viens de me rendre compte que je me suis trompé , en même temps ça fait bien longtemps que j’éssaie de faire fonctionner ma table de craft et je suis un peu beaucoup fatigué  😄 !

                                    Voici ma classe AdvancedCraftingRecipes :

                                    
                                    package com.iutils.infinite.recipes;
                                    
                                    import java.util.List;
                                    import java.util.Map;
                                    
                                    import javax.annotation.Nullable;
                                    
                                    import com.google.common.collect.Lists;
                                    import com.google.common.collect.Maps;
                                    
                                    import net.minecraft.block.Block;
                                    import net.minecraft.inventory.InventoryCrafting;
                                    import net.minecraft.item.Item;
                                    import net.minecraft.item.ItemStack;
                                    import net.minecraft.item.crafting.IRecipe;
                                    import net.minecraft.world.World;
                                    
                                    public class AdvancedCraftingManager
                                    {
                                        private static final AdvancedCraftingManager INSTANCE = new AdvancedCraftingManager();
                                        public static AdvancedCraftingManager getInstance()
                                        {
                                            return INSTANCE;
                                        }
                                    
                                        /** La liste des recettes */
                                        private final List <irecipe>recipes = Lists.<irecipe>newArrayList();
                                    
                                        private AdvancedCraftingManager()
                                        {
                                         //Vous pouvez ajouter des recettes ici
                                        }
                                    
                                        /**
                                         * Adds a shaped recipe to the games recipe list.
                                         */
                                        public AdvancedShapedRecipes addRecipe(ItemStack result, Object… recipeComponents)
                                        {
                                            String s = "";
                                            int i = 0;
                                            int j = 0;
                                            int k = 0;
                                            if (recipeComponents* instanceof String[])
                                            {
                                                String[] astring = (String[])((String[])recipeComponents[i++]);
                                                for (int l = 0; l < astring.length; ++l)
                                                {
                                                    String s2 = astring[l];
                                                    ++k;
                                                    j = s2.length();
                                                    s = s + s2;
                                                }
                                            }
                                            else
                                            {
                                                while (recipeComponents* instanceof String)
                                                {
                                                    String s1 = (String)recipeComponents[i++];
                                                    ++k;
                                                    j = s1.length();
                                                    s = s + s1;
                                                }
                                            }
                                            Character character;
                                            Map <character, object="">components = Maps.<character, object="">newHashMap();
                                            Object in;
                                            for ( ; i < recipeComponents.length; i += 2)
                                            {
                                             in = recipeComponents_;
                                                Object component = null;
                                                character = (Character)recipeComponents*;
                                                if (in instanceof Item)
                                                {
                                                    component = new ItemStack((Item)recipeComponents_);
                                                }
                                                else if (in instanceof Block)
                                                {
                                                    component = new ItemStack((Block)recipeComponents_, 1, 32767);
                                                }
                                                else if (in instanceof ItemStack)
                                                {
                                                    component = (ItemStack)recipeComponents_;
                                                }
                                                else if (in instanceof String)
                                                {
                                                 component = (String)in;
                                                }
                                                else
                                                {
                                                 throw new IllegalArgumentException("Invalid shaped recipe: unknown type " + in.getClass().getName() + "!");
                                                }
                                                components.put(character, component);
                                            }
                                            Object[] aitemstack = new Object[j * k];
                                            char key;
                                            Object component;
                                            for (int i1 = 0; i1 < j * k; ++i1)
                                            {
                                                key = s.charAt(i1);
                                                if (components.containsKey(Character.valueOf(key)))
                                                {
                                                 component = components.get(Character.valueOf(key));
                                                    if(component instanceof ItemStack) 
                                                     aitemstack[i1] = ((ItemStack)component).copy();
                                                    else
                                                     aitemstack[i1] = component;
                                                }
                                                else
                                                    aitemstack[i1] = null;
                                            }
                                            AdvancedShapedRecipes shapedrecipes = new AdvancedShapedRecipes(j, k, aitemstack, result);
                                            this.recipes.add(shapedrecipes);
                                            return shapedrecipes;
                                        }
                                    
                                        /**
                                         * Adds a shapeless crafting recipe to the the game.
                                         */
                                        public void addShapelessRecipe(ItemStack result, Object… recipeComponents)
                                        {
                                            List list = Lists.newArrayList();
                                            for (Object component : recipeComponents) //Pour chaque composant de la recette
                                            {
                                                if (component instanceof ItemStack)
                                                {
                                                    list.add(((ItemStack)component).copy());
                                                }
                                                else if (component instanceof Item)
                                                {
                                                    list.add(new ItemStack((Item)component));
                                                }
                                                else if(component instanceof Block)
                                                {
                                                    list.add(new ItemStack((Block)component));
                                                }
                                                else if(component instanceof String) //Pour l'ore dictionnary
                                                {
                                                 list.add(component);
                                                }
                                                else throw new IllegalArgumentException("Invalid shapeless recipe: unknown type " + component.getClass().getName() + "!");
                                            }
                                            this.recipes.add(new AdvancedShapelessRecipe(result, list));
                                        }
                                    
                                        /**
                                         * Adds an IRecipe to the list of crafting recipes.
                                         */
                                        public void addRecipe(IRecipe recipe)
                                        {
                                            this.recipes.add(recipe);
                                        }
                                    
                                        /**
                                         * Retourne le résultat de la recette ou null si il n'y en a aucun
                                         */
                                        @Nullable
                                        public ItemStack findMatchingRecipe(InventoryCrafting craftMatrix, World worldIn)
                                        {
                                            for (IRecipe irecipe : this.recipes) //Pour chaque recette
                                            {
                                                if (irecipe.matches(craftMatrix, worldIn)) //Si elle correspond à la matrice actuelle
                                                {
                                                    return irecipe.getCraftingResult(craftMatrix); //On donne son résultat
                                                }
                                            }
                                            return null;
                                        }
                                    
                                        /**
                                         * Retourne les items retants après un craft
                                         */
                                    
                                        public List <irecipe>getRecipeList()
                                        {
                                            return this.recipes;
                                        }
                                    }
                                    
                                    

                                    eclipse me dit : The method add(IRecipe) in the type List <irecipe>is not applicable for the arguments (AdvancedShapedRecipes)
                                    version pastebin !


                                    Problème réglé , j’ai mis ça a la place :

                                    
                                    AdvancedShapedRecipes shapedrecipes = new AdvancedShapedRecipes(j, k, aitemstack, result);
                                            this.recipes.add(new AdvancedShapelessRecipe(result, recipes));
                                            return shapedrecipes;
                                    
                                    

                                    par contre j’ai un problème , quand je fais un clic droit sur mon bloc , mon curseur de souris apparait un fragment de secondes et disparaît comme si le container s’ouvrait puis se refermait très rapidement.

                                    EDIT : Corrigé !</irecipe></irecipe>____</character,></character,></irecipe></irecipe>

                                    Mes Sites(Mes Sites)
                                    |
                                    |    Site général : Game & play
                                    |   Site de projets (en dev !) :Infinite's Ressources
                                    J'ai et je suis content d'avoir 16,75 points d'ICRating

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

                                      Alors apparement ton problème est résolu, mais avec ce code

                                      AdvancedShapedRecipes shapedrecipes = new AdvancedShapedRecipes(j, k, aitemstack, result);
                                      this.recipes.add(new AdvancedShapelessRecipe(result, recipes));
                                      return shapedrecipes;
                                      ``` la recette va pas bien fonctionner du tout (essayes pour voir).
                                      Car ce ne sera plus une recette shaped mais shapeless, le problème est que "AdvancedShapedRecipes" n'implémente pas IRecipe.

                                      Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                      AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                      Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                      Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                        Merci ! mais le jeu crash a cause de cette ligne dans mon container:

                                        
                                        @Override
                                        
                                            public void onCraftMatrixChanged(IInventory iiventory)
                                        
                                            {
                                        
                                                craftResult.setInventorySlotContents(0, AdvancedCraftingManager.getInstance().findMatchingRecipe(craftMatrix, worldObj)); // celle-ci !
                                            }
                                        
                                        

                                        et ici , dans mon crafting manager:

                                        
                                                AdvancedCraftingManager.getInstance().addRecipe(new ItemStack(Items.golden_apple), "A    A", "X    X", "X    X", "A    A", 'A', Items.carrot, 'X', Blocks.planks);
                                        
                                        

                                        et également ici :

                                        
                                            private static final AdvancedCraftingManager INSTANCE = new AdvancedCraftingManager();
                                        
                                        

                                        Mes Sites(Mes Sites)
                                        |
                                        |    Site général : Game & play
                                        |   Site de projets (en dev !) :Infinite's Ressources
                                        J'ai et je suis content d'avoir 16,75 points d'ICRating

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

                                          Euh…envoies le crash-report plutôt ^^

                                          Si je vous ai aidé, n'oubliez pas d’être heureux, j'aiderai encore +

                                          AymericRed, moddeur expérimenté qui aide sur ce forum et qui peut accepter de faire un mod Forge rémunéré de temps en temps.

                                          Mes tutos : Table de craft, plugin NEI, plugin JEI, modifier l'overlay
                                          Je suis un membre apprécié et joueur, j'ai déjà obtenu 6 points de réputation.

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

                                            ok :
                                            :::

                                            –-- Minecraft Crash Report ----

                                            // You’re mean.

                                            Time: 11/06/17 17:59

                                            Description: Unexpected error

                                            java.lang.ExceptionInInitializerError

                                            at com.iutils.infinite.containers.ContainerAdvancedCraftingTab.onCraftMatrixChanged(ContainerAdvancedCraftingTab.java:84)

                                            at net.minecraft.inventory.InventoryCrafting.setInventorySlotContents(InventoryCrafting.java:132)

                                            at net.minecraft.inventory.Slot.putStack(Slot.java:104)

                                            at net.minecraft.inventory.Container.putStacksInSlots(Container.java:558)

                                            at net.minecraft.client.network.NetHandlerPlayClient.handleWindowItems(NetHandlerPlayClient.java:1202)

                                            at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:70)

                                            at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:78)

                                            at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

                                            at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317)

                                            at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693)

                                            at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039)

                                            at net.minecraft.client.Minecraft.run(Minecraft.java:962)

                                            at net.minecraft.client.main.Main.main(Main.java:164)

                                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                                            at java.lang.reflect.Method.invoke(Unknown Source)

                                            at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

                                            at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

                                            at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

                                            at GradleStart.main(Unknown Source)

                                            Caused by: java.lang.NullPointerException

                                            at com.iutils.infinite.recipes.AdvancedCraftingManager.<init>(AdvancedCraftingManager.java:33)

                                            at com.iutils.infinite.recipes.AdvancedCraftingManager.<clinit>(AdvancedCraftingManager.java:22)

                                            … 21 more

                                            A detailed walkthrough of the error, its code path and all known details is as follows:


                                            – Head –

                                            Stacktrace:

                                            at com.iutils.infinite.containers.ContainerAdvancedCraftingTab.onCraftMatrixChanged(ContainerAdvancedCraftingTab.java:84)

                                            at net.minecraft.inventory.InventoryCrafting.setInventorySlotContents(InventoryCrafting.java:132)

                                            at net.minecraft.inventory.Slot.putStack(Slot.java:104)

                                            at net.minecraft.inventory.Container.putStacksInSlots(Container.java:558)

                                            at net.minecraft.client.network.NetHandlerPlayClient.handleWindowItems(NetHandlerPlayClient.java:1202)

                                            at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:70)

                                            at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:78)

                                            at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

                                            at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317)

                                            – Affected level –

                                            Details:

                                            Level name: MpServer

                                            All players: 1 total; [EntityClientPlayerMP[‘Player189’/339, l=‘MpServer’, x=-41,31, y=67,99, z=-40,38]]

                                            Chunk stats: MultiplayerChunkCache: 225, 225

                                            Level seed: 0

                                            Level generator: ID 00 - default, ver 1. Features enabled: false

                                            Level generator options:

                                            Level spawn location: World: (-46,64,-22), Chunk: (at 2,4,10 in -3,-2; contains blocks -48,0,-32 to -33,255,-17), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)

                                            Level time: 545798 game time, 545798 day time

                                            Level dimension: 0

                                            Level storage version: 0x00000 - Unknown?

                                            Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

                                            Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

                                            Forced entities: 95 total; [EntityBat[‘Bat’/128, l=‘MpServer’, x=-50,25, y=50,10, z=-34,47], EntityBat[‘Bat’/129, l=‘MpServer’, x=-52,00, y=55,10, z=-42,25], EntityBat[‘Bat’/130, l=‘MpServer’, x=-51,25, y=54,10, z=-47,66], EntityBat[‘Bat’/131, l=‘MpServer’, x=-52,63, y=50,10, z=-29,09], EntityBat[‘Bat’/132, l=‘MpServer’, x=-53,47, y=49,10, z=-30,69], EntityBat[‘Bat’/133, l=‘MpServer’, x=-51,22, y=50,10, z=-30,75], EntityBat[‘Bat’/134, l=‘MpServer’, x=-49,50, y=49,10, z=-28,59], EntityBat[‘Bat’/135, l=‘MpServer’, x=-53,28, y=50,10, z=-21,41], EntityBat[‘Bat’/136, l=‘MpServer’, x=-54,72, y=51,10, z=-24,16], EntityBat[‘Bat’/137, l=‘MpServer’, x=-55,63, y=62,10, z=-25,75], EntityBat[‘Bat’/138, l=‘MpServer’, x=-53,50, y=49,10, z=-31,66], EntityCow[‘Cow’/145, l=‘MpServer’, x=-37,81, y=69,00, z=-102,47], EntityZombie[‘Zombie’/146, l=‘MpServer’, x=-37,34, y=69,00, z=-103,50], EntityCow[‘Cow’/147, l=‘MpServer’, x=-38,75, y=73,00, z=-78,38], EntitySkeleton[‘Skeleton’/148, l=‘MpServer’, x=-34,78, y=45,00, z=-57,41], EntityZombie[‘Zombie’/149, l=‘MpServer’, x=-46,47, y=49,00, z=-51,03], EntityBat[‘Bat’/150, l=‘MpServer’, x=-40,09, y=54,10, z=-32,41], EntityBat[‘Bat’/151, l=‘MpServer’, x=-37,72, y=54,10, z=-33,53], EntityBat[‘Bat’/152, l=‘MpServer’, x=-40,75, y=54,10, z=-32,25], EntityChicken[‘Chicken’/153, l=‘MpServer’, x=-42,38, y=68,00, z=33,94], EntityZombie[‘Zombie’/163, l=‘MpServer’, x=-28,66, y=88,00, z=-89,53], EntityCreeper[‘Creeper’/164, l=‘MpServer’, x=-31,56, y=42,00, z=-34,03], EntityCreeper[‘Creeper’/165, l=‘MpServer’, x=-21,88, y=61,00, z=-33,69], EntityWitch[‘Witch’/166, l=‘MpServer’, x=-22,69, y=61,00, z=-32,75], EntityCow[‘Cow’/167, l=‘MpServer’, x=-20,44, y=82,00, z=9,44], EntityZombie[‘Zombie’/169, l=‘MpServer’, x=-32,09, y=67,00, z=32,41], EntityChicken[‘Chicken’/170, l=‘MpServer’, x=-25,84, y=70,00, z=32,47], EntitySpider[‘Spider’/43, l=‘MpServer’, x=-112,16, y=62,11, z=-113,38], EntityCow[‘Cow’/46, l=‘MpServer’, x=-113,25, y=66,00, z=-21,72], EntityCow[‘Cow’/47, l=‘MpServer’, x=-119,25, y=67,00, z=-11,84], EntityChicken[‘Chicken’/48, l=‘MpServer’, x=-116,56, y=64,00, z=9,53], EntityCow[‘Cow’/183, l=‘MpServer’, x=-6,81, y=88,00, z=-92,78], EntityCow[‘Cow’/184, l=‘MpServer’, x=-3,47, y=66,00, z=-48,53], EntitySkeleton[‘Skeleton’/185, l=‘MpServer’, x=-7,69, y=64,00, z=-3,75], EntityCow[‘Cow’/57, l=‘MpServer’, x=-105,53, y=65,00, z=-104,41], EntitySkeleton[‘Skeleton’/186, l=‘MpServer’, x=-7,91, y=64,00, z=-7,53], EntityCow[‘Cow’/58, l=‘MpServer’, x=-108,27, y=64,00, z=-99,82], EntityCow[‘Cow’/59, l=‘MpServer’, x=-111,50, y=64,00, z=-102,97], EntityZombie[‘Zombie’/60, l=‘MpServer’, x=-107,05, y=64,00, z=-98,79], EntityChicken[‘Chicken’/61, l=‘MpServer’, x=-107,50, y=64,00, z=-63,50], EntityCow[‘Cow’/64, l=‘MpServer’, x=-98,16, y=64,00, z=-25,06], EntityCow[‘Cow’/65, l=‘MpServer’, x=-103,91, y=67,00, z=-15,67], EntityCow[‘Cow’/66, l=‘MpServer’, x=-100,94, y=68,00, z=33,91], EntitySkeleton[‘Skeleton’/195, l=‘MpServer’, x=12,78, y=69,00, z=-86,84], EntityCow[‘Cow’/196, l=‘MpServer’, x=4,53, y=88,00, z=-75,31], EntityCow[‘Cow’/197, l=‘MpServer’, x=2,78, y=88,00, z=-63,81], EntityCow[‘Cow’/198, l=‘MpServer’, x=10,84, y=64,00, z=-24,50], EntityEnderman[‘Enderman’/199, l=‘MpServer’, x=11,58, y=64,00, z=-16,38], EntityZombie[‘Zombie’/200, l=‘MpServer’, x=14,00, y=64,00, z=-10,59], EntityCow[‘Cow’/201, l=‘MpServer’, x=8,38, y=67,00, z=16,28], EntityCow[‘Cow’/205, l=‘MpServer’, x=24,03, y=94,00, z=-115,44], EntitySkeleton[‘Skeleton’/206, l=‘MpServer’, x=20,50, y=74,00, z=-88,50], EntitySkeleton[‘Skeleton’/207, l=‘MpServer’, x=17,72, y=71,00, z=-89,50], EntitySkeleton[‘Skeleton’/79, l=‘MpServer’, x=-87,50, y=65,00, z=-106,50], EntityCow[‘Cow’/208, l=‘MpServer’, x=30,19, y=89,00, z=-79,38], EntitySkeleton[‘Skeleton’/80, l=‘MpServer’, x=-89,50, y=65,00, z=-107,50], EntityCow[‘Cow’/209, l=‘MpServer’, x=19,47, y=87,00, z=-52,19], EntityCow[‘Cow’/81, l=‘MpServer’, x=-96,23, y=66,00, z=-100,24], EntityCow[‘Cow’/82, l=‘MpServer’, x=-91,31, y=59,00, z=-83,78], EntityZombie[‘Zombie’/210, l=‘MpServer’, x=26,31, y=64,00, z=-17,09], EntityCow[‘Cow’/83, l=‘MpServer’, x=-81,41, y=67,00, z=-83,91], EntityCow[‘Cow’/211, l=‘MpServer’, x=24,63, y=64,00, z=-7,32], EntityClientPlayerMP[‘Player189’/339, l=‘MpServer’, x=-41,31, y=67,99, z=-40,38], EntitySkeleton[‘Skeleton’/84, l=‘MpServer’, x=-83,50, y=65,00, z=-94,94], EntityZombie[‘Zombie’/212, l=‘MpServer’, x=26,39, y=64,00, z=-14,71], EntityCow[‘Cow’/85, l=‘MpServer’, x=-95,84, y=65,00, z=-88,06], EntityChicken[‘Chicken’/213, l=‘MpServer’, x=29,74, y=64,00, z=-4,28], EntityCow[‘Cow’/86, l=‘MpServer’, x=-90,50, y=66,00, z=-94,38], EntitySlime[‘Slime’/214, l=‘MpServer’, x=30,60, y=36,00, z=14,63], EntityCow[‘Cow’/87, l=‘MpServer’, x=-87,06, y=66,00, z=-76,09], EntitySlime[‘Slime’/215, l=‘MpServer’, x=22,31, y=44,00, z=22,72], EntityCow[‘Cow’/88, l=‘MpServer’, x=-95,84, y=68,00, z=-11,50], EntityCreeper[‘Creeper’/216, l=‘MpServer’, x=19,63, y=42,00, z=31,59], EntityCreeper[‘Creeper’/217, l=‘MpServer’, x=30,09, y=41,00, z=33,66], EntityCreeper[‘Creeper’/227, l=‘MpServer’, x=34,59, y=93,00, z=-116,44], EntityCow[‘Cow’/228, l=‘MpServer’, x=37,66, y=93,00, z=-101,69], EntityZombie[‘Zombie’/229, l=‘MpServer’, x=38,59, y=88,00, z=-40,09], EntityCreeper[‘Creeper’/230, l=‘MpServer’, x=34,09, y=43,00, z=12,25], EntityCow[‘Cow’/104, l=‘MpServer’, x=-67,75, y=67,00, z=-107,81], EntityCow[‘Cow’/105, l=‘MpServer’, x=-74,63, y=67,00, z=-109,22], EntityCow[‘Cow’/233, l=‘MpServer’, x=36,63, y=67,00, z=6,38], EntityCow[‘Cow’/106, l=‘MpServer’, x=-73,19, y=64,00, z=-54,06], EntityCow[‘Cow’/107, l=‘MpServer’, x=-77,03, y=63,00, z=-42,56], EntityBat[‘Bat’/108, l=‘MpServer’, x=-64,25, y=51,10, z=-31,25], EntityCow[‘Cow’/109, l=‘MpServer’, x=-73,28, y=64,00, z=-19,69], EntityCow[‘Cow’/110, l=‘MpServer’, x=-77,19, y=68,00, z=1,13], EntityCow[‘Cow’/119, l=‘MpServer’, x=-58,81, y=66,00, z=-102,50], EntityCow[‘Cow’/120, l=‘MpServer’, x=-51,50, y=66,00, z=-81,16], EntityZombie[‘Zombie’/121, l=‘MpServer’, x=-60,50, y=64,00, z=-75,50], EntityZombie[‘Zombie’/122, l=‘MpServer’, x=-55,50, y=64,00, z=-77,50], EntityWitch[‘Witch’/123, l=‘MpServer’, x=-54,50, y=35,00, z=-38,50], EntitySkeleton[‘Skeleton’/124, l=‘MpServer’, x=-54,06, y=33,00, z=-40,50], EntitySkeleton[‘Skeleton’/125, l=‘MpServer’, x=-51,50, y=35,00, z=-36,50], EntityBat[‘Bat’/126, l=‘MpServer’, x=-53,25, y=53,10, z=-45,25], EntityBat[‘Bat’/127, l=‘MpServer’, x=-59,28, y=54,10, z=-36,38]]

                                            Retry entities: 0 total; []

                                            Server brand: fml,forge

                                            Server type: Integrated singleplayer server

                                            Stacktrace:

                                            at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:415)

                                            at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2566)

                                            at net.minecraft.client.Minecraft.run(Minecraft.java:991)

                                            at net.minecraft.client.main.Main.main(Main.java:164)

                                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                                            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                                            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                                            at java.lang.reflect.Method.invoke(Unknown Source)

                                            at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)

                                            at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

                                            at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)

                                            at GradleStart.main(Unknown Source)

                                            – System Details –

                                            Details:

                                            Minecraft Version: 1.7.10

                                            Operating System: Windows 10 (amd64) version 10.0

                                            Java Version: 1.8.0_121, Oracle Corporation

                                            Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation

                                            Memory: 655526056 bytes (625 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

                                            JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

                                            AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

                                            IntCache: cache: 15, tcache: 0, allocated: 13, tallocated: 95

                                            FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active

                                            States: ‘U’ = Unloaded ‘L’ = Loaded ‘C’ = Constructed ‘H’ = Pre-initialized ‘I’ = Initialized ‘J’ = Post-initialized ‘A’ = Available ‘D’ = Disabled ‘E’ = Errored

                                            UCHIJAAAA mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)

                                            UCHIJAAAA FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)

                                            UCHIJAAAA Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar)

                                            UCHIJAAAA iutils{0.0.0} [IUtils Mod] (bin)

                                            GL info: ’ Vendor: ‘NVIDIA Corporation’ Version: ‘4.5.0 NVIDIA 382.53’ Renderer: ‘GeForce 840M/PCIe/SSE2’

                                            Launched Version: 1.7.10

                                            LWJGL: 2.9.1

                                            OpenGL: GeForce 840M/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.53, NVIDIA Corporation

                                            GL Caps: Using GL 1.3 multitexturing.

                                            Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.

                                            Anisotropic filtering is supported and maximum anisotropy is 16.

                                            Shaders are available because OpenGL 2.1 is supported.

                                            Is Modded: Definitely; Client brand changed to ‘fml,forge’

                                            Type: Client (map_client.txt)

                                            Resource Packs: [F32-1.7.10.zip]

                                            Current Language: English (US)

                                            Profiler Position: N/A (disabled)

                                            Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                                            Anisotropic Filtering: Off (1)

                                            :::</clinit></init>

                                            Mes Sites(Mes Sites)
                                            |
                                            |    Site général : Game & play
                                            |   Site de projets (en dev !) :Infinite's Ressources
                                            J'ai et je suis content d'avoir 16,75 points d'ICRating

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB