MFF

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

    Faire un nouveau four

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

      Alors, les trucs avec Smelter c’est de ma faute ( J’ai édité le tuto ), mais le reste, je vois pas pourquoi tu as des erreurs.

      "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
      ― Jordan B. Peterson

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

        Pour 1.5.2, ça devrait pouvoir fonctionner, suffit de changer les trucs qui faut pour les textures

        Twitter :

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

          ok merci x)

          Auteur originale de Sevenno's Addons et de [url=http://www.minecraftfor…

          1 réponse Dernière réponse Répondre Citer 0
          • Superloup10S Hors-ligne
            Superloup10 Modérateurs
            dernière édition par

            Une question si je veux que mon four cuisse 2 fois plus vite mais en consommant 2 fois plus de ressources, qu’est-ce que je dois modifier?

            Si vous souhaitez me faire un don, il vous suffit de cliquer sur le bouton situé en dessous.

            Je suis un membre apprécié et joueur, j'ai déjà obtenu 17 points de réputation.

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

              Modifie les valeurs égales a 200 dans le code de la TileEntity, et pour les items, modifie leur temps de cuisson.

              Exemple :

              200 divisé par deux fera deux fois plus vite.

              La valeur 1600 divisé par deux le fera durer deux fois moins longtemps 😉

              "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
              ― Jordan B. Peterson

              1 réponse Dernière réponse Répondre Citer 0
              • Superloup10S Hors-ligne
                Superloup10 Modérateurs
                dernière édition par

                Ok, merci, dernière question, mon four n’a pas de nom en jeu, comment je peux faire pour lui en donner un?

                Si vous souhaitez me faire un don, il vous suffit de cliquer sur le bouton situé en dessous.

                Je suis un membre apprécié et joueur, j'ai déjà obtenu 17 points de réputation.

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

                  Regarde le tutoriel sur les blocks basiques, c’est la même chose ^^

                  "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                  ― Jordan B. Peterson

                  1 réponse Dernière réponse Répondre Citer 0
                  • Superloup10S Hors-ligne
                    Superloup10 Modérateurs
                    dernière édition par

                    Ok, mais c’est au deux fours que je doit mettre le nom ou juste celui éteint?

                    Si vous souhaitez me faire un don, il vous suffit de cliquer sur le bouton situé en dessous.

                    Je suis un membre apprécié et joueur, j'ai déjà obtenu 17 points de réputation.

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

                      Les deux fours 😉

                      "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                      ― Jordan B. Peterson

                      1 réponse Dernière réponse Répondre Citer 0
                      • Superloup10S Hors-ligne
                        Superloup10 Modérateurs
                        dernière édition par

                        J’ai actuellement un problème avec le spawn des particules, elles n’apparaissen pas au bon endroit, j’ai vérifié cette partie ```java
                        public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
                        {
                        if (this.isActive)
                        {
                        int l = par1World.getBlockMetadata(par2, par3, par4);
                        float f = (float)par2 + 0.5F;
                        float f1 = (float)par3 + 0.0F + par5Random.nextFloat() * 6.0F / 16.0F;
                        float f2 = (float)par4 + 0.5F;
                        float f3 = 0.52F;
                        float f4 = par5Random.nextFloat() * 0.6F - 0.3F;

                        if (l == 4)
                        {
                        par1World.spawnParticle(“smoke”, (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                        par1World.spawnParticle(“flame”, (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                        }
                        else if (l == 5)
                        {
                        par1World.spawnParticle(“smoke”, (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                        par1World.spawnParticle(“flame”, (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                        }
                        else if (l == 2)
                        {
                        par1World.spawnParticle(“smoke”, (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
                        par1World.spawnParticle(“flame”, (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
                        }
                        else if (l == 3)
                        {
                        par1World.spawnParticle(“smoke”, (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
                        par1World.spawnParticle(“flame”, (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
                        }
                        }
                        }

                        Si vous souhaitez me faire un don, il vous suffit de cliquer sur le bouton situé en dessous.

                        Je suis un membre apprécié et joueur, j'ai déjà obtenu 17 points de réputation.

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

                          Je n’ai pas ce bug 😮
                          Plus de détails ?

                          "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                          ― Jordan B. Peterson

                          1 réponse Dernière réponse Répondre Citer 0
                          • Superloup10S Hors-ligne
                            Superloup10 Modérateurs
                            dernière édition par

                            Quand le Four a la face avec les flammes tourné vers l’Est, les particules se trouvent au Sud. Quand il a la face tourné vers le Nord, les particules se trouvent au Nord. Dans les deux autres directions, je n’ai pas vu une seule particule.

                            Si vous souhaitez me faire un don, il vous suffit de cliquer sur le bouton situé en dessous.

                            Je suis un membre apprécié et joueur, j'ai déjà obtenu 17 points de réputation.

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

                              Essaie de toucher a la méthode des particules ( les if surtout )

                              "If you have a comprehensive explanation for everything then it decreases uncertainty and anxiety and reduces your cognitive load. And if you can use that simplifying algorithm to put yourself on the side of moral virtue then you’re constantly a good person with a minimum of effort."
                              ― Jordan B. Peterson

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

                                J’ai le même problème :(.

                                Auteur originale de Sevenno's Addons et de [url=http://www.minecraftfor…

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

                                  Mec je ne comprend pas les textures ne se load pas!!! Je sais pas pourquoi!!! J’ai copier ton ton code, j’ai tester, ça marchait(la texture du fou était celui du four de base) j’ai voulu changer la texture, mais elle ne veut plus loader!!!

                                  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

                                    Texture sur le gui ou texture du bloc ?
                                    Je peux avoir tes codes ?

                                    1 réponse Dernière réponse Répondre Citer 0
                                    • kevin_68K Hors-ligne
                                      kevin_68 Moddeurs confirmés
                                      dernière édition par

                                      AHHHMMMMMMMMMMMM

                                      Non, je ne peux pas encore deviner d’où vien le problème, pourrais-tu me donner, pour commencer, version du jeu, classe principale et classe du four?


                                      Mettez à jours vers la dernière version stable (1.8.9 voir même…

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

                                        TOUTE les texture, 1.6.2
                                        class main
                                        :::

                                        package four;
                                        
                                        import net.minecraft.block.Block;
                                        import net.minecraft.creativetab.CreativeTabs;
                                        import tutoriel.proxy.TutoCommonProxy;
                                        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.NetworkMod;
                                        import cpw.mods.fml.common.network.NetworkRegistry;
                                        import cpw.mods.fml.common.registry.GameRegistry;
                                        
                                        @Mod(modid = "ModTutoriel", name = "Mod Tutoriel", version = "1.0.0", acceptedMinecraftVersions = "[1.6.2,)")
                                        @NetworkMod(clientSideRequired = true, serverSideRequired = false)
                                        
                                        public class main
                                        {
                                        @SidedProxy(clientSide = "tutoriel.proxy.TutoClientProxy", serverSide = "tutoriel.proxy.TutoCommonProxy")
                                        public static TutoCommonProxy proxy;
                                        
                                        @Instance("ModTutoriel")
                                        public static main instance;
                                        
                                        public static Block fourOn, fourOff, BlockFour;
                                        
                                        @EventHandler
                                        public void PreInit(FMLPreInitializationEvent event)
                                        {
                                        //Configuration
                                        
                                        //Blocks
                                        //BlockFour = new BlockFour(2000).setHardness(1.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep)
                                        //.setUnlocalizedName("BlockTutorial").func_111022_d("modtutoriel:BlockTutorial");
                                        
                                        fourOn = new BlockFour(800, true).func_111022_d("ModTutoriel:fouron").setUnlocalizedName("On");
                                        fourOff = new BlockFour(810, false).func_111022_d("ModTutoriel:fouroff").setUnlocalizedName("Off").setCreativeTab(CreativeTabs.tabBlock);
                                        
                                        GameRegistry.registerBlock(fourOn, "fourOn");
                                        GameRegistry.registerBlock(fourOff, "fourOff");
                                        
                                        GameRegistry.registerTileEntity(TileEntityFour.class, "TileEntityFour");
                                        //Items
                                        
                                        //Achievements
                                        }
                                        protected static final GuiHandler guihandler = new GuiHandler();
                                        @EventHandler
                                        public void Init(FMLInitializationEvent event)
                                        {
                                        //Registry
                                        NetworkRegistry.instance().registerGuiHandler(this, guihandler);
                                        //Mobs
                                        
                                        //Render
                                        proxy.registerRender();
                                        //NetWork
                                        
                                        //Recipe
                                        
                                        }
                                        
                                        @EventHandler
                                        public void PostInit(FMLPostInitializationEvent event)
                                        {
                                        //Intégration avec les autres mods
                                        
                                        }
                                        }
                                        

                                        le block

                                        package four;
                                        
                                        import java.util.Random;
                                        
                                        import net.minecraft.block.BlockContainer;
                                        import net.minecraft.block.material.Material;
                                        import net.minecraft.client.renderer.texture.IconRegister;
                                        import net.minecraft.entity.EntityLivingBase;
                                        import net.minecraft.entity.item.EntityItem;
                                        import net.minecraft.entity.player.EntityPlayer;
                                        import net.minecraft.item.ItemStack;
                                        import net.minecraft.nbt.NBTTagCompound;
                                        import net.minecraft.tileentity.TileEntity;
                                        import net.minecraft.util.Icon;
                                        import net.minecraft.util.MathHelper;
                                        import net.minecraft.world.World;
                                        import cpw.mods.fml.relauncher.Side;
                                        import cpw.mods.fml.relauncher.SideOnly;
                                        
                                        public class BlockFour extends BlockContainer
                                        {
                                        private final boolean isActive; // On défini une boolean isActive qui servira pour le rendu du block ( Allumé ou non )
                                        
                                        public BlockFour(int par1, boolean par2)
                                        {
                                        super(par1, Material.rock);
                                        this.isActive = par2;
                                        }
                                        
                                        public int idDropped(int par1, Random par2Random, int par3)
                                        {
                                        return main.BlockFour.blockID;
                                        }
                                        @SideOnly(Side.CLIENT)
                                        private Icon furnaceIconTop;
                                        @SideOnly(Side.CLIENT)
                                        private Icon furnaceIconFront;
                                        
                                        @SideOnly(Side.CLIENT)
                                        public Icon getIcon(int side, int metadata)
                                        {
                                        return side == 1 ? this.furnaceIconTop : (side == 0 ? this.furnaceIconTop : (side == metadata ? this.furnaceIconFront : (side == 3 && metadata == 0 ? this.furnaceIconFront : this.blockIcon)));
                                        }
                                        
                                        @SideOnly(Side.CLIENT)
                                        public void registerIcons(IconRegister par1IconRegister)
                                        {
                                        this.blockIcon = par1IconRegister.registerIcon("myfurnace_side");
                                        this.furnaceIconFront = par1IconRegister.registerIcon(this.isActive ? "myfurnace_front_on" : "myfurnace_front_off");
                                        this.furnaceIconTop = par1IconRegister.registerIcon("myfurnace_top");
                                        }
                                        
                                        public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
                                        {
                                        if (par1World.isRemote)
                                        {
                                        return true;
                                        }
                                        else
                                        {
                                        TileEntityFour tileentityfour = (TileEntityFour)par1World.getBlockTileEntity(par2, par3, par4);
                                        
                                        if (tileentityfour != null)
                                        {
                                        par5EntityPlayer.openGui(main.instance, 1, par1World, par2, par3, par4);
                                        }
                                        
                                        return true;
                                        }
                                        }
                                        
                                        public static void updateFurnaceBlockState(boolean par0, World par1World, int par2, int par3, int par4)
                                        {
                                        int l = par1World.getBlockMetadata(par2, par3, par4);
                                        TileEntity tileentity = par1World.getBlockTileEntity(par2, par3, par4);
                                        keepFurnaceInventory = true;
                                        
                                        if (par0)
                                        {
                                        par1World.setBlock(par2, par3, par4, main.fourOn.blockID);
                                        }
                                        else
                                        {
                                        par1World.setBlock(par2, par3, par4, main.fourOff.blockID);
                                        }
                                        
                                        keepFurnaceInventory = false;
                                        par1World.setBlockMetadataWithNotify(par2, par3, par4, l, 2);
                                        
                                        if (tileentity != null)
                                        {
                                        tileentity.validate();
                                        par1World.setBlockTileEntity(par2, par3, par4, tileentity);
                                        }
                                        }
                                        
                                        private static boolean keepFurnaceInventory = false;
                                        
                                        @SideOnly(Side.CLIENT)
                                        
                                        /**
                                        * Tick au hasard qui fait spawn des flammes et de la fumée
                                        */
                                        public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random)
                                        {
                                        if (this.isActive)
                                        {
                                        int l = par1World.getBlockMetadata(par2, par3, par4);
                                        float f = (float)par2 + 0.5F;
                                        float f1 = (float)par3 + 0.0F + par5Random.nextFloat() * 6.0F / 16.0F;
                                        float f2 = (float)par4 + 0.5F;
                                        float f3 = 0.52F;
                                        float f4 = par5Random.nextFloat() * 0.6F - 0.3F;
                                        
                                        if (l == 4)
                                        {
                                        par1World.spawnParticle("smoke", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                                        par1World.spawnParticle("flame", (double)(f - f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                                        }
                                        else if (l == 5)
                                        {
                                        par1World.spawnParticle("smoke", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                                        par1World.spawnParticle("flame", (double)(f + f3), (double)f1, (double)(f2 + f4), 0.0D, 0.0D, 0.0D);
                                        }
                                        else if (l == 2)
                                        {
                                        par1World.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
                                        par1World.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 - f3), 0.0D, 0.0D, 0.0D);
                                        }
                                        else if (l == 3)
                                        {
                                        par1World.spawnParticle("smoke", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
                                        par1World.spawnParticle("flame", (double)(f + f4), (double)f1, (double)(f2 + f3), 0.0D, 0.0D, 0.0D);
                                        }
                                        }
                                        }
                                        
                                        /**
                                        * Crée une entité Four quand le block est placé
                                        */
                                        public TileEntity createNewTileEntity(World par1World)
                                        {
                                        return new TileEntityFour();
                                        }
                                        
                                        /**
                                        * Appelé quand le block est placé
                                        */
                                        public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase living, ItemStack stack)
                                        {
                                        int direction = MathHelper.floor_double((double)(living.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
                                        world.setBlockMetadataWithNotify(x, y, z, direction, 2);
                                        }
                                        public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6)
                                        {
                                        if (!keepFurnaceInventory)
                                        {
                                        TileEntityFour tileentityfurnace = (TileEntityFour)par1World.getBlockTileEntity(par2, par3, par4);
                                        
                                        if (tileentityfurnace != null)
                                        {
                                        for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1)
                                        {
                                        ItemStack itemstack = tileentityfurnace.getStackInSlot(j1);
                                        
                                        if (itemstack != null)
                                        {
                                        float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        
                                        while (itemstack.stackSize > 0)
                                        {
                                        int k1 = this.furnaceRand.nextInt(21) + 10;
                                        
                                        if (k1 > itemstack.stackSize)
                                        {
                                        k1 = itemstack.stackSize;
                                        }
                                        
                                        itemstack.stackSize -= k1;
                                        EntityItem entityitem = new EntityItem(par1World, (double)((float)par2 + f), (double)((float)par3 + f1), (double)((float)par4 + f2), new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
                                        
                                        if (itemstack.hasTagCompound())
                                        {
                                        entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
                                        }
                                        
                                        float f3 = 0.05F;
                                        entityitem.motionX = (double)((float)this.furnaceRand.nextGaussian() * f3);
                                        entityitem.motionY = (double)((float)this.furnaceRand.nextGaussian() * f3 + 0.2F);
                                        entityitem.motionZ = (double)((float)this.furnaceRand.nextGaussian() * f3);
                                        par1World.spawnEntityInWorld(entityitem);
                                        }
                                        }
                                        }
                                        
                                        par1World.func_96440_m(par2, par3, par4, par5);
                                        }
                                        }
                                        
                                        super.breakBlock(par1World, par2, par3, par4, par5, par6);
                                        }
                                        public void breakBlock1(World par1World, int par2, int par3, int par4, int par5, int par6)
                                        {
                                        if (!keepFurnaceInventory)
                                        {
                                        TileEntityFour tileentityfurnace = (TileEntityFour)par1World.getBlockTileEntity(par2, par3, par4);
                                        
                                        if (tileentityfurnace != null)
                                        {
                                        for (int j1 = 0; j1 < tileentityfurnace.getSizeInventory(); ++j1)
                                        {
                                        ItemStack itemstack = tileentityfurnace.getStackInSlot(j1);
                                        
                                        if (itemstack != null)
                                        {
                                        float f = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        float f1 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        float f2 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
                                        
                                        while (itemstack.stackSize > 0)
                                        {
                                        int k1 = this.furnaceRand.nextInt(21) + 10;
                                        
                                        if (k1 > itemstack.stackSize)
                                        {
                                        k1 = itemstack.stackSize;
                                        }
                                        
                                        itemstack.stackSize -= k1;
                                        EntityItem entityitem = new EntityItem(par1World, (double)((float)par2 + f), (double)((float)par3 + f1), (double)((float)par4 + f2), new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
                                        
                                        if (itemstack.hasTagCompound())
                                        {
                                        entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
                                        }
                                        
                                        float f3 = 0.05F;
                                        entityitem.motionX = (double)((float)this.furnaceRand.nextGaussian() * f3);
                                        entityitem.motionY = (double)((float)this.furnaceRand.nextGaussian() * f3 + 0.2F);
                                        entityitem.motionZ = (double)((float)this.furnaceRand.nextGaussian() * f3);
                                        par1World.spawnEntityInWorld(entityitem);
                                        }
                                        }
                                        }
                                        
                                        par1World.func_96440_m(par2, par3, par4, par5);
                                        }
                                        }
                                        
                                        super.breakBlock(par1World, par2, par3, par4, par5, par6);
                                        }
                                        
                                        private final Random furnaceRand = new Random();
                                        
                                        public boolean hasComparatorInputOverride()
                                        {
                                        return true;
                                        }
                                        
                                        }
                                        
                                        

                                        le Gui

                                        package four;
                                        
                                        import net.minecraft.client.gui.inventory.GuiContainer;
                                        import net.minecraft.client.resources.I18n;
                                        import net.minecraft.entity.player.InventoryPlayer;
                                        import net.minecraft.inventory.ContainerFurnace;
                                        import net.minecraft.util.ResourceLocation;
                                        
                                        import org.lwjgl.opengl.GL11;
                                        
                                        import cpw.mods.fml.relauncher.Side;
                                        import cpw.mods.fml.relauncher.SideOnly;
                                        
                                        @SideOnly(Side.CLIENT)
                                        public class GuiFour extends GuiContainer
                                        {
                                        private static final ResourceLocation field_110410_t = new ResourceLocation("ModTutoriel:textures/gui/container/guiFour.png");
                                        private TileEntityFour furnaceInventory;
                                        
                                        public GuiFour(InventoryPlayer par1InventoryPlayer, TileEntityFour par2TileEntityFour)
                                        {
                                        super(new ContainerFour(par1InventoryPlayer, par2TileEntityFour));
                                        this.furnaceInventory = par2TileEntityFour;
                                        } protected void drawGuiContainerForegroundLayer(int par1, int par2)
                                        {
                                        String s = this.furnaceInventory.isInvNameLocalized() ? this.furnaceInventory.getInvName() : I18n.func_135053_a(this.furnaceInventory.getInvName());
                                        this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752);
                                        this.fontRenderer.drawString(I18n.func_135053_a("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
                                        }
                                        
                                        protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
                                        {
                                        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                                        this.mc.func_110434_K().func_110577_a(field_110410_t);
                                        int k = (this.width - this.xSize) / 2;
                                        int l = (this.height - this.ySize) / 2;
                                        this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
                                        int i1;
                                        
                                        if (this.furnaceInventory.isBurning())
                                        {
                                        i1 = this.furnaceInventory.getBurnTimeRemainingScaled(12);
                                        this.drawTexturedModalRect(k + 56, l + 36 + 12 - i1, 176, 12 - i1, 14, i1 + 2);
                                        }
                                        
                                        i1 = this.furnaceInventory.getCookProgressScaled(24);
                                        this.drawTexturedModalRect(k + 79, l + 34, 176, 14, i1 + 1, 16);
                                        }
                                        }
                                        
                                        

                                        :::

                                        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

                                          Heu … le .func_111022_d(“ModTutoriel:fouron”) dans la déclaration de l’item de sert à rien comme tu as mit cette fonction dans le bloc :

                                          public void registerIcons(IconRegister par1IconRegister)
                                          {
                                          this.blockIcon = par1IconRegister.registerIcon("myfurnace_side");
                                          this.furnaceIconFront = par1IconRegister.registerIcon(this.isActive ? "myfurnace_front_on" : "myfurnace_front_off");
                                          this.furnaceIconTop = par1IconRegister.registerIcon("myfurnace_top");
                                          }
                                          

                                          Et ici il manque les modid:

                                          Et pour ici :

                                          private static final ResourceLocation field_110410_t = new ResourceLocation("ModTutoriel:textures/gui/container/guiFour.png");
                                          

                                          MAJUSCULE !!! -> new ResourceLocation(“modtutoriel”, “textures/gui/container/guiFour.png”); à utiliser de préférence.

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

                                            Merci!!! 🙂


                                            je voudrais savoir, c’est-tu possible de faire que ma texture du haut et du bas soit différente?

                                            Edit: c’est bon j’ai trouvé 🙂

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

                                            MINECRAFT FORGE FRANCE © 2024

                                            Powered by NodeBB