MFF

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

    Ajouter un gui et un container à un bloc

    Planifier Épinglé Verrouillé Déplacé Les interfaces (GUI) et les container
    1.7.x
    129 Messages 21 Publieurs 31.6k Vues 8 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.
    • applygamerA Hors-ligne
      applygamer
      dernière édition par applygamer

      Ce message a été supprimé !
      1 réponse Dernière réponse Répondre Citer 0
      • BinaireB Hors-ligne
        Binaire @robin4002
        dernière édition par

        @robin4002 Salut j’ai un énorme problème et je crois que ça vient des métadata… A chaque fois que je place mon block mon jeu se ferme… Mais si je le redémarre et que je fait in rightClick sur mon block sauvegardé, mon Gui apparait et je peux intéragir avec. Help please !

        1 réponse Dernière réponse Répondre Citer 0
        • BinaireB Hors-ligne
          Binaire @robin4002
          dernière édition par robin4002

          @robin4002 Ma classe principale :

          package fr.minecraft.reality.common;
          
          import cpw.mods.fml.common.Mod;
          import cpw.mods.fml.common.Mod.EventHandler;
          import cpw.mods.fml.common.Mod.Instance;
          import cpw.mods.fml.common.SidedProxy;
          import cpw.mods.fml.common.event.FMLInitializationEvent;
          import cpw.mods.fml.common.event.FMLPostInitializationEvent;
          import cpw.mods.fml.common.event.FMLPreInitializationEvent;
          import cpw.mods.fml.common.network.NetworkRegistry;
          import cpw.mods.fml.common.registry.GameRegistry;
          import cpw.mods.fml.relauncher.Side;
          import cpw.mods.fml.relauncher.SideOnly;
          import fr.minecraft.reality.proxy.CommonProxy;
          import net.minecraft.block.Block;
          import net.minecraft.block.material.Material;
          import net.minecraft.creativetab.CreativeTabs;
          import net.minecraft.item.Item;
          import net.minecraft.item.ItemArmor.ArmorMaterial;
          import net.minecraftforge.common.util.EnumHelper;
          
          @Mod(modid = ModReality.MODID, name = "Mod Reality", version = "1.0.0")
          
          public class ModReality
          {
          	public static final String MODID = "modreality";
          	@Instance(MODID)
          	public static ModReality instance;
          	
          	@SidedProxy(clientSide = "fr.minecraft.reality.proxy.ClientProxy", serverSide = "fr.minecraft.reality.proxy.CommonProxy")
          	public static CommonProxy proxy;
          	
          	//blocks
          	public static Block plastic;
          	public static Block compacted_plastic;
          	public static Block craftingTable5x5;
          	public static Block decomposeurChimique;
          	public static Block petrolFurnace;
          	
          	//items
          	
          	//lingots
          	public static Item plasticIngot;
          	public static Item silverIngot;
          	
          	//armures
          	public static Item silverHelmet;
          	public static Item silverChestPlate; 
          	public static Item silverLeggins; 
          	public static Item silverBoots; 
          
          	
          	//atomes
          	public static Item atome_hydrogene;
          	public static Item atome_helium;
          	public static Item atome_lithium;
          	public static Item atome_beryllium;
          	public static Item atome_bore;
          	public static Item atome_carbone;
          	public static Item atome_azote;
          	public static Item atome_oxygene;
          	public static Item atome_fluor;
          	public static Item atome_neon;
          	public static Item atome_sodium;
          	public static Item atome_magnesium;
          	public static Item atome_aluminium;
          	public static Item atome_silicium;
          	public static Item atome_phosphore;
          	public static Item atome_soufre;
          	public static Item atome_chlore;
          	public static Item atome_argon;
          	
          	//Creatives Tabs
          	public static CreativeTabs tabAtomes = new CreativeTabs("atomes")
          	{
          		@SideOnly(Side.CLIENT)
          		public Item getTabIconItem()
          		{
          			return ModReality.atome_hydrogene;
          		}
          	};
          	public static CreativeTabs tabPlastic = new CreativeTabs("plastic")
          	{
          		@SideOnly(Side.CLIENT)
          		public Item getTabIconItem()
          		{
          			return ModReality.plasticIngot;
          		}
          	};
          
          	public static ArmorMaterial silverArmor = EnumHelper.addArmorMaterial("silverArmor", 13, new int[]{2, 6, 4, 2}, 17);
          	
          	//fonction de pré-initialisation
          	@EventHandler
          	public void preInit(FMLPreInitializationEvent event)
          	{
          		//blocks
          		plastic = new Plastic(Material.rock).setBlockName("plastic").setHardness(1.5F).setResistance(8.0F).setBlockTextureName(MODID + ":plastic").setCreativeTab(tabPlastic);
          		compacted_plastic = new Plastic(Material.rock).setHardness(1.5F).setResistance(11.0F).setBlockName("compacted_plastic").setBlockTextureName(MODID + ":compacted_plastic").setCreativeTab(tabPlastic);
          		decomposeurChimique = new DecomposeurChimique().setHardness(1.5F).setResistance(10.0F).setBlockName("decomposeur_chimique").setBlockTextureName(MODID + ":decomposeur_chimique").setCreativeTab(tabAtomes);
          		craftingTable5x5 = new CraftingTable5x5().setHardness(2.0F).setResistance(5.0F).setBlockName("crafting_table_5x5").setStepSound(Block.soundTypeWood).setCreativeTab(CreativeTabs.tabDecorations);
          		petrolFurnace = new PetrolFurnace().setHardness(3.5F).setStepSound(Block.soundTypePiston).setResistance(9.0F).setBlockName("petrol_furnace").setCreativeTab(CreativeTabs.tabDecorations);
          		
          		//items
          		plasticIngot = new PlasticIngot().setUnlocalizedName("plasticIngot").setTextureName(MODID + ":plastic_ingot").setCreativeTab(tabPlastic);
          		silverIngot = new SilverIngot().setUnlocalizedName("silverIngot").setTextureName(MODID + ":silver_ingot").setCreativeTab(CreativeTabs.tabMaterials);
          		
          		//armures
          		silverHelmet = new ItemSilverArmor(silverArmor, 0).setUnlocalizedName("silverHelmet").setTextureName(MODID + ":silver_helmet");
          		silverChestPlate = new ItemSilverArmor(silverArmor, 1).setUnlocalizedName("silverChestPlate").setTextureName(MODID + ":silver_chestplate");
          		silverLeggins = new ItemSilverArmor(silverArmor, 2).setUnlocalizedName("silverLeggins").setTextureName(MODID + ":silver_leggins");
          		silverBoots = new ItemSilverArmor(silverArmor, 3).setUnlocalizedName("silverBoots").setTextureName(MODID + ":silver_boots");
          
          		//atomes
          		atome_hydrogene = new Item().setUnlocalizedName("atome_hydrogene").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_hydrogene");
          		atome_helium = new Item().setUnlocalizedName("atome_helium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_helium");
          		atome_lithium = new Item().setUnlocalizedName("atome_lithium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_lithium");
          		atome_beryllium = new Item().setUnlocalizedName("atome_beryllium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_beryllium");
          		atome_bore = new Item().setUnlocalizedName("atome_bore").setCreativeTab(ModReality.tabAtomes).setTextureName(MODID + ":atome_bore");
          		atome_carbone = new Item().setUnlocalizedName("atome_carbone").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_carbone");
          		atome_azote = new Item().setUnlocalizedName("atome_azote").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_azote");
          		atome_oxygene = new Item().setUnlocalizedName("atome_oxygene").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_oxygene");
          		atome_fluor = new Item().setUnlocalizedName("atome_fluor").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_fluor");
          		atome_neon = new Item().setUnlocalizedName("atome_neon").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_neon");
          		atome_sodium = new Item().setUnlocalizedName("atome_sodium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_sodium");
          		atome_magnesium = new Item().setUnlocalizedName("atome_magnesium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_magnesium");
          		atome_aluminium = new Item().setUnlocalizedName("atome_aluminium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_aluminium");
          		atome_silicium = new Item().setUnlocalizedName("atome_silicium").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_silicium");
          		atome_phosphore = new Item().setUnlocalizedName("atome_phosphore").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_phosphore");
          		atome_soufre = new Item().setUnlocalizedName("atome_soufre").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_soufre");
          		atome_chlore = new Item().setUnlocalizedName("atome_chlore").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_chlore");
          		atome_argon = new Item().setUnlocalizedName("atome_argon").setCreativeTab(tabAtomes).setTextureName(MODID + ":atome_argon");
          		
          		//enregistrement des blocks
          		GameRegistry.registerBlock(plastic, "plastic");
          		GameRegistry.registerBlock(compacted_plastic, "compacted_plastic");
          		GameRegistry.registerBlock(craftingTable5x5, "craftingTable5x5");
          		GameRegistry.registerBlock(decomposeurChimique, "decomposeurChimique");
          		GameRegistry.registerBlock(petrolFurnace, "petrolFurnace");
          		
          		//enregistrement des items
          		
          		//lingots
          		GameRegistry.registerItem(plasticIngot, "plasticIngot");
          		GameRegistry.registerItem(silverIngot, "silverIngot");
          		
          		//armures
          		GameRegistry.registerItem(silverHelmet, "silver_helmet");
          		GameRegistry.registerItem(silverChestPlate, "silver_chest_plate");
          		GameRegistry.registerItem(silverLeggins, "silver_leggins");
          		GameRegistry.registerItem(silverBoots, "silver_boots");
          		
          		//atomes
          		GameRegistry.registerItem(atome_hydrogene, "atome_hydrogene");
          		GameRegistry.registerItem(atome_helium, "atome_helium");
          		GameRegistry.registerItem(atome_lithium, "atome_lithium");
          		GameRegistry.registerItem(atome_beryllium, "atome_beryllium");
          		GameRegistry.registerItem(atome_bore, "atome_bore");
          		GameRegistry.registerItem(atome_carbone, "atome_carbone");
          		GameRegistry.registerItem(atome_azote, "atome_azote");
          		GameRegistry.registerItem(atome_oxygene, "atome_oxygene");
          		GameRegistry.registerItem(atome_fluor, "atome_fluor");
          		GameRegistry.registerItem(atome_neon, "atome_neon");
          		GameRegistry.registerItem(atome_sodium, "atome_sodium");
          		GameRegistry.registerItem(atome_magnesium, "atome_magnesium");
          		GameRegistry.registerItem(atome_aluminium, "atome_aluminium");
          		GameRegistry.registerItem(atome_silicium, "atome_silicium");
          		GameRegistry.registerItem(atome_phosphore, "atome_phosphore");
          		GameRegistry.registerItem(atome_soufre, "atome_soufre");
          		GameRegistry.registerItem(atome_chlore, "atome_chlore");
          		GameRegistry.registerItem(atome_argon, "atome_argon");
          	}	
          	//fonction d'initialisation
          	@EventHandler
          	public void init(FMLInitializationEvent event)
          	{
          		NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiPetrolFurnace()); 
          		proxy.registerRender();
          	}
          
          	//fonction de post-initialisation
          	@EventHandler
          	public void postInit(FMLPostInitializationEvent event)
          	{
          
          	}
          }
          
          1 réponse Dernière réponse Répondre Citer 0
          • BinaireB Hors-ligne
            Binaire @robin4002
            dernière édition par robin4002

            @robin4002 Mon block :

            package fr.minecraft.reality.common;
            
            import net.minecraft.block.Block;
            import net.minecraft.block.material.Material;
            import net.minecraft.entity.EntityLivingBase;
            import net.minecraft.entity.item.EntityItem;
            import net.minecraft.entity.player.EntityPlayer;
            import net.minecraft.inventory.IInventory;
            import net.minecraft.item.ItemStack;
            import net.minecraft.nbt.NBTTagCompound;
            import net.minecraft.tileentity.TileEntity;
            import net.minecraft.world.World;
            
            public class PetrolFurnace extends Block
            {
            	protected PetrolFurnace()
            	{
            		super(Material.rock);
            	}
            	
                @Override
            
                public TileEntity createTileEntity(World world, int metadata)
            
                {
            
                    return new TileEntityPetrolFurnace();
            
                }
            
                @Override
            
                public boolean hasTileEntity(int metadata)
            
                {
            
                    return true;
            
                }
                
                public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
            
                {
            
                    if(world.isRemote)
            
                    {
            
                        return true;
            
                    }
            
                    else
            
                    {
            
                        player.openGui(ModReality.instance, 0, world, x, y, z);
            
                        return true;
            
                    }
            
                }
            
                public void breakBlock(World world, int x, int y, int z, Block block, int metadata)
            
                {
            
                    TileEntity tileentity = world.getTileEntity(x, y, z);
            
             
            
                    if(tileentity instanceof IInventory)
            
                    {
            
                        IInventory inv = (IInventory)tileentity;
            
                        for(int i1 = 0; i1 < inv.getSizeInventory(); ++i1)
            
                        {
            
                            ItemStack itemstack = inv.getStackInSlot(i1);
            
             
            
                            if(itemstack != null)
            
                            {
            
                                float f = world.rand.nextFloat() * 0.8F + 0.1F;
            
                                float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
            
                                EntityItem entityitem;
            
             
            
                                for(float f2 = world.rand.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))
            
                                {
            
                                    int j1 = world.rand.nextInt(21) + 10;
            
             
            
                                    if(j1 > itemstack.stackSize)
            
                                    {
            
                                        j1 = itemstack.stackSize;
            
                                    }
            
             
            
                                    itemstack.stackSize -= j1;
            
                                    entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
            
                                    float f3 = 0.05F;
            
                                    entityitem.motionX = (double)((float)world.rand.nextGaussian() * f3);
            
                                    entityitem.motionY = (double)((float)world.rand.nextGaussian() * f3 + 0.2F);
            
                                    entityitem.motionZ = (double)((float)world.rand.nextGaussian() * f3);
            
             
            
                                    if(itemstack.hasTagCompound())
            
                                    {
            
                                        entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
            
                                    }
            
                                }
            
                            }
            
                        }
            
                        world.func_147453_f(x, y, z, block);
            
                    }
            
                    super.breakBlock(world, x, y, z, block, metadata);
            
                }
            
                public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
            
                {
            
                	TileEntity tile = world.getTileEntity(x, y, z);
            
                    if(tile instanceof TileEntityPetrolFurnace)
            
                    {
            
                        if(stack.hasDisplayName())
            
                        {
            
                            ((TileEntityPetrolFurnace)tile).setCustomName(stack.getDisplayName());
            
                        }
            
                    }
            
                }
            }
            
            1 réponse Dernière réponse Répondre Citer 0
            • BinaireB Hors-ligne
              Binaire @robin4002
              dernière édition par robin4002

              @robin4002 Mon tileEntity :

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

                @robin4002 Mon Gui :

                package fr.minecraft.reality.common;
                
                import cpw.mods.fml.common.network.IGuiHandler;
                import net.minecraft.entity.player.EntityPlayer;
                import net.minecraft.tileentity.TileEntity;
                import net.minecraft.world.World;
                
                public class GuiPetrolFurnace implements IGuiHandler
                {
                	@Override
                	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
                	{
                
                	    TileEntity tile = world.getTileEntity(x, y, z);
                
                	    if(tile instanceof TileEntityPetrolFurnace)
                
                	    {
                
                	        return new ContainerCupboard((TileEntityPetrolFurnace)tile, player.inventory);
                
                	    }
                
                	    return null;
                	}
                
                	@Override
                	public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
                	{
                        TileEntity tile = world.getTileEntity(x, y, z);
                
                        if(tile instanceof TileEntityPetrolFurnace)
                
                        {
                
                            return new GuiCupboard((TileEntityPetrolFurnace)tile, player.inventory);
                
                        }
                
                        return null;
                	}
                }
                
                1 réponse Dernière réponse Répondre Citer 0
                • BinaireB Hors-ligne
                  Binaire @robin4002
                  dernière édition par robin4002

                  @robin4002 Mon Container :

                  package fr.minecraft.reality.common;
                  
                  import net.minecraft.entity.player.EntityPlayer;
                  import net.minecraft.entity.player.InventoryPlayer;
                  import net.minecraft.inventory.Container;
                  import net.minecraft.inventory.Slot;
                  import net.minecraft.item.ItemStack;
                  
                  public class ContainerCupboard extends Container
                  {
                      private final TileEntityPetrolFurnace tileTuto;
                  
                      public ContainerCupboard(TileEntityPetrolFurnace tile, InventoryPlayer inventory)
                      {
                          this.tileTuto = tile;
                          tile.openInventory();
                  
                          for(int i = 0; i < 3; ++i)
                  
                          {
                  
                              for(int j = 0; j < 9; ++j)
                  
                              {
                  
                                  this.addSlotToContainer(new Slot(tile, j + i * 9, 8 + j * 18, 18 + i * 18));
                  
                              }
                  
                          }
                  
                          this.bindPlayerInventory(inventory);
                      }
                  
                      @Override
                  
                      public boolean canInteractWith(EntityPlayer player)
                      {
                          return this.tileTuto.isUseableByPlayer(player);
                      }
                  
                      private void bindPlayerInventory(InventoryPlayer inventory)
                  
                      {
                  
                          int i;
                  
                          for(i = 0; i < 3; ++i)
                  
                          {
                  
                              for(int j = 0; j < 9; ++j)
                  
                              {
                  
                                  this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 86 + i * 18));
                  
                              }
                  
                          }
                  
                   
                  
                          for(i = 0; i < 9; ++i)
                  
                          {
                  
                              this.addSlotToContainer(new Slot(inventory, i, 8 + i * 18, 144));
                  
                          }
                  
                      }
                  
                      public ItemStack transferStackInSlot(EntityPlayer player, int slotIndex)
                  
                      {
                  
                          ItemStack itemstack = null;
                  
                          Slot slot = (Slot)this.inventorySlots.get(slotIndex);
                  
                   
                  
                          if(slot != null && slot.getHasStack())
                  
                          {
                  
                              ItemStack itemstack1 = slot.getStack();
                  
                              itemstack = itemstack1.copy();
                  
                   
                  
                              if(slotIndex < this.tileTuto.getSizeInventory())
                  
                              {
                  
                                  if(!this.mergeItemStack(itemstack1, this.tileTuto.getSizeInventory(), this.inventorySlots.size(), true))
                  
                                  {
                  
                                      return null;
                  
                                  }
                  
                              }
                  
                              else if(!this.mergeItemStack(itemstack1, 0, this.tileTuto.getSizeInventory(), false))
                  
                              {
                  
                                  return null;
                  
                              }
                  
                   
                  
                              if(itemstack1.stackSize == 0)
                  
                              {
                  
                                  slot.putStack((ItemStack)null);
                  
                              }
                  
                              else
                  
                              {
                  
                                  slot.onSlotChanged();
                  
                              }
                  
                          }
                  
                          return itemstack;
                  
                      }
                  }
                  
                  1 réponse Dernière réponse Répondre Citer 0
                  • BinaireB Hors-ligne
                    Binaire
                    dernière édition par

                    Merci d’avance

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

                      Alors là … Non. Juste non.
                      Il y a rien qui va.

                      Quand le jeu crash, la première chose à faire est envoyer le rapport de crash (la seule chose que tu n’as pas envoyé …). à partir de là je peux te demander les classes utiles.
                      Ensuite pour poster du code on utilise la balise markdown ``` sinon c’est illisible.
                      Et surtout on fait tout rentrer dans un seul post, sinon c’est du spam. Si le code est trop long on passe par pastebin (mais normalement ce n’est pas nécessaire quand on envoie seulement les classes liées au rapport de crash).
                      Enfin on ne mentionne pas 7 fois de suite une personne !!!
                      b9f52a40-7036-46af-b1e0-25216cee8e3f-image.png
                      Non mais sérieusement, tu penses que ça m’amuse d’avoir autant de mention ?

                      Donc tu vas me faire le plaisir de supprimer tout ce merdier et de poster uniquement ton rapport de crash, dans des balises codes.
                      Si ton prochain message ne corrige pas ces problèmes ça sera un ban pur et simple pour un mois, tu reviendras quand tu auras compris comment un forum fonctionne.

                      BinaireB 1 réponse Dernière réponse Répondre Citer 0
                      • isadorI Hors-ligne
                        isador Moddeurs confirmés Modérateurs
                        dernière édition par

                        De plus, ouvre un sujet dans le support pour les moddeurs, ta demande dois aller la bas, ici c’est plus pour des demandes simpliste (pas un message de 3 kilomètres) où pour les précisions sur le tutoriel.

                        1 réponse Dernière réponse Répondre Citer 0
                        • BinaireB Hors-ligne
                          Binaire @robin4002
                          dernière édition par

                          @robin4002 Je suis désolé je suis nouveau sur le forum et assez jeune donc je ne connais pas les règles. J’ai essayé de suivre comment les autres personnes ont posté leur messages. Excuse-moi de t’avoir fais perdre ton temps.

                          BinaireB 1 réponse Dernière réponse Répondre Citer 0
                          • BinaireB Hors-ligne
                            Binaire @Binaire
                            dernière édition par

                            Donc voici mon “rapport de crash”, ne sachant pas ce que c’est, j’ai envoyé le contenu de ma console.

                            [18:30:11] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Eliott/.gradle/caches/minecraft/assets, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
                            [18:30:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                            [18:30:11] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1291 for Minecraft 1.7.10 loading
                            [18:30:11] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.6.0_45, running on Windows 8:amd64:6.2, installed at C:\Program Files\Java\jdk1.6.0_45\jre
                            [18:30:11] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                            [18:30:11] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                            [18:30:11] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                            [18:30:11] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                            [18:30:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                            [18:30:11] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                            [18:30:12] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                            [18:30:13] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                            [18:30:13] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                            [18:30:13] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                            [18:30:13] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                            [18:30:13] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                            [18:30:13] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                            [18:30:13] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                            [18:30:14] [main/INFO]: Setting user: Player140
                            [18:30:15] [Client thread/INFO]: LWJGL Version: 2.9.1
                            [18:30:18] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                            [18:30:18] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1291 Initialized
                            [18:30:18] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                            [18:30:18] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                            [18:30:18] [Client thread/INFO] [FML]: Searching C:\Users\Eliott\Downloads\forge\eclipse\mods for mods
                            [18:30:22] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                            [18:30:22] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modreality] at CLIENT
                            [18:30:22] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, modreality] at SERVER
                            [18:30:22] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Reality
                            [18:30:22] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
                            [18:30:22] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
                            [18:30:22] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
                            [18:30:22] [Client thread/INFO] [FML]: Applying holder lookups
                            [18:30:22] [Client thread/INFO] [FML]: Holder lookups applied
                            [18:30:22] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:22] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
                            [18:30:22] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                            [18:30:22] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                            [18:30:23] [Thread-6/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                            [18:30:23] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:23] [Sound Library Loader/INFO]: Sound engine started
                            [18:30:41] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_169_petrol_furnace.png
                            java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_169_petrol_furnace.png
                            	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?]
                            	at net.minecraft.client.Minecraft.startGame(Minecraft.java:582) [Minecraft.class:?]
                            	at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
                            	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_45]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_45]
                            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_45]
                            	at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_45]
                            	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                            	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                            	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                            	at GradleStart.main(Unknown Source) [start/:?]
                            [18:30:41] [Client thread/ERROR]: Using missing texture, unable to load modreality:textures/blocks/decomposeur_chimique.png
                            java.io.FileNotFoundException: modreality:textures/blocks/decomposeur_chimique.png
                            	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?]
                            	at net.minecraft.client.Minecraft.startGame(Minecraft.java:582) [Minecraft.class:?]
                            	at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
                            	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_45]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_45]
                            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_45]
                            	at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_45]
                            	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                            	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                            	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                            	at GradleStart.main(Unknown Source) [start/:?]
                            [18:30:41] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
                            [18:30:41] [Client thread/INFO]: Created: 512x256 textures/items-atlas
                            [18:30:41] [Client thread/INFO] [STDOUT]: [fr.minecraft.reality.proxy.ClientProxy:registerRender:8]: client
                            [18:30:41] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
                            [18:30:41] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Mod Reality
                            [18:30:41] [Client thread/INFO]: Created: 512x256 textures/items-atlas
                            [18:30:41] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/MISSING_ICON_BLOCK_169_petrol_furnace.png
                            java.io.FileNotFoundException: minecraft:textures/blocks/MISSING_ICON_BLOCK_169_petrol_furnace.png
                            	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
                            	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
                            	at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
                            	at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
                            	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_45]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_45]
                            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_45]
                            	at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_45]
                            	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                            	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                            	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                            	at GradleStart.main(Unknown Source) [start/:?]
                            [18:30:42] [Client thread/ERROR]: Using missing texture, unable to load modreality:textures/blocks/decomposeur_chimique.png
                            java.io.FileNotFoundException: modreality:textures/blocks/decomposeur_chimique.png
                            	at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
                            	at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [SimpleReloadableResourceManager.class:?]
                            	at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
                            	at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
                            	at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
                            	at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
                            	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.6.0_45]
                            	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[?:1.6.0_45]
                            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[?:1.6.0_45]
                            	at java.lang.reflect.Method.invoke(Method.java:597) ~[?:1.6.0_45]
                            	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
                            	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
                            	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                            	at GradleStart.main(Unknown Source) [start/:?]
                            [18:30:42] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
                            [18:30:42] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:42] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
                            [18:30:42] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
                            [18:30:42] [Client thread/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:42] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:42] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
                            [18:30:42] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
                            [18:30:42] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
                            [18:30:42] [Thread-8/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
                            [18:30:43] [Sound Library Loader/INFO] [STDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
                            [18:30:43] [Sound Library Loader/INFO]: Sound engine started
                            [18:31:09] [Server thread/INFO]: Starting integrated minecraft server version 1.7.10
                            [18:31:09] [Server thread/INFO]: Generating keypair
                            [18:31:10] [Server thread/INFO] [FML]: Injecting existing block and item data into this server instance
                            [18:31:10] [Server thread/INFO] [FML]: Applying holder lookups
                            [18:31:10] [Server thread/INFO] [FML]: Holder lookups applied
                            [18:31:10] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@7b54956b)
                            [18:31:10] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@7b54956b)
                            [18:31:10] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@7b54956b)
                            [18:31:10] [Server thread/INFO]: Preparing start region for level 0
                            [18:31:11] [Server thread/INFO]: Changing view distance to 12, from 10
                            [18:31:11] [Netty Client IO #0/INFO] [FML]: Server protocol version 1
                            [18:31:11] [Netty IO #1/INFO] [FML]: Client protocol version 1
                            [18:31:11] [Netty IO #1/INFO] [FML]: Client attempting to join with 4 mods : mcp@9.05,FML@7.10.85.1291,Forge@10.13.2.1291,modreality@1.0.0
                            [18:31:11] [Netty IO #1/INFO] [FML]: Attempting connection with missing mods [] at CLIENT
                            [18:31:11] [Netty Client IO #0/INFO] [FML]: Attempting connection with missing mods [] at SERVER
                            [18:31:11] [Client thread/INFO] [FML]: [Client thread] Client side modded connection established
                            [18:31:11] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
                            [18:31:11] [Server thread/INFO]: Player140[local:E:cb8257e6] logged in with entity id 318 at (119.08703363122216, 70.54040519445257, 216.57044601569348)
                            [18:31:11] [Server thread/INFO]: Player140 joined the game
                            [18:31:16] [Server thread/ERROR]: Encountered an unexpected exception
                            net.minecraft.util.ReportedException: Exception ticking world
                            	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:698) ~[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.RuntimeException: class fr.minecraft.reality.common.TileEntityPetrolFurnace is missing a mapping! This is a bug!
                            	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?]
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.writeToNBT(TileEntityPetrolFurnace.java:66) ~[TileEntityPetrolFurnace.class:?]
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.getDescriptionPacket(TileEntityPetrolFurnace.java:110) ~[TileEntityPetrolFurnace.class:?]
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendTileToAllPlayersWatchingChunk(PlayerManager.java:632) ~[PlayerManager$PlayerInstance.class:?]
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendChunkUpdate(PlayerManager.java:574) ~[PlayerManager$PlayerInstance.class:?]
                            	at net.minecraft.server.management.PlayerManager.updatePlayerInstances(PlayerManager.java:80) ~[PlayerManager.class:?]
                            	at net.minecraft.world.WorldServer.tick(WorldServer.java:193) ~[WorldServer.class:?]
                            	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692) ~[MinecraftServer.class:?]
                            	... 4 more
                            [18:31:16] [Server thread/ERROR]: This crash report has been saved to: C:\Users\Eliott\Downloads\forge\eclipse\.\crash-reports\crash-2019-10-10_18.31.16-server.txt
                            [18:31:16] [Server thread/INFO]: Stopping server
                            [18:31:16] [Server thread/INFO]: Saving players
                            [18:31:16] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
                            // You're mean.
                            
                            Time: 10/10/19 18:31
                            Description: Exception ticking world
                            
                            java.lang.RuntimeException: class fr.minecraft.reality.common.TileEntityPetrolFurnace is missing a mapping! This is a bug!
                            	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.writeToNBT(TileEntityPetrolFurnace.java:66)
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.getDescriptionPacket(TileEntityPetrolFurnace.java:110)
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendTileToAllPlayersWatchingChunk(PlayerManager.java:632)
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendChunkUpdate(PlayerManager.java:574)
                            	at net.minecraft.server.management.PlayerManager.updatePlayerInstances(PlayerManager.java:80)
                            	at net.minecraft.world.WorldServer.tick(WorldServer.java:193)
                            	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692)
                            	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 net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96)
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.writeToNBT(TileEntityPetrolFurnace.java:66)
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.getDescriptionPacket(TileEntityPetrolFurnace.java:110)
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendTileToAllPlayersWatchingChunk(PlayerManager.java:632)
                            	at net.minecraft.server.management.PlayerManager$PlayerInstance.sendChunkUpdate(PlayerManager.java:574)
                            	at net.minecraft.server.management.PlayerManager.updatePlayerInstances(PlayerManager.java:80)
                            	at net.minecraft.world.WorldServer.tick(WorldServer.java:193)
                            
                            -- Affected level --
                            Details:
                            	Level name: New World
                            	All players: 1 total; [EntityPlayerMP['Player140'/318, l='New World', x=119,09, y=70,54, z=216,57]]
                            	Chunk stats: ServerChunkCache: 678 Drop: 0
                            	Level seed: -3157102291438710933
                            	Level generator: ID 00 - default, ver 1. Features enabled: true
                            	Level generator options: 
                            	Level spawn location: World: (124,64,220), Chunk: (at 12,4,12 in 7,13; contains blocks 112,0,208 to 127,255,223), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
                            	Level time: 15775 game time, 471 day time
                            	Level dimension: 0
                            	Level storage version: 0x04ABD - Anvil
                            	Level weather: Rain time: 22318 (now: false), thunder time: 163930 (now: false)
                            	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
                            Stacktrace:
                            	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:692)
                            	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 8 (amd64) version 6.2
                            	Java Version: 1.6.0_45, Sun Microsystems Inc.
                            	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
                            	Memory: 902548600 bytes (860 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 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: 13, tcache: 0, allocated: 13, tallocated: 95
                            	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
                            	modreality{1.0.0} [Mod Reality] (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['Player140'/318, l='New World', x=119,09, y=70,54, z=216,57]]
                            	Type: Integrated Server (map_client.txt)
                            	Is Modded: Definitely; Client brand changed to 'fml,forge'
                            [18:31:16] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:393]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2019-10-10_18.31.16-server.txt
                            [18:31:16] [Client thread/INFO] [FML]: Waiting for the server to terminate/save.
                            [18:31:16] [Server thread/INFO]: Saving worlds
                            [18:31:16] [Server thread/INFO]: Saving chunks for level 'New World'/Overworld
                            [18:31:16] [Server thread/ERROR] [FML]: A TileEntity type fr.minecraft.reality.common.TileEntityPetrolFurnace has throw an exception trying to write state. It will not persist. Report this to the mod author
                            java.lang.RuntimeException: class fr.minecraft.reality.common.TileEntityPetrolFurnace is missing a mapping! This is a bug!
                            	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?]
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.writeToNBT(TileEntityPetrolFurnace.java:66) ~[TileEntityPetrolFurnace.class:?]
                            	at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?]
                            	at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?]
                            	at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:287) [ChunkProviderServer.class:?]
                            	at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:340) [ChunkProviderServer.class:?]
                            	at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:863) [WorldServer.class:?]
                            	at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?]
                            	at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:405) [MinecraftServer.class:?]
                            	at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:266) [IntegratedServer.class:?]
                            	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:538) [MinecraftServer.class:?]
                            	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
                            [18:31:16] [Server thread/ERROR] [FML]: A TileEntity type fr.minecraft.reality.common.TileEntityPetrolFurnace has throw an exception trying to write state. It will not persist. Report this to the mod author
                            java.lang.RuntimeException: class fr.minecraft.reality.common.TileEntityPetrolFurnace is missing a mapping! This is a bug!
                            	at net.minecraft.tileentity.TileEntity.writeToNBT(TileEntity.java:96) ~[TileEntity.class:?]
                            	at fr.minecraft.reality.common.TileEntityPetrolFurnace.writeToNBT(TileEntityPetrolFurnace.java:66) ~[TileEntityPetrolFurnace.class:?]
                            	at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:395) [AnvilChunkLoader.class:?]
                            	at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:204) [AnvilChunkLoader.class:?]
                            	at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:287) [ChunkProviderServer.class:?]
                            	at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:340) [ChunkProviderServer.class:?]
                            	at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:863) [WorldServer.class:?]
                            	at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370) [MinecraftServer.class:?]
                            	at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:405) [MinecraftServer.class:?]
                            	at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:266) [IntegratedServer.class:?]
                            	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:538) [MinecraftServer.class:?]
                            	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752) [MinecraftServer$2.class:?]
                            [18:31:16] [Server thread/INFO]: Saving chunks for level 'New World'/Nether
                            [18:31:16] [Server thread/INFO]: Saving chunks for level 'New World'/The End
                            [18:31:16] [Server thread/INFO] [FML]: Unloading dimension 0
                            [18:31:16] [Server thread/INFO] [FML]: Unloading dimension -1
                            [18:31:16] [Server thread/INFO] [FML]: Unloading dimension 1
                            [18:31:16] [Server thread/INFO] [FML]: Applying holder lookups
                            [18:31:16] [Server thread/INFO] [FML]: Holder lookups applied
                            [18:31:16] [Server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
                            [18:31:16] [Client thread/INFO] [FML]: Server terminated.
                            AL lib: (EE) alc_cleanup: 1 device not closed
                            

                            Encore désolé pour le dernier message.
                            Comment ouvre-t-on un nouveau sujet ?
                            Merci d’avance

                            1 réponse Dernière réponse Répondre Citer 0
                            • isadorI Hors-ligne
                              isador Moddeurs confirmés Modérateurs
                              dernière édition par

                              Tu vas dans la section support pour les moddeurs et tu lis les règles.

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

                                Ce message a été supprimé !
                                1 réponse Dernière réponse Répondre Citer 0
                                • H Hors-ligne
                                  Havzen
                                  dernière édition par robin4002

                                  Bonjour robin,
                                  Moi g un petit problème au niveaux du lancement du client pour vérifier que les slots marchent bien mais g un crash au niveaux de l’instance je crois
                                  Voici la console et le crash:

                                  Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
                                  [21:41:10] [main/INFO] [GradleStart]: Extra: []
                                  [21:41:10] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/pc02/.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]
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
                                  [21:41:10] [main/INFO] [FML]: Forge Mod Loader version 7.99.40.1614 for Minecraft 1.7.10 loading
                                  [21:41:10] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_271, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_271
                                  [21:41:10] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
                                  [21:41:10] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
                                  [21:41:10] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
                                  [21:41:10] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                  [21:41:11] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
                                  [21:41:12] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
                                  [21:41:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
                                  [21:41:12] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
                                  [21:41:13] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
                                  [21:41:13] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
                                  [21:41:13] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
                                  [21:41:13] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
                                  [21:41:14] [main/INFO]: Setting user: Player41
                                  [21:41:15] [Client thread/INFO]: LWJGL Version: 2.9.1
                                  [21:41:16] [Client thread/INFO] [STDOUT]: [cpw.mods.fml.client.SplashProgress:start:188]: ---- Minecraft Crash Report ----
                                  // Don't do that.
                                  
                                  Time: 12/11/20 21:41
                                  Description: Loading screen debug info
                                  
                                  This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR
                                  
                                  
                                  A detailed walkthrough of the error, its code path and all known details is as follows:
                                  ---------------------------------------------------------------------------------------
                                  
                                  -- System Details --
                                  Details:
                                  	Minecraft Version: 1.7.10
                                  	Operating System: Windows 10 (amd64) version 10.0
                                  	Java Version: 1.8.0_271, Oracle Corporation
                                  	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                  	Memory: 798218424 bytes (761 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: 0, tallocated: 0
                                  	FML: 
                                  	GL info: ' Vendor: 'Intel' Version: '4.6.0 - Build 26.20.100.7262' Renderer: 'Intel(R) UHD Graphics 630'
                                  [21:41:16] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
                                  [21:41:16] [Client thread/INFO] [FML]: MinecraftForge v10.13.4.1614 Initialized
                                  [21:41:16] [Client thread/INFO] [FML]: Replaced 183 ore recipies
                                  [21:41:16] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
                                  [21:41:17] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
                                  [21:41:17] [Client thread/INFO] [FML]: Searching C:\Users\pc02\Desktop\mod 1.7.10\eclipse\mods for mods
                                  [21:41:23] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
                                  [21:41:23] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, irizium] at CLIENT
                                  [21:41:23] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, irizium] at SERVER
                                  [21:41:24] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
                                  [21:41:24] [Client thread/ERROR] [FML]: 
                                  	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                                  	UC	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
                                  	UC	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                  	UC	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                  	UE	irizium{1.0.0} [Irimod] (bin) 
                                  [21:41:24] [Client thread/ERROR] [FML]: The following problems were captured during this phase
                                  [21:41:24] [Client thread/ERROR] [FML]: Caught exception from irizium
                                  java.lang.IllegalArgumentException: Can not set static fr.havzen.irizium.Reference field fr.havzen.irizium.Reference.modinstance to fr.havzen.irizium.IriMod
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) ~[?:1.8.0_271]
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source) ~[?:1.8.0_271]
                                  	at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source) ~[?:1.8.0_271]
                                  	at java.lang.reflect.Field.set(Unknown Source) ~[?:1.8.0_271]
                                  	at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:427) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                  	at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:358) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                  	at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                                  	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                  	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190) ~[forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar:?]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
                                  	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) [LoadController.class:?]
                                  	at cpw.mods.fml.common.Loader.loadMods(Loader.java:513) [Loader.class:?]
                                  	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208) [FMLClientHandler.class:?]
                                  	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [Minecraft.class:?]
                                  	at net.minecraft.client.Minecraft.run(Minecraft.java:942) [Minecraft.class:?]
                                  	at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_271]
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_271]
                                  	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
                                  	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
                                  	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
                                  	at GradleStart.main(Unknown Source) [start/:?]
                                  [21:41:24] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Irimod
                                  [21:41:24] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
                                  // Don't do that.
                                  
                                  Time: 12/11/20 21:41
                                  Description: Initializing game
                                  
                                  java.lang.IllegalArgumentException: Can not set static fr.havzen.irizium.Reference field fr.havzen.irizium.Reference.modinstance to fr.havzen.irizium.IriMod
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
                                  	at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)
                                  	at java.lang.reflect.Field.set(Unknown Source)
                                  	at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:427)
                                  	at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:358)
                                  	at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:513)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                  	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                  	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                  	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                  	at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)
                                  	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
                                  	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
                                  	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                                  	at net.minecraft.client.main.Main.main(Main.java:164)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                                  	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                                  	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                                  	at GradleStart.main(Unknown Source)
                                  
                                  
                                  A detailed walkthrough of the error, its code path and all known details is as follows:
                                  ---------------------------------------------------------------------------------------
                                  
                                  -- Head --
                                  Stacktrace:
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
                                  	at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(Unknown Source)
                                  	at sun.reflect.UnsafeStaticObjectFieldAccessorImpl.set(Unknown Source)
                                  	at java.lang.reflect.Field.set(Unknown Source)
                                  	at cpw.mods.fml.common.FMLModContainer.parseSimpleFieldAnnotation(FMLModContainer.java:427)
                                  	at cpw.mods.fml.common.FMLModContainer.processFieldAnnotations(FMLModContainer.java:358)
                                  	at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:513)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                  	at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
                                  	at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
                                  	at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
                                  	at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
                                  	at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
                                  	at com.google.common.eventbus.EventBus.post(EventBus.java:275)
                                  	at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
                                  	at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)
                                  	at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)
                                  	at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
                                  
                                  -- Initialization --
                                  Details:
                                  Stacktrace:
                                  	at net.minecraft.client.Minecraft.run(Minecraft.java:942)
                                  	at net.minecraft.client.main.Main.main(Main.java:164)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                                  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                                  	at java.lang.reflect.Method.invoke(Unknown Source)
                                  	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
                                  	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
                                  	at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
                                  	at GradleStart.main(Unknown Source)
                                  
                                  -- System Details --
                                  Details:
                                  	Minecraft Version: 1.7.10
                                  	Operating System: Windows 10 (amd64) version 10.0
                                  	Java Version: 1.8.0_271, Oracle Corporation
                                  	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
                                  	Memory: 615468504 bytes (586 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: 0, tallocated: 0
                                  	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
                                  	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
                                  	UC	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
                                  	UC	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                  	UC	Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
                                  	UE	irizium{1.0.0} [Irimod] (bin) 
                                  	GL info: ' Vendor: 'Intel' Version: '4.6.0 - Build 26.20.100.7262' Renderer: 'Intel(R) UHD Graphics 630'
                                  	Launched Version: 1.7.10
                                  	LWJGL: 2.9.1
                                  	OpenGL: Intel(R) UHD Graphics 630 GL version 4.6.0 - Build 26.20.100.7262, Intel
                                  	GL Caps: Using GL 1.3 multitexturing.
                                  Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
                                  Anisotropic filtering is supported and maximum anisotropy is 16.
                                  Shaders are available because OpenGL 2.1 is supported.
                                  
                                  	Is Modded: Definitely; Client brand changed to 'fml,forge'
                                  	Type: Client (map_client.txt)
                                  	Resource Packs: []
                                  	Current Language: English (US)
                                  	Profiler Position: N/A (disabled)
                                  	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
                                  	Anisotropic Filtering: Off (1)
                                  [21:41:24] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\pc02\Desktop\mod 1.7.10\eclipse\.\crash-reports\crash-2020-11-12_21.41.24-client.txt
                                  

                                  Merci d’avance.

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

                                    Ton instance ne doit pas être de type référence mais du même type que la classe principale.

                                    Par contre, nous ne faisons plus de support pour la 1.7.10, cette version est obsolète.

                                    H 2 réponses Dernière réponse Répondre Citer 0
                                    • H Hors-ligne
                                      Havzen @robin4002
                                      dernière édition par

                                      @robin4002 j’ai créé une classe pour toutes les information de mon mod(c’est la class Reference)

                                      1 réponse Dernière réponse Répondre Citer 0
                                      • H Hors-ligne
                                        Havzen @robin4002
                                        dernière édition par

                                        @robin4002 C bon ca a marcher mais maintenant quand je pose mon block et que je click droit Il ne se passe rien (je viens de commencer les dev jsuis un gros noob mdrrr)

                                        1 réponse Dernière réponse Répondre Citer 0
                                        • H Hors-ligne
                                          Havzen
                                          dernière édition par robin4002

                                          Voici mes class:

                                          package fr.havzen.irizium.tileentity;
                                          
                                          
                                          import fr.havzen.irizium.IriMod;
                                          import fr.havzen.irizium.Reference;
                                          import net.minecraft.block.Block;
                                          import net.minecraft.block.material.Material;
                                          import net.minecraft.entity.EntityLivingBase;
                                          import net.minecraft.entity.item.EntityItem;
                                          import net.minecraft.entity.player.EntityPlayer;
                                          import net.minecraft.inventory.IInventory;
                                          import net.minecraft.item.ItemStack;
                                          import net.minecraft.nbt.NBTTagCompound;
                                          import net.minecraft.tileentity.TileEntity;
                                          import net.minecraft.tileentity.TileEntityChest;
                                          import net.minecraft.util.ChatComponentText;
                                          import net.minecraft.util.ChatComponentTranslation;
                                          import net.minecraft.util.MathHelper;
                                          import net.minecraft.world.World;
                                          
                                          public class BlockEntity1 extends Block
                                          {
                                          
                                          	public BlockEntity1(Material p_i45394_1_) 
                                          	{
                                          		super(p_i45394_1_);
                                          		
                                          	}
                                          
                                          	@Override
                                          	public boolean hasTileEntity(int metadata) {
                                          		
                                          		return true;
                                          	}
                                          
                                          	@Override
                                          	public TileEntity createTileEntity(World world, int metadata) {
                                          		
                                          		return new TileEntityIrizium();
                                          	}
                                          	   public boolean onBlockActivated1(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
                                          	    {
                                          	        if (world.isRemote)
                                          	        {
                                          	            return true;
                                          	        }
                                          	        else
                                          	        {
                                          	            {
                                          	                player.openGui(IriMod.modinstance, 0, world, x, y, z);;
                                          	            }
                                          
                                          	            return true;
                                          	        }
                                          	    }
                                          	
                                          	 public void breakBlock(World world, int x, int y, int z, Block block, int metadata)
                                          	    {
                                          	        TileEntity tileentity = world.getTileEntity(x, y, z);
                                          	        
                                          	        IInventory inv = (IInventory)tileentity;
                                          	        if (tileentity instanceof IInventory)
                                          	        {
                                          	            for (int i1 = 0; i1 < inv.getSizeInventory(); ++i1)
                                          	            {
                                          	                ItemStack itemstack = inv.getStackInSlot(i1);
                                          
                                          	                if (itemstack != null)
                                          	                {
                                          	                    float f = world.rand.nextFloat() * 0.8F + 0.1F;
                                          	                    float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
                                          	                    EntityItem entityitem;
                                          
                                          	                    for (float f2 = world.rand.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; world.spawnEntityInWorld(entityitem))
                                          	                    {
                                          	                        int j1 = world.rand.nextInt(21) + 10;
                                          
                                          	                        if (j1 > itemstack.stackSize)
                                          	                        {
                                          	                            j1 = itemstack.stackSize;
                                          	                        }
                                          
                                          	                        itemstack.stackSize -= j1;
                                          	                        entityitem = new EntityItem(world, (double)((float)x + f), (double)((float)y + f1), (double)((float)z + f2), new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
                                          	                        float f3 = 0.05F;
                                          	                        entityitem.motionX = (double)((float)world.rand.nextGaussian() * f3);
                                          	                        entityitem.motionY = (double)((float)world.rand.nextGaussian() * f3 + 0.2F);
                                          	                        entityitem.motionZ = (double)((float)world.rand.nextGaussian() * f3);
                                          
                                          	                        if (itemstack.hasTagCompound())
                                          	                        {
                                          	                            entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
                                          	                        }
                                          	                    }
                                          	                }
                                          	            }
                                          
                                          	            world.func_147453_f(x, y, z, block);
                                          	        }
                                          
                                          	        super.breakBlock(world, x, y, z, block, metadata);
                                          	    }
                                          	 public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                                          	 {
                                          		 if(stack.getItemDamage() == 0)
                                          		 {
                                          			 TileEntity tile = world.getTileEntity(x, y, z);
                                          			 if(tile instanceof TileEntityIrizium)
                                          			 {
                                          				 int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
                                          				 ((TileEntityIrizium)tile).setDirection((byte)direction);
                                          				 if(stack.hasDisplayName())
                                          				 {
                                          					 ((TileEntityIrizium)tile).setCustomName(stack.getDisplayName()); 
                                          				 }
                                          			 }
                                          		 }
                                          	 }
                                          	
                                              public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
                                              
                                              {
                                              	TileEntity tile = world.getTileEntity(x, y, z);
                                              	if(tile instanceof TileEntityIrizium)
                                              	{
                                              		TileEntityIrizium BlockEntityTest = (TileEntityIrizium)tile;	
                                              	}
                                                  return false;
                                              }
                                          }
                                          
                                          1 réponse Dernière réponse Répondre Citer 0
                                          • H Hors-ligne
                                            Havzen
                                            dernière édition par robin4002

                                            package fr.havzen.irizium.tileentity;
                                            
                                            import net.minecraft.entity.player.EntityPlayer;
                                            import net.minecraft.inventory.IInventory;
                                            import net.minecraft.item.ItemStack;
                                            import net.minecraft.nbt.NBTTagCompound;
                                            import net.minecraft.nbt.NBTTagList;
                                            import net.minecraft.tileentity.TileEntity;
                                            import net.minecraftforge.common.util.Constants;
                                            
                                            
                                            public class TileEntityIrizium extends TileEntity implements IInventory
                                            {
                                            	private int number;
                                            	private byte direction;
                                            	private ItemStack[] contents = new ItemStack [108];
                                            	private String customName;
                                            
                                            	@Override
                                            	public void readFromNBT(NBTTagCompound compound) 
                                            	{
                                            		
                                            		super.readFromNBT(compound);
                                            		this.direction = compound.getByte("Direction");
                                            		
                                            		 
                                            		if (compound.hasKey("CustomName", Constants.NBT.TAG_STRING))
                                            	        {
                                            	            this.customName = compound.getString("CustomName");
                                            	        }
                                                        
                                            		NBTTagList nbttaglist = compound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
                                            	        this.contents = new ItemStack[this.getSizeInventory()];
                                            
                                            	        if (compound.hasKey("CustomName", 8))
                                            	        {
                                            	            this.customName = compound.getString("CustomName");
                                            	        }
                                            
                                            	        for (int i = 0; i < nbttaglist.tagCount(); ++i)
                                            	        {
                                            	            NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
                                            	            int j = nbttagcompound1.getByte("Slot") & 255;
                                            
                                            	            if (j >= 0 && j < this.contents.length)
                                            	            {
                                            	                this.contents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
                                            	            }
                                            	        }
                                            	}
                                            
                                            	@Override
                                            	public void writeToNBT(NBTTagCompound compound)
                                            	{
                                            		
                                            		super.writeToNBT(compound);
                                            		compound.setByte("Direction", this.direction);
                                            		
                                            		 if (this.hasCustomInventoryName())
                                            	        {
                                            			 compound.setString("CustomName", this.customName);
                                            	        }
                                            		
                                            		NBTTagList nbttaglist = new NBTTagList();
                                            
                                                    for (int i = 0; i < this.contents.length; ++i)
                                                    {
                                                        if (this.contents[i] != null)
                                                        {
                                                            NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                                                            nbttagcompound1.setByte("Slot", (byte)i);
                                                            this.contents[i].writeToNBT(nbttagcompound1);
                                                            nbttaglist.appendTag(nbttagcompound1);
                                                        }
                                                    }
                                            
                                                    compound.setTag("Items", nbttaglist);
                                            
                                                    if (this.hasCustomInventoryName())
                                                    {
                                                    	compound.setString("CustomName", this.customName);
                                                    }
                                            	}
                                            	
                                            
                                            
                                            	public byte getDirection() {
                                            		return direction;
                                            	}
                                            
                                            	public void setDirection(byte direction) {
                                            		this.direction = direction;
                                            	}
                                            
                                            	@Override
                                            	public int getSizeInventory() {
                                            		
                                            		return this.contents.length;
                                            	}
                                            
                                            	@Override
                                            	public ItemStack getStackInSlot(int slotIndex) {
                                            
                                            		return this.contents[slotIndex];
                                            	}
                                            
                                            	@Override
                                            	public ItemStack decrStackSize(int slotIndex, int amount) {
                                                    if (this.contents[slotIndex] != null)
                                                    {
                                                        ItemStack itemstack;
                                            
                                                        if (this.contents[slotIndex].stackSize <= amount)
                                                        {
                                                            itemstack = this.contents[slotIndex];
                                                            this.contents[slotIndex] = null;
                                                            this.markDirty();
                                                            return itemstack;
                                                        }
                                                        else
                                                        {
                                                            itemstack = this.contents[slotIndex].splitStack(amount);
                                            
                                                            if (this.contents[slotIndex].stackSize == 0)
                                                            {
                                                                this.contents[slotIndex] = null;
                                                            }
                                            
                                                            this.markDirty();
                                                            return itemstack;
                                                        }
                                                    }
                                                    else
                                                    {
                                                        return null;
                                                    }
                                            	}
                                            	@Override
                                            	public ItemStack getStackInSlotOnClosing(int slotIndex) 
                                            	{
                                            		 if (this.contents[slotIndex] != null)
                                            	        {
                                            	            ItemStack itemstack = this.contents[slotIndex];
                                            	            this.contents[slotIndex] = null;
                                            	            return itemstack;
                                            	        }
                                            	        else
                                            	        {
                                            	            return null;
                                            	        }
                                            	}
                                            	
                                            	
                                            
                                            	@Override
                                            	public void setInventorySlotContents(int slotIndex, ItemStack stack) 
                                            	{
                                            		this.contents[slotIndex] = stack;
                                            
                                                    if (stack != null && stack.stackSize > this.getInventoryStackLimit())
                                                    {
                                                    	stack.stackSize = this.getInventoryStackLimit();
                                                    }
                                            
                                                    this.markDirty();
                                            		
                                            	}
                                            
                                            	@Override
                                            	public String getInventoryName() 
                                            	{
                                            		return this.hasCustomInventoryName() ? this.customName : "tile.irizium.chest";
                                            	}
                                            
                                            
                                            	@Override
                                            	public boolean hasCustomInventoryName() {
                                            
                                            		return this.customName != null && !this.customName.isEmpty();
                                            	}
                                            
                                            	public void setCustomName(String customName) 
                                            	{
                                            		this.customName = customName;
                                            	}
                                            
                                            	@Override
                                            	public int getInventoryStackLimit() 
                                            	{
                                            
                                            		return 240;
                                            	}
                                            
                                            	@Override
                                            	public boolean isUseableByPlayer(EntityPlayer player) 
                                            	{
                                                    return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : player.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
                                                }
                                            
                                            	@Override
                                            	public void openInventory() {
                                            		
                                            		
                                            	}
                                            
                                            	@Override
                                            	public void closeInventory() 
                                            	{
                                            
                                            	}
                                            
                                            	@Override
                                            	public boolean isItemValidForSlot(int slotIndex, ItemStack stack) 
                                            	{
                                            		return true;
                                            	}
                                            }
                                            
                                            1 réponse Dernière réponse Répondre Citer 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 7
                                            • 4 / 7
                                            • Premier message
                                              Dernier message
                                            Design by Woryk
                                            ContactMentions Légales

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB