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

    Résolu Probleme de Gui

    1.7.x
    1.7.10
    2
    4
    805
    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.
    • Xodrun
      Xodrun dernière édition par

      Bonsoir,

      J’ai creer une machine mais quand j’ouvre la machine il ya un bug, “inventory” est mal place, comment ce pourait faire pour le suprimer?

      la classe du gui:

      
       public class Guimercure_machine extends GuiContainer {
      
        private static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + ":textures/gui/container/guimercure_machine.png");
           private TileEntitymercure_machine tileCompressor;
           private IInventory playerInv;
      
        public Guimercure_machine(TileEntitymercure_machine tile, InventoryPlayer inventory)
        {
         super(new Containermercure_machine(tile, inventory));
               this.tileCompressor = tile;
               this.playerInv = inventory;
               this.allowUserInput = false;
               this.ySize = 340;
               this.xSize = 200;
        }
      
        @Override
        protected void drawGuiContainerBackgroundLayer(float partialRenderTick, int x, int y)
        {
      
         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
               this.mc.getTextureManager().bindTexture(texture);
               int k = (this.width - this.xSize) / 2;
               int l = (this.height - this.ySize) / 2;
               this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
               if(this.tileCompressor.isBurning())
      
               {
      
                   int i = this.tileCompressor.getCookProgress();
      
                   this.drawTexturedModalRect(k +  90, l + 122, 201, 105, 20, i);
      
               }
      
        }
      
        protected void drawGuiContainerForegroundLayer(int x, int y)
           {
               this.fontRendererObj.drawString(this.playerInv.hasCustomInventoryName() ? this.playerInv.getInventoryName() : I18n.format(this.playerInv.getInventoryName()), 10, this.ySize - 98, 4210752);
           }
      
       }
      
      
      1 réponse Dernière réponse Répondre Citer 0
      • ?
        Un Ancien Utilisateur dernière édition par

        essaye sa et sa devrait etre bon

        package com.adamitemod.mod;
        
        public class Guimercure_machine extends GuiContainer {
        
         private static final ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + ":textures/gui/container/guimercure_machine.png");
            private TileEntitymercure_machine tileCompressor;
        
         public Guimercure_machine(TileEntitymercure_machine tile, InventoryPlayer inventory) 
         {
          super(new Containermercure_machine(tile, inventory));
                this.tileCompressor = tile;
                this.allowUserInput = false;
                this.ySize = 340;
                this.xSize = 200;
         }
        
         @Override
         protected void drawGuiContainerBackgroundLayer(float partialRenderTick, int x, int y) 
         {
        
          GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                this.mc.getTextureManager().bindTexture(texture);
                int k = (this.width - this.xSize) / 2;
                int l = (this.height - this.ySize) / 2;
                this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); 
                if(this.tileCompressor.isBurning())
        
                {
        
                    int i = this.tileCompressor.getCookProgress();
        
                    this.drawTexturedModalRect(k +  90, l + 122, 201, 105, 20, i);
        
                }
        
         }
        
        }
        
        

        si sa foctionne oublie pas le petit plus 😛

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

          Sa fonctione niquel

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

            ok met le sujet en résolut du coup

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

            MINECRAFT FORGE FRANCE © 2018

            Powered by NodeBB