MFF

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

    Problème IGUIHandler

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

      J’vois ou est le soucis avec le slot:

      package armacraft.net.GUI;
      
      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.minecraftforge.common.util.Constants;
      
      public class InventaireArma implements IInventory{
      
      private final String name = "Inventaire";
      
      private final String tagName = "Inventaire";
      
      public static final int INV_SIZE = 2; // surement ici que il faut changer mais je sais pas par quoi
      
      private ItemStack[] inventory = new ItemStack[INV_SIZE];
      
      public InventaireArma()
      {
      }
      
      @Override
      public int getSizeInventory()
      {
      return inventory.length;
      }
      
      @Override
      public ItemStack getStackInSlot(int slot)
      {
      return inventory[slot]; // l'érreur est ici
      }
      
      @Override
      public ItemStack decrStackSize(int slot, int amount)
      {
      ItemStack stack = getStackInSlot(slot);
      if (stack != null)
      {
      if (stack.stackSize > amount)
      {
      stack = stack.splitStack(amount);
      this.onInventoryChanged();
      }
      else
      {
      setInventorySlotContents(slot, null);
      }
      }
      return stack;
      }
      
      @Override
      public ItemStack getStackInSlotOnClosing(int slot)
      {
      ItemStack stack = getStackInSlot(slot);
      setInventorySlotContents(slot, null);
      return stack;
      }
      
      @Override
      public void setInventorySlotContents(int slot, ItemStack itemstack)
      {
      this.inventory[slot] = itemstack;
      
      if (itemstack != null && itemstack.stackSize > this.getInventoryStackLimit())
      {
      itemstack.stackSize = this.getInventoryStackLimit();
      }
      
      this.onInventoryChanged();
      }
      
      @Override
      public int getInventoryStackLimit()
      {
      return 1;
      }
      
      public void onInventoryChanged()
      {
      for (int i = 0; i < getSizeInventory(); ++i)
      {
      if (getStackInSlot(i) != null && getStackInSlot(i).stackSize == 0) {
      inventory* = null;
      }
      }
      }
      
      @Override
      public boolean isUseableByPlayer(EntityPlayer entityplayer)
      {
      return true;
      }
      
      @Override
      public boolean isItemValidForSlot(int slot, ItemStack itemstack)
      {
      return true;
      }
      
      public void writeToNBT(NBTTagCompound compound)
      {
      NBTTagList items = new NBTTagList();
      
      for (int i = 0; i < getSizeInventory(); ++i)
      {
      if (getStackInSlot(i) != null)
      {
      NBTTagCompound item = new NBTTagCompound();
      item.setByte("Slot", (byte) i);
      getStackInSlot(i).writeToNBT(item);
      items.appendTag(item);
      }
      }
      
      compound.setTag(tagName, items);
      }
      
      @Override
      public String getInventoryName() {
      return name;
      }
      
      @Override
      public boolean hasCustomInventoryName() {
      return name.length() > 0;
      }
      
      @Override
      public void markDirty() {
      // TODO Auto-generated method stub
      
      }
      
      @Override
      public void openInventory() {
      // TODO Auto-generated method stub
      
      }
      
      @Override
      public void closeInventory() {
      // TODO Auto-generated method stub
      
      }
      
      }
      

      crashreport:

      
      [22:57:18] [main/INFO] [GradleStart]: Extra: []
      [22:57:18] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.7.10, --accessToken, {REDACTED}, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
      [22:57:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
      [22:57:18] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
      [22:57:18] [main/INFO] [FML]: Java is Java HotSpot(TM) Client VM, version 1.8.0_45, running on Windows 7:x86:6.1, installed at C:\Program Files (x86)\Java\jdk1.8.0_45\jre
      [22:57:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
      [22:57:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
      [22:57:18] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
      [22:57:18] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
      [22:57:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
      [22:57:18] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
      [22:57:18] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
      [22:57:19] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
      [22:57:19] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
      [22:57:19] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
      [22:57:19] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
      [22:57:19] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
      [22:57:19] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
      [22:57:19] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
      [22:57:19] [main/INFO]: Setting user: Player719
      [22:57:20] [Client thread/INFO]: LWJGL Version: 2.9.1
      [22:57:20] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
      [22:57:20] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
      [22:57:20] [Client thread/INFO] [FML]: Replaced 183 ore recipies
      [22:57:20] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
      [22:57:20] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\Modding\AltisMineModV2\eclipse\mods for mods
      [22:57:21] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
      [22:57:21] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, amm] at CLIENT
      [22:57:21] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, amm] at SERVER
      [22:57:21] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:AltisMineMod
      [22:57:22] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
      [22:57:22] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
      [22:57:22] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
      [22:57:22] [Client thread/INFO] [FML]: Applying holder lookups
      [22:57:22] [Client thread/INFO] [FML]: Holder lookups applied
      [22:57:22] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:22] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
      [22:57:22] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
      [22:57:22] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
      [22:57:22] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
      [22:57:22] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:22] [Sound Library Loader/INFO]: Sound engine started
      [22:57:22] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
      [22:57:22] [Client thread/INFO]: Created: 256x256 textures/items-atlas
      [22:57:22] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
      [22:57:22] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:AltisMineMod
      [22:57:23] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
      [22:57:23] [Client thread/INFO]: Created: 256x256 textures/items-atlas
      [22:57:23] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:23] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down…
      [22:57:23] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
      [22:57:23] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:23] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:23] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem…
      [22:57:23] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
      [22:57:23] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
      [22:57:23] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
      [22:57:23] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
      [22:57:23] [Sound Library Loader/INFO]: Sound engine started
      [22:57:25] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
      [22:57:25] [Server thread/INFO]: Generating keypair
      [22:57:25] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
      [22:57:25] [Server thread/INFO] [FML]: Applying holder lookups
      [22:57:25] [Server thread/INFO] [FML]: Holder lookups applied
      [22:57:25] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@1cef4d7)
      [22:57:25] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@1cef4d7)
      [22:57:25] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@1cef4d7)
      [22:57:25] [Server thread/INFO]: Preparing start region for level 0
      [22:57:26] [Server thread/INFO]: Changing view distance to 8, from 10
      [22:57:26] [Netty Client IO #0/INFO] [FML]: Server protocol version 1
      [22:57:26] [Netty IO #1/INFO] [FML]: Client protocol version 1
      [22:57:26] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : amm@1.0,FML@7.10.85.1291,Forge@10.13.2.1291,mcp@9.05
      [22:57:26] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
      [22:57:26] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
      [22:57:26] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
      [22:57:26] [Server thread/INFO]: Player719[local:E:a905a2d9] logged in with entity id 396 at (-37.42806090523522, 40.24918707874468, 178.69999998807904)
      [22:57:26] [Server thread/INFO]: Player719 joined the game
      [22:57:26] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.event.entity.EntityJoinWorldEvent@1abc394:
      java.lang.ArrayIndexOutOfBoundsException: 9
      at armacraft.net.GUI.InventaireArma.getStackInSlot(InventaireArma.java:40) ~[InventaireArma.class:?]
      at net.minecraft.inventory.Slot.getStack(Slot.java:88) ~[Slot.class:?]
      at net.minecraft.inventory.Container.getInventory(Container.java:67) ~[Container.class:?]
      at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:53) ~[Container.class:?]
      at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) ~[FMLNetworkHandler.class:?]
      at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?]
      at armacraft.net.Events.Events.onJoinWorld(Events.java:635) ~[Events.class:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Events_onJoinWorld_EntityJoinWorldEvent.invoke(.dynamic) ~[?:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
      at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) [EventBus.class:?]
      at net.minecraft.world.World.spawnEntityInWorld(World.java:1503) [World.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.playerLoggedIn(ServerConfigurationManager.java:309) [ServerConfigurationManager.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:170) [ServerConfigurationManager.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173) [NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446) [NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17) [HandshakeCompletionHandler.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11) [HandshakeCompletionHandler.class:?]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) [SimpleChannelInboundHandler.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
      at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
      at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
      at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
      [22:57:26] [Server thread/ERROR] [FML]: Index: 3 Listeners:
      [22:57:26] [Server thread/ERROR] [FML]: 0: HIGHEST
      [22:57:26] [Server thread/ERROR] [FML]: 1: ASM: net.minecraftforge.common.ForgeInternalHandler@1e83be1 onEntityJoinWorld(Lnet/minecraftforge/event/entity/EntityJoinWorldEvent;)V
      [22:57:26] [Server thread/ERROR] [FML]: 2: NORMAL
      [22:57:26] [Server thread/ERROR] [FML]: 3: ASM: armacraft.net.Events.Events@1598b38 onJoinWorld(Lnet/minecraftforge/event/entity/EntityJoinWorldEvent;)V
      [22:57:26] [Server thread/ERROR] [FML]: HandshakeCompletionHandler exception
      java.lang.ArrayIndexOutOfBoundsException: 9
      at armacraft.net.GUI.InventaireArma.getStackInSlot(InventaireArma.java:40) ~[InventaireArma.class:?]
      at net.minecraft.inventory.Slot.getStack(Slot.java:88) ~[Slot.class:?]
      at net.minecraft.inventory.Container.getInventory(Container.java:67) ~[Container.class:?]
      at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:53) ~[Container.class:?]
      at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) ~[FMLNetworkHandler.class:?]
      at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?]
      at armacraft.net.Events.Events.onJoinWorld(Events.java:635) ~[Events.class:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Events_onJoinWorld_EntityJoinWorldEvent.invoke(.dynamic) ~[?:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
      at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
      at net.minecraft.world.World.spawnEntityInWorld(World.java:1503) ~[World.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.playerLoggedIn(ServerConfigurationManager.java:309) ~[ServerConfigurationManager.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:170) ~[ServerConfigurationManager.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173) ~[NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446) ~[NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17) ~[HandshakeCompletionHandler.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11) ~[HandshakeCompletionHandler.class:?]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
      at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [MessageToMessageDecoder.class:?]
      at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) [DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) [DefaultChannelPipeline.class:?]
      at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) [EmbeddedChannel.class:?]
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
      [22:57:26] [Server thread/ERROR] [FML]: There was a critical exception handling a packet on channel FML
      java.lang.ArrayIndexOutOfBoundsException: 9
      at armacraft.net.GUI.InventaireArma.getStackInSlot(InventaireArma.java:40) ~[InventaireArma.class:?]
      at net.minecraft.inventory.Slot.getStack(Slot.java:88) ~[Slot.class:?]
      at net.minecraft.inventory.Container.getInventory(Container.java:67) ~[Container.class:?]
      at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:53) ~[Container.class:?]
      at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) ~[FMLNetworkHandler.class:?]
      at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2501) ~[EntityPlayer.class:?]
      at armacraft.net.Events.Events.onJoinWorld(Events.java:635) ~[Events.class:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler_7_Events_onJoinWorld_EntityJoinWorldEvent.invoke(.dynamic) ~[?:?]
      at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
      at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:138) ~[EventBus.class:?]
      at net.minecraft.world.World.spawnEntityInWorld(World.java:1503) ~[World.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.playerLoggedIn(ServerConfigurationManager.java:309) ~[ServerConfigurationManager.class:?]
      at net.minecraft.server.management.ServerConfigurationManager.initializeConnectionToPlayer(ServerConfigurationManager.java:170) ~[ServerConfigurationManager.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeServerSideConnection(NetworkDispatcher.java:173) ~[NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.handshake.NetworkDispatcher.completeHandshake(NetworkDispatcher.java:446) ~[NetworkDispatcher.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:17) ~[HandshakeCompletionHandler.class:?]
      at cpw.mods.fml.common.network.internal.HandshakeCompletionHandler.channelRead0(HandshakeCompletionHandler.java:11) ~[HandshakeCompletionHandler.class:?]
      at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:98) ~[SimpleChannelInboundHandler.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
      at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[MessageToMessageDecoder.class:?]
      at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRead(DefaultChannelHandlerContext.java:337) ~[DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelHandlerContext.fireChannelRead(DefaultChannelHandlerContext.java:323) ~[DefaultChannelHandlerContext.class:?]
      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:785) ~[DefaultChannelPipeline.class:?]
      at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:169) ~[EmbeddedChannel.class:?]
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:86) [FMLProxyPacket.class:?]
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) [NetworkManager.class:?]
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) [NetworkSystem.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) [MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) [IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
      [22:57:26] [Server thread/ERROR]: Encountered an unexpected exception
      net.minecraft.util.ReportedException: Ticking memory connection
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:198) ~[NetworkSystem.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) ~[MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614) ~[MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) ~[IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
      Caused by: java.lang.NullPointerException
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:110) ~[FMLProxyPacket.class:?]
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241) ~[NetworkManager.class:?]
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) ~[NetworkSystem.class:?]
      … 5 more
      [22:57:26] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Admin\Desktop\Modding\AltisMineModV2\eclipse\.\crash-reports\crash-2016-03-07_22.57.26-server.txt
      [22:57:26] [Server thread/INFO]: Stopping server
      [22:57:26] [Server thread/INFO]: Saving players
      [22:57:26] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: –-- Minecraft Crash Report ----
      // I bet Cylons wouldn't have this problem.
      
      Time: 07/03/16 22:57
      Description: Ticking memory connection
      
      java.lang.NullPointerException: Ticking memory connection
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:110)
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
      
      A detailed walkthrough of the error, its code path and all known details is as follows:
      ---------------------------------------------------------------------------------------
      
      -- Head --
      Stacktrace:
      at cpw.mods.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:110)
      at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
      
      -- Ticking connection --
      Details:
      Connection: net.minecraft.network.NetworkManager@5ed904
      Stacktrace:
      at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
      at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
      
      -- System Details --
      Details:
      Minecraft Version: 1.7.10
      Operating System: Windows 7 (x86) version 6.1
      Java Version: 1.8.0_45, Oracle Corporation
      Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
      Memory: 900449576 bytes (858 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 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: 12, tallocated: 94
      FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
      mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
      FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
      Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
      amm{1.0} [AltisMineMod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
      Profiler Position: N/A (disabled)
      Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
      Player Count: 1 / 8; [EntityPlayerMP['Player719'/396, l='New World', x=-37,43, y=40,25, z=178,70]]
      Type: Integrated Server (map_client.txt)
      Is Modded: Definitely; Client brand changed to 'fml,forge'
      [22:57:26] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2016-03-07_22.57.26-server.txt
      [22:57:26] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
      [22:57:26] [Server thread/INFO]: Saving worlds
      [22:57:26] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
      [22:57:26] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
      [22:57:26] [Server thread/INFO]: Saving chunks for level 'New World'/The End
      [22:57:27] [Server thread/INFO] [FML]: Unloading dimension 0
      [22:57:27] [Server thread/INFO] [FML]: Unloading dimension -1
      [22:57:27] [Server thread/INFO] [FML]: Unloading dimension 1
      [22:57:27] [Server thread/INFO] [FML]: Applying holder lookups
      [22:57:27] [Server thread/INFO] [FML]: Holder lookups applied
      [22:57:27] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
      [22:57:27] [Client thread/INFO] [FML]: Server terminated.
      AL lib: (EE) alc_cleanup: 1 device not closed
      Java HotSpot(TM) Client 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
      • GabsG Hors-ligne
        Gabs
        dernière édition par

        Ouais c’est bon j’ai réussi merci :D, par contre j’aimerais savoir comment faire pour ajouter que 1 slot merci d’avance. 
        C’est bon j’ai réussie mais j’arrive pas a le déplacer, tu ma dis: [font=Ubuntu, sans-serifnew Slot(inventaire lié, id, x, y);]

        [font=Ubuntu, sans-serifMoi j’ai ```java
        this.addSlotToContainer(new SlotInvArma(inv, k + j * 9, 8 + k * 0, 0 + j * 0));]
        [font=Ubuntu, sans-serif                                                                                     inv lié, id,      x     et        y]

        
        [font=Ubuntu, sans-serifSauf que quand je touche au x et y sa m'agrandi l'inventaire au lieux de le déplacer ^^]
        1 réponse Dernière réponse Répondre Citer 0
        • AymericRedA Hors-ligne
          AymericRed
          dernière édition par

          Comment ça ça l’agrandi ? T’a bien modifié ça : x : 8 + k * 0 et y : 0 + j * 0 ?
          Il faut juste que tu rajoutes 1 à un des for() au dessus de la ligne du slot,
          en pensant bien à rajouter de la taille à ton tableau de stacks.

          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
          • GabsG Hors-ligne
            Gabs
            dernière édition par

            D’acc merci et oui j’ai bien modifié le x et y

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

              OK
              Et je précise, y un for, c’est le nombre de slots en largeur et l’autre en hauteur

              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
              • GabsG Hors-ligne
                Gabs
                dernière édition par

                Ouaip nickel thx par contre j’ai un soucis en gros mon slot quand je passe la souris dessus il est blanc et non transparent comment je peux réglé ça ?

                Screen: http://puu.sh/nzmqs/7448e582b9.PNG

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

                  Pense pas que j’aies nien compris…
                  Mais as-tu bien pensé à adapter ta texture.

                  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
                  • GabsG Hors-ligne
                    Gabs
                    dernière édition par

                    Ah c’est surement ça ! ^^ je dois procédé comment ?

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

                      Il y a des tutos pour ça…
                      Dans ton gui, tu as une ressourcelocation qui correspond à ta texture, t’a juste à modifier cette image

                      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
                      • GabsG Hors-ligne
                        Gabs
                        dernière édition par

                        A tu parle de ça mais oui je les adapter ^^ je penser que il fallait déplacer la texture du slot aussi x)

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

                          Déplacer la texture du slot ?!? Si tu parles tu carré qui apparaît quand tu le survolé, c’est automatique, et sinon ben j’ai zappé quelque chose 😢

                          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
                          • GabsG Hors-ligne
                            Gabs
                            dernière édition par

                            Ouais je parle du carré qui apparaît quand tu le survole moi quand je vais dessus c’est blanc et non transparent ^^

                            EDIT: j’ai pas mal de problème ^^ en gros quand je met un item dans le slot de mon inventaire pour test et que je ferme l’inventaire et que je le ré ouvre il disparaît j’ai regarder dans la classe container j’ai pas trouver le soucis … et aussi j’ai un problème en gros je voudrais ouvrir mon inventaire avec une touche normal sauf que dans le commonproxy j’ai la ligne: return new GuiArma(player.inventory, new InventaireArma(player.getHeldItem(), 54)); le player.getHeldItem me fait crash quand j’ai pas d’item dans la main je peux le remplacer par quoi? et quand je déplace un item c’est pareil je crash aussi ça vient de la fonction slotclick J’crois.

                            Class:

                            -Container:

                            
                            package armacraft.net.GUI;
                            
                            import armacraft.net.AltisMineMod;
                            import armacraft.net.Items.Water;
                            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;
                            import net.minecraft.nbt.NBTTagCompound;
                            
                            public class ContainerArma extends Container
                            {
                            public InventaireArma inv;
                            public int rows;
                            
                            public ContainerArma(InventoryPlayer playerInv, InventaireArma inv) {
                            this.inv = inv;
                            this.rows = inv.getSizeInventory() / 8;
                            int i = (this.rows - 4) * 17;
                            int j;
                            int k;
                            
                            // Adding slots to the backpack
                            for (j = 0; j < this.rows; ++j) {
                            for (k = 0; k < 9; ++k) {
                            this.addSlotToContainer(new SlotInvArmaArmor(inv, k + j * 9, 69, 38));
                            }
                            }
                            
                            for (j = 0; j < 9; ++j) {
                            this.addSlotToContainer(new Slot(playerInv, j, 8 + j * 18, 161 + i));
                            }
                            }
                            
                            @Override
                            public boolean canInteractWith(EntityPlayer player) {
                            if(player.getHeldItem() != null) {
                                   this.writeToNBT(player.getHeldItem());
                            }
                            return player.getHeldItem() != null && player.getHeldItem().getItem() == AltisMineMod.Water;
                            
                            }
                            
                            public void writeToNBT(ItemStack stack) {
                            if (!stack.hasTagCompound()) stack.setTagCompound(new NBTTagCompound());
                            inv.writeToNBT(stack.getTagCompound());
                            }
                            
                            @Override
                            public ItemStack transferStackInSlot(EntityPlayer player, int index) {
                            ItemStack itemstack = null;
                            Slot slot = (Slot) this.inventorySlots.get(index);
                            
                            if (slot != null && slot.getHasStack()) {
                            ItemStack itemstack1 = slot.getStack();
                            itemstack = itemstack1.copy();
                            
                            if (itemstack.getItem() instanceof Water) return null;
                            
                            if (index < this.inv.getSizeInventory()) {
                            if (!this.mergeItemStack(itemstack1, this.inv.getSizeInventory(), this.inventorySlots.size(), true)) return null;
                            } else if (!this.mergeItemStack(itemstack1, 0, this.inv.getSizeInventory(), false)) { return null; }
                            
                            if (itemstack1.stackSize == 0)
                            slot.putStack((ItemStack) null);
                            else
                            slot.onSlotChanged();
                            }
                            
                            return itemstack;
                            }
                            
                            /**
                            * @param buttonPressed
                            *            left click, right click, wheel click, etc.
                            * @param flag
                            *            category (e.g.: hotbar keys)
                            */
                            @Override
                            public ItemStack slotClick(int slotIndex, int buttonPressed, int flag, EntityPlayer player) {
                            // Prevents from removing current backpack
                            if (flag == 2 && buttonPressed == player.inventory.currentItem) return null;
                            if (slotIndex - this.inv.getSizeInventory() - 27 == player.inventory.currentItem) return null;
                            return super.slotClick(slotIndex, buttonPressed, flag, player);
                            }
                            
                            /**
                            * Used to save content
                            */
                            @Override
                            public void onContainerClosed(EntityPlayer player) {
                            if(player.getHeldItem() != null) {
                                   this.writeToNBT(player.getHeldItem());
                               }
                               super.onContainerClosed(player);
                            }
                            }
                            
                            
                            1 réponse Dernière réponse Répondre Citer 0
                            • GabsG Hors-ligne
                              Gabs
                              dernière édition par

                              Help?

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

                                Pour que ça sauvegarde l’item, il faut faire avec les tags nbt.
                                Et pour le held Item, il faut que tu retires tout ce qui touche ce stack dans ton inv si il est null

                                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
                                • DylemD Hors-ligne
                                  Dylem
                                  dernière édition par

                                  Je suis perplexe par rapport au fait que tu aies une fonction writeToNBT et pas une fonction readFromNBT, si tu veux écrire dans ton autre classe ajoute directement à ta fonction la-bas, crées y une NBTTagList contenant tes slots. Et puis bon, nommer ses variables en français… Je vais pas faire de commentaire là-dessus mais c’est pas terrible.

                                  Si je t'ai aidé, n'hésite pas à cliquer sur le nombre vert en dessous de mon image de profil, pour me le faire savoir. Ca me motive pour continuer …

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

                                    Se que j’ai du mal a comprendre c’est pourquoi quand j’ouvre mon inventaire avec l’item dans les mains et que je déplace un item je crash pas et quand j’ouvre mon inventaire avec une touche toujours avec un item dans les mains et que je veux déplacer un item dans l’inventaire j’ai un java.lang.IndexOutOfBoundsException: Index: 55, Size: 45 .
                                    /!\ Attention lorsque vous manipulez des tableaux. Chercher un élement d’un tableau à un indice inexistant causera un OutOfBoundException.
                                    pourquoi j’ai cette erreur quand j’ouvre l’inventaire avec une touche?

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

                                      Parce que lid du slot est trop élevé, là actuellement tu peux avoir 45 items (donc autant dids) et tu essayes tu mettre un slot avec 45 comme id

                                      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
                                      • GabsG Hors-ligne
                                        Gabs
                                        dernière édition par

                                        Merci maintenant il me manque juste a viré le held item et c’est bon par contre j’ai pas trop suivi je dois procédé comment ?

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

                                          Tu retire tout les trucs de nbt qui sont en rapport avec ce stack dans ton InventaireArma (d’après ce que j’avais vu, ça ne servait à rien)

                                          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
                                          • GabsG Hors-ligne
                                            Gabs
                                            dernière édition par

                                            Yep c’est nickel merci par contre quand je clique sur échap je crash mais le soucis c’est que si j’enlève le nbt sa save pas mon item dans le slot lorsque je quitte le container.

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB