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

    Résolu Changement de position de barres et "désactivation"

    1.7.x
    1.7.10
    2
    2
    556
    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.
    • Benjamin Loison
      Benjamin Loison dernière édition par

      Salut !

      J’aimerai viré toutes les barres de Minecraft, Fain, Vie et Xp du coup j’ai appliqué ce code :

      @SubscribeEvent
      public void maskXpBar(RenderGameOverlayEvent.Pre event)
      {
      if(event.type == ElementType.EXPERIENCE)
      {
      event.setCanceled(true);
      }
      if(event.type == ElementType.FOOD)
      {
      event.setCanceled(true);
      }
      if(event.type == ElementType.HEALTH)
      {
      event.setCanceled(true);
      }
      }
      

      Et donc j’aimerai “les déplacer” avec ce code :

      @SubscribeEvent(priority = EventPriority.HIGHEST)
      public static void renderThirst(int rwidth, int rheight)
      {
      bind(new ResourceLocation("thirstmod:textures/gui/thirstBar-new.png"));
      ClientStats stats = ClientStats.getInstance();
      GuiIngame ingameGUI = mc.ingameGUI;
      updateCounter = ingameGUI.getUpdateCounter();
      int height = rheight - 49;
      int xStart = 1;
      int yStart = 1;
      int yEnd = 9;
      int xEnd = 7;
      
      if(stats.saturation <= 0.0F && updateCounter % ((stats.level + 1) * 3 + 1) == 0)
      {
      height += rand.nextInt(3) - 1;
      }
      
      ingameGUI.drawTexturedModalRect(rwidth - 10, rheight / 2, xStart, yStart, xEnd, yEnd);
      ingameGUI.drawTexturedModalRect(rwidth - 10, rheight / 2, xStart + 8, yStart, xEnd, yEnd);
      GL11.glColor4f(1, 1, 1, 1);
      FMLClientHandler.instance().getClient().fontRenderer.drawString(stats.level + "", rwidth - 30, rheight / 2, 0xFFFFFF);
      FMLClientHandler.instance().getClient().fontRenderer.drawString(Minecraft.getMinecraft().thePlayer.getFoodStats().getFoodLevel() * 5 + "", rwidth - 30, rheight / 2 + 10, 0xFFFFFF);
      FMLClientHandler.instance().getClient().fontRenderer.drawString(Math.round(Minecraft.getMinecraft().thePlayer.getHealth() * 5) + "", rwidth - 30, rheight / 2 + 20, 0xFFFFFF);
      GL11.glColor4f(1, 1, 1, 1);
      bind(Gui.icons);
      ingameGUI.drawTexturedModalRect(rwidth - 10, rheight / 2 + 10, 16, 36, 9, 9);
      ingameGUI.drawTexturedModalRect(rwidth - 10, rheight / 2 + 20, 53, 1, 7, 7);
      }
      

      Mais le problème c’est que des que je désactive le moindre event barre de Minecraft mon code n’est plus affiché :S

      Un petit coup de pouce ? 🙂

      >! Développeur de Altis-Life (Arma III) sur Minecraft !
      >! Site web     : https://lemnoslife.com

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

        @SubscribeEvent(priority = EventPriority.HIGHEST)
        public static void renderThirst(int rwidth, int rheight)
        Non valide.

        ça c’est valide :
        @SubscribeEvent(priority = EventPriority.HIGHEST)
        public void nomDeLaMethod(NomDeLevent event)

        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