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

    Résolu ERREUR OUVERTURE CONTAINER "java.lang.IndexOutOfBoundsException"

    1.7.x
    1.7.10
    2
    9
    1147
    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.
    • ?
      Invité dernière édition par

      Hey; 
      Quand j’ouvre mon container avec mon bloc, je tombe sur une erreur.
      Après des recherches approfondies sans aucune suite je me permets de vous demander de l’aide dans cette période de vacances certainement très charger.

      ERREUR:

      [12:13:43] [Client thread/FATAL]: Unreported exception thrown!
      
      java.lang.IndexOutOfBoundsException: Index: 45, Size: 45
      at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_131]
      at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_131]
      at net.minecraft.inventory.Container.getSlot(Container.java:130) ~[Container.class:?]
      at net.minecraft.inventory.Container.putStacksInSlots(Container.java:558) ~[Container.class:?]
      at net.minecraft.client.network.NetHandlerPlayClient.handleWindowItems(NetHandlerPlayClient.java:1202) ~[NetHandlerPlayClient.class:?]
      at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:70) ~[S30PacketWindowItems.class:?]
      at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:78) ~[S30PacketWindowItems.class:?]
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
      at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) ~[PlayerControllerMP.class:?]
      at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) ~[Minecraft.class:?]
      at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]
      at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
      at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
      at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
      at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
      at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
      at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
      at GradleStart.main(Unknown Source) [start/:?]
      [12:13:43] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
      // Ouch. That hurt :(
      

      CLASS DU BLOCK:

      package fr.baptiste.notifia.Blocks;
      
      import java.util.Random;
      
      import cpw.mods.fml.relauncher.Side;
      import cpw.mods.fml.relauncher.SideOnly;
      import fr.baptiste.notifia.Main;
      import fr.baptiste.notifia.model.poubelle.TileEntityPoubelle;
      import fr.baptiste.notifia.proxy.ClientProxy;
      import net.minecraft.block.Block;
      import net.minecraft.block.material.Material;
      import net.minecraft.entity.EntityLivingBase;
      import net.minecraft.entity.item.EntityItem;
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.inventory.IInventory;
      import net.minecraft.item.ItemStack;
      import net.minecraft.nbt.NBTTagCompound;
      import net.minecraft.tileentity.TileEntity;
      import net.minecraft.world.IBlockAccess;
      import net.minecraft.world.World;
      
      public class BlockPoubelle extends Block 
      {
      
      public BlockPoubelle(Material material) 
      {
      super(material);
      }
        public void onNeighborBlockChange(World world, int x, int y, int z, int neighborblockid) 
         {
      
         }
      
         public int idDropped(int metadata, Random rand, int fortune)
         {
             return 0;
         }
         public int quantityDropped(Random rand)
         {
             return 1;
         }
      
         @Override
         public TileEntity createTileEntity(World world, int metadata)
         {
             return new TileEntityPoubelle();
         }
      
         @Override
         public boolean hasTileEntity(int metadata)
         {
             return true;
         }
      
         public boolean isOpaqueCube()
         {
             return false;
         }
      
         public boolean renderAsNormalBlock()
         {
             return false;
         }
         @SideOnly(Side.CLIENT)
         public int getRenderType()
         {
             return ClientProxy.tesrRenderId;
         }
      
         public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
         {
             this.setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.18F, 0.5F);
         }
      
         public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
         {
             if(world.isRemote)
             {
                 return true;
             }
             else
             {
                 player.openGui(Main.instance, 0, world, x, y, z);
                 return true;
             }
         }
      
         public void breakBlock(World world, int x, int y, int z, Block block, int metadata)
         {
             TileEntity tileentity = world.getTileEntity(x, y, z);
      
             if(tileentity instanceof IInventory)
             {
                 IInventory inv = (IInventory)tileentity;
                 for(int i1 = 0; i1 < inv.getSizeInventory(); ++i1)
                 {
                     ItemStack itemstack = inv.getStackInSlot(i1);
      
                     if(itemstack != null)
                     {
                         float f = world.rand.nextFloat() * 0.8F + 0.1F;
                         float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
                         EntityItem entityitem;
      
                         for(float f2 = world.rand.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))
                         {
                             int j1 = world.rand.nextInt(21) + 10;
      
                             if(j1 > itemstack.stackSize)
                             {
                                 j1 = itemstack.stackSize;
                             }
      
                             itemstack.stackSize -= j1;
                             entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
                             float f3 = 0.05F;
                             entityitem.motionX = (double)((float)world.rand.nextGaussian() * f3);
                             entityitem.motionY = (double)((float)world.rand.nextGaussian() * f3 + 0.2F);
                             entityitem.motionZ = (double)((float)world.rand.nextGaussian() * f3);
      
                             if(itemstack.hasTagCompound())
                             {
                                 entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
                             }
                         }
                     }
                 }
                 world.func_147453_f(x, y, z, block);
             }
             super.breakBlock(world, x, y, z, block, metadata);
         }
      
         public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
         {
             TileEntity tile = world.getTileEntity(x, y, z);
             if(tile instanceof TileEntityPoubelle)
             {
                 if(stack.hasDisplayName())
                 {
                     ((TileEntityPoubelle)tile).setCustomName(stack.getDisplayName());
                 }
             }
         }
      
      }
      
      

      TileEntity du block:

      package fr.baptiste.notifia.model.poubelle;
      
      import cpw.mods.fml.relauncher.Side;
      import cpw.mods.fml.relauncher.SideOnly;
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.inventory.IInventory;
      import net.minecraft.item.ItemStack;
      import net.minecraft.nbt.NBTTagCompound;
      import net.minecraft.nbt.NBTTagList;
      import net.minecraft.tileentity.TileEntity;
      import net.minecraftforge.common.util.Constants;
      
      public class TileEntityPoubelle extends TileEntity implements IInventory
      {
      
          private ItemStack[] contents = new ItemStack[27];
          private String customName;
      
      @Override
      public int getSizeInventory()
      {
            return this.contents.length;
      }
      
      @Override
      public ItemStack getStackInSlot(int slotIndex) 
      {
            return this.contents[slotIndex];
      }
      
      @Override
      public ItemStack decrStackSize(int slotIndex, int amount) 
      {
           if(this.contents[slotIndex] != null) // si le contenu dans l'emplacement n'est pas null
            {
                ItemStack itemstack;
      
                if(this.contents[slotIndex].stackSize <= amount) // si la quantité est inférieur où égale à ce qu'on souhaite retirer
                {
                    itemstack = this.contents[slotIndex]; // la variable itemstack prends la valeur du contenu
                    this.contents[slotIndex] = null; // on retire ce qui est dans la variable contents
                    this.markDirty(); // met à jour le tile entity
                    return itemstack; // renvoie itemstack
                }
                else // sinon
                {
                    itemstack = this.contents[slotIndex].splitStack(amount); // la fonction splitStack(quantité) retire dans this.contents[slotIndex] le contenu et le met dans itemstack
      
                    if(this.contents[slotIndex].stackSize == 0) // au cas où la quantité passe à 0 (ce qui ne devrait pas arriver en temps normal)
                    {
                        this.contents[slotIndex] = null; // on met sur null, ça évite de se retrouver avec des itemstack bugué qui contiennent 0
                    }
                    this.markDirty(); // met à jour le tile entity
                    return itemstack; // renvoie itemstack
                }
            }
            else // sinon si le contenu dans cette emplacement est null
            {
                return null; // renvoie null, puisqu'il n'y a rien dans cette emplacement
            }
      }
      
      @Override
      public ItemStack getStackInSlotOnClosing(int slotIndex)
      {
          if(this.contents[slotIndex] != null)
            {
                ItemStack itemstack = this.contents[slotIndex];
                this.contents[slotIndex] = null;
                return itemstack;
            }
            else
            {
                return null;
            }
      }
      
      @Override
      public void setInventorySlotContents(int slotIndex, ItemStack stack) 
      {
           this.contents[slotIndex] = stack; // met l'item stack dans le tableau
      
            if(stack != null && stack.stackSize > this.getInventoryStackLimit()) // si la taille de l'item stack dépasse la limite maximum de l'inventaire
            {
                stack.stackSize = this.getInventoryStackLimit(); // on le remet sur la limite
            }
      
            this.markDirty(); // met à jour le tile entity
      }
      
      @Override
      public String getInventoryName() 
      {
      return this.hasCustomInventoryName() ? this.customName : "tile.cupboard";
      }
      
        public void setCustomName(String customName)
        {
            this.customName = customName;
        }
      
      @Override
      public boolean hasCustomInventoryName() 
      {
      return false;
      }
      
      @Override
      public int getInventoryStackLimit() 
      {
            return 64;
      }
      
      @Override
      public boolean isUseableByPlayer(EntityPlayer player) 
      {
           return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
      }
      
      @Override
      public void openInventory() 
      {
      
      }
      
      @Override
      public void closeInventory() 
      {
      
      }
      
      @Override
      public boolean isItemValidForSlot(int p_94041_1_, ItemStack p_94041_2_)
      {
      return true;
      }
      
          @Override
          public void readFromNBT(NBTTagCompound compound)
          {
              super.readFromNBT(compound); // exécute ce qui se trouve dans la fonction readFromNBT de la classe mère (lecture de la position du tile entity)
              if(compound.hasKey("CustomName", Constants.NBT.TAG_STRING)) // si un tag custom name de type string existe
              {
                  this.customName = compound.getString("CustomName"); // on le lit
              }
      
              NBTTagList nbttaglist = compound.getTagList("Items", Constants.NBT.TAG_COMPOUND); // on obtient la liste de tags nommée Items
              this.contents = new ItemStack[this.getSizeInventory()]; // on réinitialise le tableau
              for(int i = 0; i < nbttaglist.tagCount(); ++i) // i varie de 0 à la taille la liste
              {
                  NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); // on lit le tag nbt
                  int j = nbttagcompound1.getByte("Slot") & 255; // on lit à quel slot se trouve l'item stack
      
                  if(j >= 0 && j < this.contents.length)
                  {
                      this.contents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); // on lit l'item stack qui se trouve dans le tag
                  }
              }
          }
      
          @Override
          public void writeToNBT(NBTTagCompound compound)
          {
              super.writeToNBT(compound); // exécute se qui se trouve dans la fonction writeToNBT de la classe mère (écriture de la position du tile entity)
              if(this.hasCustomInventoryName()) // s'il y a un nom custom
              {
                  compound.setString("CustomName", this.customName); // on le met dans le tag nbt
              }
      
              NBTTagList nbttaglist = new NBTTagList(); // on créé une nouvelle liste de tags
              for(int i = 0; i < this.contents.length; ++i) // i varie de 0 à la taille de notre tableau
              {
                  if(this.contents[ i] != null) // si l'item stack à l'emplacement i du tableau n'est pas null
                  {
                      NBTTagCompound nbttagcompound1 = new NBTTagCompound(); // on créé un tag nbt
                      nbttagcompound1.setByte("Slot", (byte)i); // on enregistre son emplacement dans le tableau
                      this.contents[ i].writeToNBT(nbttagcompound1); // on écrit l'item dans le tag
                      nbttaglist.appendTag(nbttagcompound1); // on ajoute le tab à la liste
                  }
              }
              compound.setTag("Items", nbttaglist); // on enregistre la liste dans le tag nbt
          }
      
      }
      
      

      Container du block:

      package fr.baptiste.notifia.model.poubelle;
      
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.entity.player.InventoryPlayer;
      import net.minecraft.inventory.Container;
      import net.minecraft.inventory.Slot;
      import net.minecraft.item.ItemStack;
      
      public class ContainerPoubelle extends Container
      {
       private final TileEntityPoubelle tilePoubelle;
      
        private void bindPlayerInventory(InventoryPlayer inventory)
        {
            int i;
            for(i = 0; i < 3; ++i)
            {
                for(int j = 0; j < 9; ++j)
                {
                    this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 86 + i * 18));
                }
            }
      
            for(i = 0; i < 9; ++i)
            {
                this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 144));
            }
        }
      
        public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex)
        {
            ItemStack itemstack = null;
            Slot slot = (Slot)this.inventorySlots.get(slotIndex);
      
            if(slot != null && slot.getHasStack())
            {
                ItemStack itemstack1 = slot.getStack();
                itemstack = itemstack1.copy();
      
                if(slotIndex < this.tilePoubelle.getSizeInventory())
                {
                    if(!this.mergeItemStack(itemstack1, this.tilePoubelle.getSizeInventory(), this.inventorySlots.size(), true))
                    {
                        return null;
                    }
                }
                else if(!this.mergeItemStack(itemstack1, 0, this.tilePoubelle.getSizeInventory(), false))
                {
                    return null;
                }
      
                if(itemstack1.stackSize == 0)
                {
                    slot.putStack((ItemStack)null);
                }
                else
                {
                    slot.onSlotChanged();
                }
            }
            return itemstack;
        }
      
        public ContainerPoubelle(TileEntityPoubelle tile, InventoryPlayer inventory)
        {
            this.tilePoubelle = tile;
            tile.openInventory();
            for(int i = 0; i < 3; ++i)
            {
                for(int j = 0; j < 9; ++j)
                {
                    this.addSlotToContainer(new Slot(tile, j + i * 9, 8 + j * 18, 18 + i * 18));
                }
            }
            this.bindPlayerInventory(inventory);
        }
      
      @Override
      public boolean canInteractWith(EntityPlayer player) 
      {
      return this.tilePoubelle.isUseableByPlayer(player);
      }
      
          public void onContainerClosed(EntityPlayer player)
         {
             super.onContainerClosed(player);
             this.tilePoubelle.closeInventory();
         }
      
      }
      
      

      Gui du block:

      package fr.baptiste.notifia.model.poubelle;
      
      import org.lwjgl.opengl.GL11;
      
      import fr.baptiste.notifia.Reference;
      import net.minecraft.client.gui.inventory.GuiContainer;
      import net.minecraft.client.resources.I18n;
      import net.minecraft.entity.player.InventoryPlayer;
      import net.minecraft.inventory.Container;
      import net.minecraft.inventory.IInventory;
      import net.minecraft.util.ResourceLocation;
      
      public class GuiPoubelle extends GuiContainer 
      {
       private static final ResourceLocation textures = new ResourceLocation(Reference.MOD_ID, "textures/gui/container/poubelle.png");
        private TileEntityPoubelle tilePoubelle;
        private IInventory playerInv;
      
        public GuiPoubelle(TileEntityPoubelle tile, InventoryPlayer inventory)
        {
            super(new ContainerPoubelle(tile, inventory));
            this.tilePoubelle = tile;
            this.playerInv = inventory;
            this.allowUserInput = false;
            this.ySize = 170;
        }
      
        protected void drawGuiContainerForegroundLayer(int x, int y)
        {
            String tileName = this.tilePoubelle.hasCustomInventoryName() ? this.tilePoubelle.getInventoryName() : I18n.format(this.tilePoubelle.getInventoryName());
            this.fontRendererObj.drawString(tileName, (this.xSize - this.fontRendererObj.getStringWidth(tileName)) / 2, 6, 0);
            String invName = this.playerInv.hasCustomInventoryName() ? this.playerInv.getInventoryName() : I18n.format(this.playerInv.getInventoryName());
            this.fontRendererObj.drawString(invName, (this.xSize - this.fontRendererObj.getStringWidth(invName)) / 2, this.ySize - 96, 0);
        }
         @Override
         protected void drawGuiContainerBackgroundLayer(float partialRenderTick, int x, int y)
         {
             GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); // on colorise
             this.mc.getTextureManager().bindTexture(textures); // affiche la texture
             int k = (this.width - this.xSize) / 2; // on calcul la coordonnée x du point en haut à gauche
             int l = (this.height - this.ySize) / 2; // on calcul la coordonnée y du point en haut à gauche
             this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); // on desine la texture, la fonction à pour argument point x de départ, point y de départ, vecteur u, vecteur v, largeur, hauteur)
         }
      }
      
      

      GuiHandler:

      public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
      
      {
            TileEntity tile = world.getTileEntity(x, y, z);
      switch (ID) {
      case 0:
            if(tile instanceof TileEntityPoubelle)
            {
                return new ContainerPoubelle((TileEntityPoubelle)tile, player.inventory);
            }
      case 1:
      if (player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof BackPack))
      {
      return new ContainerBackPack(player.inventory, new InventoryBackPack(player.getHeldItem(), 54));
      }
      case 2:
      if(ID > EnumGuiType.values().length)
      return null;
      EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
      EnumGuiType gui = EnumGuiType.values()[ID];
      return getContainer(gui, player, x, y, z, npc);
      }
      return null;
      }
      public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
      
      {
            TileEntity tile = world.getTileEntity(x, y, z);
      switch (ID) {
      case 0:
            if(tile instanceof TileEntityPoubelle)
            {
                return new GuiPoubelle((TileEntityPoubelle)tile, player.inventory);
            }
      case 1:
      if (player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof BackPack))
      {
      return new GuiBackPack(player.inventory, new InventoryBackPack(player.getHeldItem(), 54));
      }
      
      }
            return null;
      }
      

      Très amicalement,
      Baptiste.

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

        Salut,
        Es-tu sûr que c’est la poubelle qui cause ce crash ?
        Car ta poubelle a un inventaire de 27 slot, or ce qui cause le crash c’est que tu essayes de mettre un item dans le slot 45 d’un inventaire qui a 45 slot (donc de 0 à 44, le slot 45 n’existe pas).

        1 réponse Dernière réponse Répondre Citer 0
        • ?
          Invité dernière édition par

          @‘robin4002’:

          Salut,
          Es-tu sûr que c’est la poubelle qui cause ce crash ?
          Car ta poubelle a un inventaire de 27 slot, or ce qui cause le crash c’est que tu essayes de mettre un item dans le slot 45 d’un inventaire qui a 45 slot (donc de 0 à 44, le slot 45 n’existe pas).

          Salut Robin,
          Je m’en doutais, le jeu crash quand je clique sur la poubelle, mais il se peut que cela soit dû au GuiHandler non ?

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

            Étrange ça …
            Tu peux envoyer la totalité des logs pour voir s’il y a plus de détails ?

            1 réponse Dernière réponse Répondre Citer 0
            • ?
              Invité dernière édition par

              @‘robin4002’:

              Étrange ça …
              Tu peux envoyer la totalité des logs pour voir s’il y a plus de détails ?

              Avec plaisir

              [14:28:36] [Client thread/FATAL]: Unreported exception thrown!
              java.lang.IndexOutOfBoundsException: Index: 45, Size: 45
              at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_131]
              at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_131]
              at net.minecraft.inventory.Container.getSlot(Container.java:130) ~[Container.class:?]
              at net.minecraft.inventory.Container.putStacksInSlots(Container.java:558) ~[Container.class:?]
              at net.minecraft.client.network.NetHandlerPlayClient.handleWindowItems(NetHandlerPlayClient.java:1202) ~[NetHandlerPlayClient.class:?]
              at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:70) ~[S30PacketWindowItems.class:?]
              at net.minecraft.network.play.server.S30PacketWindowItems.processPacket(S30PacketWindowItems.java:78) ~[S30PacketWindowItems.class:?]
              at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
              at net.minecraft.client.multiplayer.PlayerControllerMP.updateController(PlayerControllerMP.java:317) ~[PlayerControllerMP.class:?]
              at net.minecraft.client.Minecraft.runTick(Minecraft.java:1693) ~[Minecraft.class:?]
              at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1039) ~[Minecraft.class:?]
              at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
              at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_131]
              at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_131]
              at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
              at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
              at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
              at GradleStart.main(Unknown Source) [start/:?]
              [14:28:36] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
              // Hi. I'm Minecraft, and I'm a crashaholic.
              
              Time: 10/08/17 14:28
              Description: Unexpected error
              
              java.lang.IndexOutOfBoundsException: Index: 45, Size: 45
              at java.util.ArrayList.rangeCheck(Unknown Source)
              at java.util.ArrayList.get(Unknown Source)
              at net.minecraft.inventory.Container.getSlot(Container.java:130)
              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)
              
              A detailed walkthrough of the error, its code path and all known details is as follows:
              ---------------------------------------------------------------------------------------
              
              -- Head --
              Stacktrace:
              at java.util.ArrayList.rangeCheck(Unknown Source)
              at java.util.ArrayList.get(Unknown Source)
              at net.minecraft.inventory.Container.getSlot(Container.java:130)
              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['Player424'/165, l='MpServer', x=1727,41, y=5,62, z=-174,56]]
              Chunk stats: MultiplayerChunkCache: 49, 49
              Level seed: 0
              Level generator: ID 01 - flat, ver 0\. Features enabled: false
              Level generator options: 
              Level spawn location: World: (1724,4,-184), Chunk: (at 12,0,8 in 107,-12; contains blocks 1712,0,-192 to 1727,255,-177), Region: (3,-1; contains chunks 96,-32 to 127,-1, blocks 1536,0,-512 to 2047,255,-1)
              Level time: 70770 game time, 70770 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: 15 total; [EntityChicken['Poule'/96, l='MpServer', x=1773,59, y=4,00, z=-219,44], EntityCow['Vache'/97, l='MpServer', x=1770,22, y=4,00, z=-192,81], EntitySheep['Mouton'/98, l='MpServer', x=1763,13, y=4,00, z=-197,25], EntityHorse['Cheval'/99, l='MpServer', x=1775,78, y=4,00, z=-185,59], EntityCow['Vache'/71, l='MpServer', x=1721,25, y=4,00, z=-219,25], EntityPig['Cochon'/72, l='MpServer', x=1719,88, y=4,00, z=-193,31], EntityPig['Cochon'/40, l='MpServer', x=1692,63, y=4,00, z=-219,16], EntitySheep['Mouton'/41, l='MpServer', x=1692,81, y=4,00, z=-213,38], EntityPig['Cochon'/42, l='MpServer', x=1683,13, y=4,00, z=-172,94], EntityPig['Cochon'/79, l='MpServer', x=1735,88, y=4,00, z=-215,09], EntityCow['Vache'/80, l='MpServer', x=1734,81, y=4,00, z=-221,09], EntityClientPlayerMP['Player424'/165, l='MpServer', x=1727,41, y=5,62, z=-174,56], EntityHorse['Cheval'/87, l='MpServer', x=1752,38, y=4,00, z=-212,72], EntityChicken['Poule'/88, l='MpServer', x=1757,61, y=4,00, z=-184,56], EntityCow['Vache'/60, l='MpServer', x=1705,22, y=4,00, z=-192,75]]
              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_131, Oracle Corporation
              Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
              Memory: 879700184 bytes (838 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 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: 0, tcache: 0, allocated: 0, tallocated: 0
              FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 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.1558-1.7.10.jar) 
              UCHIJAAAA Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
              UCHIJAAAA notifia{1.0.0} [notifia] (bin) 
              GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13399 Compatibility Profile Context 15.201.1151.1008' Renderer: 'AMD Radeon HD 7600M Series'
              Launched Version: 1.7.10
              LWJGL: 2.9.1
              OpenGL: AMD Radeon HD 7600M Series GL version 4.5.13399 Compatibility Profile Context 15.201.1151.1008, ATI Technologies Inc.
              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: []
              Current Language: Français (France)
              Profiler Position: N/A (disabled)
              Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
              Anisotropic Filtering: Off (1)
              AL lib: (EE) alc_cleanup: 1 device not closed
              Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
              
              1 réponse Dernière réponse Répondre Citer 0
              • robin4002
                robin4002 Moddeurs confirmés Rédacteurs Administrateurs dernière édition par

                Pas plus de détails, c’est vraiment étrange comme problème.

                Dans le container commente la ligne bindPlayerInventory(inventory); et regardes si cela crash toujours.
                Si oui, commente               this.addSlotToContainer(new Slot(tile, j + i * 9, 8 + j * 18, 18 + i * 18));
                et dis-moi si cela crash encore.

                1 réponse Dernière réponse Répondre Citer 0
                • ?
                  Invité dernière édition par

                  @‘robin4002’:

                  Pas plus de détails, c’est vraiment étrange comme problème.

                  Dans le container commente la ligne bindPlayerInventory(inventory); et regardes si cela crash toujours.
                  Si oui, commente               this.addSlotToContainer(new Slot(tile, j + i * 9, 8 + j * 18, 18 + i * 18));
                  et dis-moi si cela crash encore.

                  Quand tu dis commente, tu parle bien du commentaire // ?

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

                    oui, pour que le code ne soit plus actif.
                    Tu mets un // devant la ligne.

                    C’est temporaire, le temps de localiser quel code exactement cause le crash.

                    1 réponse Dernière réponse Répondre Citer 0
                    • ?
                      Invité dernière édition par

                      @‘robin4002’:

                      oui, pour que le code ne soit plus actif.
                      Tu mets un // devant la ligne.

                      C’est temporaire, le temps de localiser quel code exactement cause le crash.

                      Problème résolu… C’était un conflit avec CustomNPC.
                      Merci quand même de ton aide toujours aussi précieuse.
                      Amic’

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

                      MINECRAFT FORGE FRANCE © 2018

                      Powered by NodeBB