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

    Résolu Four

    1.8.x
    1.8
    5
    10
    1881
    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.
    • Gabs
      Gabs dernière édition par

      Bonsoir,

      Après avoir suivi le tuto sur le forum pour créer un four je suis coincé .

      Je voudrais avoir que un slot en input et 1 slot en output.

      J’ai donc modifier ici dans le tileentity:

      
      public static final int INPUTS_SLOTS = 1;
      public static final int FUEL_SLOTS = 1;
      public static final int OUTPUT_SLOTS = 1;
      
      

      Mais le soucis est que maintenant lorsque je veux ouvrir mon four j’ai un crash:

      [19:26:27] [main/INFO] [GradleStart]: username: floriangabet
      [19:26:27] [main/INFO] [GradleStart]: Extra: []
      [19:26:27] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --username, floriangabet, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
      [19:26:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
      [19:26:27] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading
      [19:26:27] [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
      [19:26:27] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
      [19:26:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
      [19:26:27] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
      [19:26:27] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
      [19:26:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
      [19:26:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
      [19:26:27] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
      [19:26:28] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
      [19:26:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
      [19:26:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
      [19:26:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
      [19:26:28] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
      [19:26:28] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
      [19:26:28] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
      [19:26:28] [Client thread/INFO]: Setting user: floriangabet
      [19:26:29] [Client thread/INFO]: LWJGL Version: 2.9.1
      [19:26:30] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
      [19:26:30] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized
      [19:26:30] [Client thread/INFO] [FML]: Replaced 204 ore recipies
      [19:26:30] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
      [19:26:30] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\CSC\eclipse\mods for mods
      [19:26:30] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
      [19:26:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at CLIENT
      [19:26:30] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at SERVER
      [19:26:31] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
      [19:26:31] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
      [19:26:31] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
      [19:26:31] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
      [19:26:31] [Client thread/INFO] [FML]: Applying holder lookups
      [19:26:31] [Client thread/INFO] [FML]: Holder lookups applied
      [19:26:31] [Sound Library Loader/INFO]: Starting up SoundSystem…
      [19:26:31] [Thread-7/INFO]: Initializing LWJGL OpenAL
      [19:26:31] [Thread-7/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
      [19:26:31] [Thread-7/INFO]: OpenAL initialized.
      [19:26:31] [Sound Library Loader/INFO]: Sound engine started
      [19:26:32] [Client thread/INFO]: Created: 1024x1024 textures-atlas
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_panierlinge#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_coli#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_balai#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#normal not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_medic#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_linge#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_clefm#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#normal not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_menotte#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:item_bfouille#inventory not found
      [19:26:32] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#inventory not found
      [19:26:32] [Client thread/INFO] [STDOUT]: [com.CSC.net.Main:init:71]: 
      [19:26:32] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
      [19:26:32] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
      [19:26:33] [Client thread/INFO]: SoundSystem shutting down…
      [19:26:33] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
      [19:26:33] [Sound Library Loader/INFO]: Starting up SoundSystem…
      [19:26:33] [Thread-9/INFO]: Initializing LWJGL OpenAL
      [19:26:33] [Thread-9/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
      [19:26:33] [Thread-9/INFO]: OpenAL initialized.
      [19:26:33] [Sound Library Loader/INFO]: Sound engine started
      [19:26:34] [Client thread/INFO]: Created: 1024x1024 textures-atlas
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_panierlinge#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_coli#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_balai#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#normal not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_medic#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_linge#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_clefm#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#normal not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_menotte#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:item_bfouille#inventory not found
      [19:26:34] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#inventory not found
      [19:26:35] [Server thread/INFO]: Starting integrated minecraft server version 1.8
      [19:26:35] [Server thread/INFO]: Generating keypair
      [19:26:36] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
      [19:26:36] [Server thread/INFO] [FML]: Applying holder lookups
      [19:26:36] [Server thread/INFO] [FML]: Holder lookups applied
      [19:26:36] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@44130)
      [19:26:36] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@44130)
      [19:26:36] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@44130)
      [19:26:36] [Server thread/INFO]: Preparing start region for level 0
      [19:26:36] [Server thread/INFO] [STDOUT]: [com.CSC.net.Main:onServerStarting:85]: ranksaveload
      [19:26:37] [Server thread/INFO]: Changing view distance to 8, from 10
      [19:26:37] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 1
      [19:26:37] [Netty Server IO #1/INFO] [FML]: Client protocol version 1
      [19:26:37] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : csc@1.0,FML@8.0.37.1334,Forge@11.14.1.1334,mcp@9.05
      [19:26:37] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
      [19:26:37] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
      [19:26:37] [Server thread/INFO]: floriangabet[local:E:c5fa6839] logged in with entity id 326 at (-234.81899715385038, 66.0, 228.41021904200548)
      [19:26:37] [Server thread/INFO]: floriangabet a rejoint la partie
      [19:26:38] [Server thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 3
      java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 3
      at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_45]
      at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_45]
      at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:710) [FMLCommonHandler.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
      at com.CSC.net.block.TileEntityMachineLaver.getStackInSlot(TileEntityMachineLaver.java:99) ~[TileEntityMachineLaver.class:?]
      at net.minecraft.inventory.Slot.getStack(Slot.java:79) ~[Slot.class:?]
      at net.minecraft.inventory.Container.getInventory(Container.java:75) ~[Container.class:?]
      at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:61) ~[Container.class:?]
      at com.CSC.net.GUI.ContainerMachineLaver.addCraftingToCrafters(ContainerMachineLaver.java:92) ~[ContainerMachineLaver.class:?]
      at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:92) ~[FMLNetworkHandler.class:?]
      at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2577) ~[EntityPlayer.class:?]
      at com.CSC.net.block.Blockmachinelaver.onBlockActivated(Blockmachinelaver.java:55) ~[Blockmachinelaver.class:?]
      at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:476) ~[ItemInWorldManager.class:?]
      at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:624) ~[NetHandlerPlayServer.class:?]
      at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:67) ~[C08PacketPlayerBlockPlacement.class:?]
      at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:114) ~[C08PacketPlayerBlockPlacement.class:?]
      at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_45]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_45]
      at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:709) ~[FMLCommonHandler.class:?]
      … 5 more
      [19:26:38] [Server thread/ERROR]: Encountered an unexpected exception
      net.minecraft.util.ReportedException: Ticking entity
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:780) ~[MinecraftServer.class:?]
      at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) ~[MinecraftServer.class:?]
      at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) ~[IntegratedServer.class:?]
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
      at com.CSC.net.block.TileEntityMachineLaver.getStackInSlot(TileEntityMachineLaver.java:99) ~[TileEntityMachineLaver.class:?]
      at net.minecraft.inventory.Slot.getStack(Slot.java:79) ~[Slot.class:?]
      at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:97) ~[Container.class:?]
      at com.CSC.net.GUI.ContainerMachineLaver.detectAndSendChanges(ContainerMachineLaver.java:101) ~[ContainerMachineLaver.class:?]
      at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263) ~[EntityPlayerMP.class:?]
      at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2024) ~[World.class:?]
      at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) ~[WorldServer.class:?]
      at net.minecraft.world.World.updateEntity(World.java:1990) ~[World.class:?]
      at net.minecraft.world.World.updateEntities(World.java:1816) ~[World.class:?]
      at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) ~[WorldServer.class:?]
      at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:774) ~[MinecraftServer.class:?]
      … 4 more
      [19:26:38] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Admin\Desktop\CSC\eclipse\.\crash-reports\crash-2016-09-25_19.26.38-server.txt
      [19:26:38] [Server thread/INFO]: Stopping server
      [19:26:38] [Server thread/INFO]: Saving players
      [19:26:38] [Server thread/INFO]: Saving worlds
      [19:26:38] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
      [19:26:38] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
      [19:26:38] [Server thread/INFO]: Saving chunks for level 'New World'/The End
      [19:26:39] [Server thread/INFO] [FML]: Unloading dimension 0
      [19:26:39] [Server thread/INFO] [FML]: Unloading dimension -1
      [19:26:39] [Server thread/INFO] [FML]: Unloading dimension 1
      [19:26:39] [Server thread/INFO] [FML]: Applying holder lookups
      [19:26:39] [Server thread/INFO] [FML]: Holder lookups applied
      [19:26:39] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
      
      

      Ma classe tileentity:

      
      package com.CSC.net.block;
      
      import net.minecraft.entity.player.EntityPlayer;
      import net.minecraft.init.Items;
      import net.minecraft.inventory.ISidedInventory;
      import net.minecraft.item.ItemStack;
      import net.minecraft.nbt.NBTTagCompound;
      import net.minecraft.nbt.NBTTagList;
      import net.minecraft.network.NetworkManager;
      import net.minecraft.network.Packet;
      import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
      import net.minecraft.server.gui.IUpdatePlayerListBox;
      import net.minecraft.tileentity.TileEntity;
      import net.minecraft.util.ChatComponentText;
      import net.minecraft.util.EnumFacing;
      import net.minecraft.util.IChatComponent;
      import net.minecraftforge.fml.relauncher.Side;
      import net.minecraftforge.fml.relauncher.SideOnly;
      
      public class TileEntityMachineLaver extends TileEntity implements IUpdatePlayerListBox, ISidedInventory
      {
      
      private String customName;
      public static final int INPUTS_SLOTS = 1;
      public static final int FUEL_SLOTS = 1;
      public static final int OUTPUT_SLOTS = 1;
      private ItemStack[] contents = new ItemStack[INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS];
      private int currentWorkingTime = 0;
      private int totalWorkingTime = 300;
      private int remainingFuelTime = 0;
      private int totalCurrentFuelTime;
      
      @Override
      public void readFromNBT(NBTTagCompound compound)
      {
      super.readFromNBT(compound);
      NBTTagList nbttaglist = compound.getTagList("Items", 10);
      this.contents = new ItemStack[this.getSizeInventory()];
      
      for (int i = 0; i < nbttaglist.tagCount(); ++i)
      {
      NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
      byte b0 = nbttagcompound1.getByte("Slot");
      
      if (b0 >= 0 && b0 < this.contents.length)
      {
      this.contents[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
      }
      }
      
      this.currentWorkingTime = compound.getShort("CurrentWorkingTime");
      this.totalWorkingTime = compound.getShort("TotalWorkingTime");
      this.remainingFuelTime = compound.getShort("RemainingFuelTime");
      this.totalCurrentFuelTime = compound.getShort("TotalCurrentFuelTime");
      
      if (compound.hasKey("CustomName", 8))
      {
      this.customName = compound.getString("CustomName");
      }
      }
      
      @Override
      public void writeToNBT(NBTTagCompound compound)
      {
      super.writeToNBT(compound);
      
      compound.setShort("CurrentWorkingTime", (short)this.currentWorkingTime);
      compound.setShort("TotalWorkingTime", (short)this.totalWorkingTime);
      compound.setShort("RemainingFuelTime", (short)this.remainingFuelTime);
      compound.setShort("TotalCurrentFuelTime", (short)this.totalCurrentFuelTime);
      
      NBTTagList nbttaglist = new NBTTagList();
      
      for (int i = 0; i < this.contents.length; ++i)
      {
      if (this.contents* != null)
      {
      NBTTagCompound nbttagcompound1 = new NBTTagCompound();
      nbttagcompound1.setByte("Slot", (byte)i);
      this.contents*.writeToNBT(nbttagcompound1);
      nbttaglist.appendTag(nbttagcompound1);
      }
      }
      
      compound.setTag("Items", nbttaglist);
      
      if (this.hasCustomName())
      {
      compound.setString("CustomName", this.customName);
      }
      }
      
      @Override
      public int getSizeInventory() {
      return this.contents.length;
      }
      @Override
      public ItemStack getStackInSlot(int index) {
      return this.contents[index];
      }
      
      @Override
      public ItemStack decrStackSize(int index, int count) {
      if (this.contents[index] != null)
      {
      ItemStack itemstack;
      
      if (this.contents[index].stackSize <= count)
      {
      itemstack = this.contents[index];
      this.contents[index] = null;
      this.markDirty();
      return itemstack;
      }
      else
      {
      itemstack = this.contents[index].splitStack(count);
      
      if (this.contents[index].stackSize == 0)
      {
      this.contents[index] = null;
      }
      this.markDirty();
      return itemstack;
      }
      }
      else
      {
      return null;
      }
      }
      
      @Override
      public ItemStack getStackInSlotOnClosing(int index) 
      {
      if (this.contents[index] != null)
      {
      ItemStack itemstack = this.contents[index];
      this.contents[index] = null;
      return itemstack;
      }
      else
      {
      return null;
      }
      }
      
      @Override
      public void setInventorySlotContents(int index, ItemStack stack) 
      {
      this.contents[index] = stack;
      if(stack != null && stack.stackSize > this.getInventoryStackLimit())
      {
      stack.stackSize = this.getInventoryStackLimit();
      }
      }
      @Override
      public int getInventoryStackLimit() {
      return 64;
      }
      @Override
      public boolean isUseableByPlayer(EntityPlayer player)  {
      return this.worldObj.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
      }
      @Override
      public void openInventory(EntityPlayer player) {}
      
      @Override
      public void closeInventory(EntityPlayer player) {}
      
      @Override
      public boolean isItemValidForSlot(int index, ItemStack stack) {
      return index >= INPUTS_SLOTS + FUEL_SLOTS ? false : index >= INPUTS_SLOTS && !this.isFuel(stack) ? false : true;
      }
      @Override
      public int getField(int id) {
      switch(id)
      {
      case 0:
      return this.currentWorkingTime;
      case 1:
      return this.totalWorkingTime;
      case 2:
      return this.remainingFuelTime;
      case 3:
      return this.totalCurrentFuelTime;
      default:
      return 0;
      }
      }
      
      @Override
      public void setField(int id, int value) {
      switch(id)
      {
      case 0:
      this.currentWorkingTime = value;
      break;
      case 1:
      this.totalWorkingTime = value;
      break;
      case 2:
      this.remainingFuelTime = value;
      break;
      case 3:
      this.totalCurrentFuelTime = value;
      }
      }
      
      @Override
      public int getFieldCount() {
      return 3;
      }
      @Override
      public void clear() {
      for(int i = 0; i < this.contents.length; i++)
      {
      this.contents* = null;
      }
      }
      @Override
      public String getName() {
      return this.hasCustomName() ? this.customName : "machine.laver";
      }
      
      @Override
      public boolean hasCustomName() {
      return this.customName != null && this.customName.length() > 0;
      }
      
      public void setCustomInventoryName(String name)
      {
      this.customName = name;
      }
      
      @Override
      public IChatComponent getDisplayName() {
      return new ChatComponentText(this.getName());
      }
      @Override
      public int[] getSlotsForFace(EnumFacing side) {
      if(side == EnumFacing.UP) return this.getInputSlotsIds();
      if(side == EnumFacing.DOWN) return this.getOutputSlotsIds();
      return this.getFuelSlotsIds();
      }
      @Override
      public boolean canInsertItem(int index, ItemStack stack, EnumFacing direction) 
      {
      return this.isItemValidForSlot(index, stack);
      }
      @Override
      public boolean canExtractItem(int index, ItemStack stack, EnumFacing direction) {
      for(int id : this.getOutputSlotsIds())
      {
      if(id == index) return true;
      }
      return false;
      }
      @Override
      public void update() 
      {
      if(this.isRemainingFuel()) {
      –this.remainingFuelTime;
      }
      if(this.isWorking() && this.canWork()) {
      ++this.currentWorkingTime;
      }
      if(!this.isWorking() && this.canWork()) {
      this.currentWorkingTime = 1;
      }
      if(this.canWork() && this.currentWorkingTime >= this.totalWorkingTime) {
      this.applyRecipe();
      this.currentWorkingTime = 0;
      }
      if(!this.canWork()) {
      this.currentWorkingTime = 0;
      }
      this.markDirty();
      }
      
      private boolean isFuel(ItemStack stack) {
      return stack == null ? false : stack.getItem() == Items.blaze_powder;
      }
      
      private int[] getInputSlotsIds() {
      int[] ids = new int[INPUTS_SLOTS];
      for(int i = 0; i < INPUTS_SLOTS; i++)
      {
      ids* = i;
      }
      return ids;
      }
      
      private int[] getFuelSlotsIds() {
      int[] ids = new int[FUEL_SLOTS];
      int k = 0;
      for(int i = INPUTS_SLOTS; i < (INPUTS_SLOTS + FUEL_SLOTS); i++)
      {
      ids[k] = i;
      k++;
      }
      return ids;
      }
      
      private int[] getOutputSlotsIds() {
      int[] ids = new int[OUTPUT_SLOTS];
      int k = 0;
      for(int i = (INPUTS_SLOTS + FUEL_SLOTS); i < (INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS); i++)
      {
      ids[k] = i;
      k++;
      }
      return ids;
      }
      
      private ItemStack[] getInputSlotsContents() {
      ItemStack[] s = new ItemStack[INPUTS_SLOTS];
      for(int i = 0; i < INPUTS_SLOTS; i++)
      {
      s* = this.getStackInSlot(i);
      }
      return s;
      }
      
      private ItemStack[] getOutputSlotsContents() {
      ItemStack[] s = new ItemStack[OUTPUT_SLOTS];
      int k = 0;
      for(int i = (INPUTS_SLOTS + FUEL_SLOTS); i < (INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS); i++)
      {
      s[k] = this.getStackInSlot(i);
      k++;
      }
      return s;
      }
      
      public boolean isWorking() {
      return this.currentWorkingTime > 0;
      }
      
      private boolean hasNullInput() {
      for(int i = 0; i < INPUTS_SLOTS; i++)
      {
      if(this.getStackInSlot(i) == null) return true;
      }
      return false;
      }
      
      private boolean areOutputsNull() {
      for(int i = (INPUTS_SLOTS + FUEL_SLOTS); i < (INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS); i++)
      {
      if(this.getStackInSlot(i) != null) return false;
      }
      return true;
      }
      
      private boolean canCombineStacks(ItemStack[] stack1, ItemStack[] stack2) {
      if(stack1.length != stack2.length) return false;
      for(int i = 0; i < stack1.length; i++)
      {
      if(!this.canCombineItems(stack1*, stack2*))
      {
      return false;
      }
      }
      return true;
      }
      
      private boolean canCombineItems(ItemStack item1, ItemStack item2) {
      if (item1 == null) return true; 
      if (!item1.isItemEqual(item2)) return false; 
      int result = item1.stackSize + item2.stackSize;
      return result <= getInventoryStackLimit() && result <= item1.getMaxStackSize(); 
      }
      
      private boolean outOfFuel() {
      if(!this.isRemainingFuel()) {
      for(int i = INPUTS_SLOTS; i < (INPUTS_SLOTS + FUEL_SLOTS); i++) {
      if(this.getStackInSlot(i) != null) {
      int duration = RecipesMachineLaver.instance().getFuelDuration(this.getStackInSlot(i));
      if(duration > 0) {
      this.remainingFuelTime += duration;
      this.totalCurrentFuelTime = duration;
      this.decrStackSize(i, 1);
      }
      }
      }
      }
      this.markDirty();
      return !this.isRemainingFuel();
      }
      
      public boolean isRemainingFuel() {
      return this.remainingFuelTime > 0;
      }
      
      private boolean canWork() {
      if(this.hasNullInput()) {
      return false;
      }
      ItemStack[] itemstacks = RecipesMachineLaver.instance().getRecipeResult(this.getInputSlotsContents());
      if (itemstacks == null) {
      return false; 
      }
      if(this.outOfFuel()) return false;
      if (this.areOutputsNull()) return true; 
      if (!this.canCombineStacks(this.getOutputSlotsContents(), itemstacks)) return false; 
      return true; 
      }
      
      private void applyRecipe() {
      ItemStack[] itemstacks = RecipesMachineLaver.instance().getRecipeResult(this.getInputSlotsContents());
      if(this.areOutputsNull()) {
      int k = 0;
      for(int i = (INPUTS_SLOTS + FUEL_SLOTS); i < (INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS); i++) {
      this.setInventorySlotContents(i, itemstacks[k].copy());
      k++;
      }
      }
      else {
      int k = 0;
      for(int i = (INPUTS_SLOTS + FUEL_SLOTS); i < (INPUTS_SLOTS + FUEL_SLOTS + OUTPUT_SLOTS); i++) {
      if(this.getStackInSlot(i) != null && itemstacks[k] != null) {
      this.getStackInSlot(i).stackSize += itemstacks[k].copy().stackSize;
      }
      else if(this.getStackInSlot(i) == null) {
      this.setInventorySlotContents(i, itemstacks[k].copy());;
      }
      k++;
      }
      }
      for(int i = 0; i < INPUTS_SLOTS; i++) {
      this.decrStackSize(i, 1);
      }
      this.markDirty();
      }
      
      @Override
      public Packet getDescriptionPacket() {
      NBTTagCompound nbttagcompound = new NBTTagCompound();
      this.writeToNBT(nbttagcompound);
      return new S35PacketUpdateTileEntity(this.getPos(), this.getBlockMetadata(), nbttagcompound);
      }
      
      @Override
      public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
      this.readFromNBT(pkt.getNbtCompound());
      this.worldObj.markBlockRangeForRenderUpdate(this.pos, this.pos);
      }
      
      @SideOnly(Side.CLIENT)
      public int getRecipeProgress() {
      return this.currentWorkingTime * 17 / this.totalWorkingTime;
      }
      
      @SideOnly(Side.CLIENT)
      public int getFuelProgress()
      {
      return this.remainingFuelTime * 20 / this.totalCurrentFuelTime;
      }
      
      }
      
      

      Merci 🙂

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

        Le problème est dans ton Container, montres-le.

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

          Tien:

          
          package com.CSC.net.GUI;
          
          import net.minecraft.entity.player.EntityPlayer;
          import net.minecraft.entity.player.InventoryPlayer;
          import net.minecraft.inventory.Container;
          import net.minecraft.inventory.ICrafting;
          import net.minecraft.inventory.Slot;
          import net.minecraft.item.ItemStack;
          import net.minecraftforge.fml.relauncher.Side;
          import net.minecraftforge.fml.relauncher.SideOnly;
          
          import com.CSC.net.block.TileEntityMachineLaver;
          
          public class ContainerMachineLaver extends Container {
          
          private TileEntityMachineLaver tile;
          private int currentWorkingTime;
          private int totalWorkingTime;
          private int remainingFuelTime;
          
          public ContainerMachineLaver(TileEntityMachineLaver tile, InventoryPlayer inventory) {
          this.tile = tile;
          
          //INPUTS
          this.addSlotToContainer(new Slot(tile, 0, 21, 0));
          this.addSlotToContainer(new Slot(tile, 1, 45, 0));
          this.addSlotToContainer(new Slot(tile, 2, 69, 0));
          this.addSlotToContainer(new Slot(tile, 3, 93, 0));
          
          //FUEL
          this.addSlotToContainer(new Slot(tile, 4, 21, 34));
          
          //OUTPUTS
          this.addSlotToContainer(new SlotOutput(tile, 5, 149, 0));
          this.addSlotToContainer(new SlotOutput(tile, 6, 149, 25));
          
          this.bindPlayerInventory(inventory);
          }
          
          private void bindPlayerInventory(InventoryPlayer inventory) {
          int i;
          int j;
          for (i = 0; i < 3; ++i) {
          for (j = 0; j < 9; ++j) {
          this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 12));
          }
          }
          
          for (i = 0; i < 9; ++i) {
          this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142 + 12));
          }
          }
          
          @Override
          public ItemStack transferStackInSlot(EntityPlayer player, int quantity) {
          ItemStack itemstack = null;
          Slot slot = (Slot)this.inventorySlots.get(quantity);
          if (slot != null && slot.getHasStack()) {
          ItemStack itemstack1 = slot.getStack();
          itemstack = itemstack1.copy();
          if (quantity < this.tile.getSizeInventory()) {
          if (!this.mergeItemStack(itemstack1, this.tile.getSizeInventory(), this.inventorySlots.size(), true)) {
          return null;
          }
          }
          else if (!this.mergeItemStack(itemstack1, 0, this.tile.getSizeInventory(), false)) {
          return null;
          }
          if (itemstack1.stackSize == 0) {
          slot.putStack((ItemStack)null);
          }
          else {
          slot.onSlotChanged();
          }
          }
          return itemstack;
          }
          
          @Override
          public boolean canInteractWith(EntityPlayer player) {
          return this.tile.isUseableByPlayer(player);
          }
          
          @Override
          public void onContainerClosed(EntityPlayer player) {
          super.onContainerClosed(player);
          this.tile.closeInventory(player);
          }
          
          @Override
          public void addCraftingToCrafters(ICrafting crafting) {
          super.addCraftingToCrafters(crafting);
          for(int i = 0; i < this.tile.getFieldCount(); i++) {
          crafting.sendProgressBarUpdate(this, i, this.tile.getField(i));
          }
          crafting.func_175173_a(this, this.tile);
          }
          
          @Override
          public void detectAndSendChanges() {
          super.detectAndSendChanges();
          for(int i = 0; i < this.crafters.size(); ++i) {
          ICrafting icrafting = (ICrafting)this.crafters.get(i);
          for(int j = 0; j < this.tile.getFieldCount(); j++) {
          if(this.getField(j) != this.tile.getField(j)) {
          icrafting.sendProgressBarUpdate(this, j, this.tile.getField(j));
          }
          }
          }
          for(int i = 0; i < this.tile.getFieldCount(); i++) {
          this.setField(i, this.tile.getField(i));
          }
          }
          
          @Override
          @SideOnly(Side.CLIENT)
          public void updateProgressBar(int id, int value) {
          this.tile.setField(id, value);
          }
          
          private int getField(int id) {
          switch(id) {
          case 0:
          return this.currentWorkingTime;
          case 1:
          return this.totalWorkingTime;
          case 2:
          return this.remainingFuelTime;
          default:
          return 0;
          }
          }
          
          private void setField(int id, int value) {
          switch(id) {
          case 0:
          this.currentWorkingTime = value;
          break;
          case 1:
          this.totalWorkingTime = value;
          break;
          case 2:
          this.remainingFuelTime = value;
          }
          }
          
          }
          
          
          1 réponse Dernière réponse Répondre Citer 0
          • SCAREX
            SCAREX dernière édition par

            Dans ton container tu dis que tu as 5 entrées et 2 sorties, mais dans ta tileEntity, tu as 2 entrées et une sortie

            Site web contenant mes scripts : http://SCAREXgaming.github.io

            Pas de demandes de support par MP ni par skype SVP.
            Je n'accepte sur skype que l…

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

              @‘SCAREX’:

              Dans ton container tu dis que tu as 5 entrées et 2 sorties, mais dans ta tileEntity, tu as 2 entrées et une sortie

              Ah bon, ou ça exactement ?

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

                ligne 25 à 36.

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

                  @‘SCAREX’:

                  Dans ton container tu dis que tu as 5 entrées et 2 sorties, mais dans ta tileEntity, tu as 2 entrées et une sortie

                  Tu voulais pas plutôt dire 4 entrée et 2 sorties dans le container et 1 entrées et une sortie dans le tile ?

                  car même quand j’enlève les slots dans le container j’ai toujours le arrayindexoutofboundsExecption.

                  C’est peut-être pas le même crash donc tenez:

                  
                  [13:30:01] [main/INFO] [GradleStart]: username: floriangabet
                  [13:30:01] [main/INFO] [GradleStart]: Extra: []
                  [13:30:01] [main/INFO] [GradleStart]: Running with arguments: [–userProperties, {}, --assetsDir, C:/Users/Admin/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --username, floriangabet, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                  [13:30:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
                  [13:30:02] [main/INFO] [FML]: Forge Mod Loader version 8.0.37.1334 for Minecraft 1.8 loading
                  [13:30:02] [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
                  [13:30:02] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                  [13:30:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
                  [13:30:02] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                  [13:30:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
                  [13:30:02] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                  [13:30:02] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
                  [13:30:02] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
                  [13:30:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                  [13:30:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
                  [13:30:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
                  [13:30:03] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                  [13:30:03] [Client thread/INFO]: Setting user: floriangabet
                  [13:30:04] [Client thread/INFO]: LWJGL Version: 2.9.1
                  [13:30:04] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                  [13:30:04] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1334 Initialized
                  [13:30:04] [Client thread/INFO] [FML]: Replaced 204 ore recipies
                  [13:30:04] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                  [13:30:04] [Client thread/INFO] [FML]: Searching C:\Users\Admin\Desktop\CSC\eclipse\mods for mods
                  [13:30:05] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                  [13:30:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at CLIENT
                  [13:30:05] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, csc] at SERVER
                  [13:30:05] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
                  [13:30:05] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                  [13:30:05] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
                  [13:30:05] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                  [13:30:05] [Client thread/INFO] [FML]: Applying holder lookups
                  [13:30:05] [Client thread/INFO] [FML]: Holder lookups applied
                  [13:30:05] [Sound Library Loader/INFO]: Starting up SoundSystem…
                  [13:30:06] [Thread-6/INFO]: Initializing LWJGL OpenAL
                  [13:30:06] [Thread-6/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                  [13:30:06] [Thread-6/INFO]: OpenAL initialized.
                  [13:30:06] [Sound Library Loader/INFO]: Sound engine started
                  [13:30:07] [Client thread/INFO]: Created: 2048x1024 textures-atlas
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_panierlinge#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_clefm#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_coli#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_balai#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#normal not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#normal not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_medic#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#inventory not found
                  [13:30:07] [Client thread/ERROR] [FML]: Model definition for location csc:item_linge#inventory not found
                  [13:30:07] [Client thread/INFO] [STDOUT]: [com.CSC.net.Main:init:71]: 
                  [13:30:07] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
                  [13:30:07] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Cite Sous Controle
                  [13:30:07] [Client thread/INFO]: SoundSystem shutting down…
                  [13:30:07] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
                  [13:30:07] [Sound Library Loader/INFO]: Starting up SoundSystem…
                  [13:30:08] [Thread-8/INFO]: Initializing LWJGL OpenAL
                  [13:30:08] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                  [13:30:08] [Thread-8/INFO]: OpenAL initialized.
                  [13:30:08] [Sound Library Loader/INFO]: Sound engine started
                  [13:30:09] [Client thread/INFO]: Created: 2048x1024 textures-atlas
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_belier#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_batonP#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_panierlinge#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_clefm#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_coli#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_balai#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:block_machinelaver#normal not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#normal not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_medic#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:block_block1#inventory not found
                  [13:30:09] [Client thread/ERROR] [FML]: Model definition for location csc:item_linge#inventory not found
                  [13:30:11] [Server thread/INFO]: Starting integrated minecraft server version 1.8
                  [13:30:11] [Server thread/INFO]: Generating keypair
                  [13:30:11] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
                  [13:30:11] [Server thread/INFO] [FML]: Applying holder lookups
                  [13:30:11] [Server thread/INFO] [FML]: Holder lookups applied
                  [13:30:11] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@16065ec)
                  [13:30:11] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@16065ec)
                  [13:30:11] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@16065ec)
                  [13:30:11] [Server thread/INFO]: Preparing start region for level 0
                  [13:30:12] [Server thread/INFO] [STDOUT]: [com.CSC.net.Main:onServerStarting:85]: ranksaveload
                  [13:30:12] [Server thread/INFO]: Changing view distance to 8, from 10
                  [13:30:13] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 1
                  [13:30:13] [Netty Server IO #1/INFO] [FML]: Client protocol version 1
                  [13:30:13] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 4 mods : csc@1.0,FML@8.0.37.1334,Forge@11.14.1.1334,mcp@9.05
                  [13:30:13] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
                  [13:30:13] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
                  [13:30:13] [Server thread/INFO]: floriangabet[local:E:1768b6d1] logged in with entity id 327 at (-233.42264533304527, 66.0, 232.65042769983205)
                  [13:30:13] [Server thread/INFO]: floriangabet a rejoint la partie
                  [13:30:14] [Server thread/FATAL] [FML]: Exception caught executing FutureTask: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 4
                  java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 4
                  at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_45]
                  at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_45]
                  at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:710) [FMLCommonHandler.class:?]
                  at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726) [MinecraftServer.class:?]
                  at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) [MinecraftServer.class:?]
                  at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) [IntegratedServer.class:?]
                  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
                  at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
                  Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
                  at com.CSC.net.block.TileEntityMachineLaver.getStackInSlot(TileEntityMachineLaver.java:99) ~[TileEntityMachineLaver.class:?]
                  at net.minecraft.inventory.Slot.getStack(Slot.java:79) ~[Slot.class:?]
                  at net.minecraft.inventory.Container.getInventory(Container.java:75) ~[Container.class:?]
                  at net.minecraft.inventory.Container.addCraftingToCrafters(Container.java:61) ~[Container.class:?]
                  at com.CSC.net.GUI.ContainerMachineLaver.addCraftingToCrafters(ContainerMachineLaver.java:88) ~[ContainerMachineLaver.class:?]
                  at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:92) ~[FMLNetworkHandler.class:?]
                  at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2577) ~[EntityPlayer.class:?]
                  at com.CSC.net.block.Blockmachinelaver.onBlockActivated(Blockmachinelaver.java:55) ~[Blockmachinelaver.class:?]
                  at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:476) ~[ItemInWorldManager.class:?]
                  at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:624) ~[NetHandlerPlayServer.class:?]
                  at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:67) ~[C08PacketPlayerBlockPlacement.class:?]
                  at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:114) ~[C08PacketPlayerBlockPlacement.class:?]
                  at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
                  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_45]
                  at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_45]
                  at net.minecraftforge.fml.common.FMLCommonHandler.callFuture(FMLCommonHandler.java:709) ~[FMLCommonHandler.class:?]
                  … 5 more
                  [13:30:14] [Server thread/ERROR]: Encountered an unexpected exception
                  net.minecraft.util.ReportedException: Ticking entity
                  at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:780) ~[MinecraftServer.class:?]
                  at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:669) ~[MinecraftServer.class:?]
                  at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:171) ~[IntegratedServer.class:?]
                  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540) [MinecraftServer.class:?]
                  at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
                  Caused by: java.lang.ArrayIndexOutOfBoundsException: 4
                  at com.CSC.net.block.TileEntityMachineLaver.getStackInSlot(TileEntityMachineLaver.java:99) ~[TileEntityMachineLaver.class:?]
                  at net.minecraft.inventory.Slot.getStack(Slot.java:79) ~[Slot.class:?]
                  at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:97) ~[Container.class:?]
                  at com.CSC.net.GUI.ContainerMachineLaver.detectAndSendChanges(ContainerMachineLaver.java:97) ~[ContainerMachineLaver.class:?]
                  at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263) ~[EntityPlayerMP.class:?]
                  at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2024) ~[World.class:?]
                  at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:758) ~[WorldServer.class:?]
                  at net.minecraft.world.World.updateEntity(World.java:1990) ~[World.class:?]
                  at net.minecraft.world.World.updateEntities(World.java:1816) ~[World.class:?]
                  at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:587) ~[WorldServer.class:?]
                  at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:774) ~[MinecraftServer.class:?]
                  … 4 more
                  [13:30:14] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Admin\Desktop\CSC\eclipse\.\crash-reports\crash-2016-09-26_13.30.14-server.txt
                  [13:30:14] [Server thread/INFO]: Stopping server
                  [13:30:14] [Server thread/INFO]: Saving players
                  [13:30:14] [Server thread/INFO]: Saving worlds
                  [13:30:14] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
                  [13:30:14] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
                  [13:30:14] [Server thread/INFO]: Saving chunks for level 'New World'/The End
                  [13:30:14] [Server thread/INFO] [FML]: Unloading dimension 0
                  [13:30:14] [Server thread/INFO] [FML]: Unloading dimension -1
                  [13:30:14] [Server thread/INFO] [FML]: Unloading dimension 1
                  [13:30:14] [Server thread/INFO] [FML]: Applying holder lookups
                  [13:30:14] [Server thread/INFO] [FML]: Holder lookups applied
                  [13:30:14] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
                  
                  

                  ma classe:

                  package com.CSC.net.GUI;
                  
                  import net.minecraft.entity.player.EntityPlayer;
                  import net.minecraft.entity.player.InventoryPlayer;
                  import net.minecraft.inventory.Container;
                  import net.minecraft.inventory.ICrafting;
                  import net.minecraft.inventory.Slot;
                  import net.minecraft.item.ItemStack;
                  import net.minecraftforge.fml.relauncher.Side;
                  import net.minecraftforge.fml.relauncher.SideOnly;
                  
                  import com.CSC.net.block.TileEntityMachineLaver;
                  
                  public class ContainerMachineLaver extends Container {
                  
                  private TileEntityMachineLaver tile;
                  private int currentWorkingTime;
                  private int totalWorkingTime;
                  private int remainingFuelTime;
                  
                  public ContainerMachineLaver(TileEntityMachineLaver tile, InventoryPlayer inventory) {
                  this.tile = tile;
                  
                  //INPUTS
                  this.addSlotToContainer(new Slot(tile, 0, 21, 0));
                  
                  //FUEL
                  this.addSlotToContainer(new Slot(tile, 4, 21, 34));
                  
                  //OUTPUTS
                  this.addSlotToContainer(new SlotOutput(tile, 5, 149, 0));
                  
                  this.bindPlayerInventory(inventory);
                  }
                  
                  private void bindPlayerInventory(InventoryPlayer inventory) {
                  int i;
                  int j;
                  for (i = 0; i < 3; ++i) {
                  for (j = 0; j < 9; ++j) {
                  this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 12));
                  }
                  }
                  
                  for (i = 0; i < 9; ++i) {
                  this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 142 + 12));
                  }
                  }
                  
                  @Override
                  public ItemStack transferStackInSlot(EntityPlayer player, int quantity) {
                  ItemStack itemstack = null;
                  Slot slot = (Slot)this.inventorySlots.get(quantity);
                  if (slot != null && slot.getHasStack()) {
                  ItemStack itemstack1 = slot.getStack();
                  itemstack = itemstack1.copy();
                  if (quantity < this.tile.getSizeInventory()) {
                  if (!this.mergeItemStack(itemstack1, this.tile.getSizeInventory(), this.inventorySlots.size(), true)) {
                  return null;
                  }
                  }
                  else if (!this.mergeItemStack(itemstack1, 0, this.tile.getSizeInventory(), false)) {
                  return null;
                  }
                  if (itemstack1.stackSize == 0) {
                  slot.putStack((ItemStack)null);
                  }
                  else {
                  slot.onSlotChanged();
                  }
                  }
                  return itemstack;
                  }
                  
                  @Override
                  public boolean canInteractWith(EntityPlayer player) {
                  return this.tile.isUseableByPlayer(player);
                  }
                  
                  @Override
                  public void onContainerClosed(EntityPlayer player) {
                  super.onContainerClosed(player);
                  this.tile.closeInventory(player);
                  }
                  
                  @Override
                  public void addCraftingToCrafters(ICrafting crafting) {
                  super.addCraftingToCrafters(crafting);
                  for(int i = 0; i < this.tile.getFieldCount(); i++) {
                  crafting.sendProgressBarUpdate(this, i, this.tile.getField(i));
                  }
                  crafting.func_175173_a(this, this.tile);
                  }
                  
                  @Override
                  public void detectAndSendChanges() {
                  super.detectAndSendChanges();
                  for(int i = 0; i < this.crafters.size(); ++i) {
                  ICrafting icrafting = (ICrafting)this.crafters.get(i);
                  for(int j = 0; j < this.tile.getFieldCount(); j++) {
                  if(this.getField(j) != this.tile.getField(j)) {
                  icrafting.sendProgressBarUpdate(this, j, this.tile.getField(j));
                  }
                  }
                  }
                  for(int i = 0; i < this.tile.getFieldCount(); i++) {
                  this.setField(i, this.tile.getField(i));
                  }
                  }
                  
                  @Override
                  @SideOnly(Side.CLIENT)
                  public void updateProgressBar(int id, int value) {
                  this.tile.setField(id, value);
                  }
                  
                  private int getField(int id) {
                  switch(id) {
                  case 0:
                  return this.currentWorkingTime;
                  case 1:
                  return this.totalWorkingTime;
                  case 2:
                  return this.remainingFuelTime;
                  default:
                  return 0;
                  }
                  }
                  
                  private void setField(int id, int value) {
                  switch(id) {
                  case 0:
                  this.currentWorkingTime = value;
                  break;
                  case 1:
                  this.totalWorkingTime = value;
                  break;
                  case 2:
                  this.remainingFuelTime = value;
                  }
                  }
                  
                  }
                  
                  
                  1 réponse Dernière réponse Répondre Citer 0
                  • Gabs
                    Gabs dernière édition par

                    Quelqu’un?

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

                      Tu dois rechanger les IDs de tes slots dans le container, là tu as 0, 4 et 5, or tu devrais avoir 0, 1 et 2.

                      1 réponse Dernière réponse Répondre Citer 1
                      • Gabs
                        Gabs dernière édition par

                        @‘Reden’:

                        Tu dois rechanger les IDs de tes slots dans le container, là tu as 0, 4 et 5, or tu devrais avoir 0, 1 et 2.

                        Ah oui je pensais pas que c’était pour ça, merci 🙂

                        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