MFF

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

    Problème Arc

    Planifier Épinglé Verrouillé Déplacé Résolu 1.7.x
    1.7.10
    12 Messages 5 Publieurs 1.7k 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.
    • DeletedD Hors-ligne
      Deleted
      dernière édition par

      Il avait mis 1.7.10

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

        merci Plaigon pour l’info que tu lui as donné x) et du coup la je vois pas du tout pourquoi ca fait ca

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

          bh genre voici ma classe :

          package com.mod.exonia.items;
          
          import cpw.mods.fml.relauncher.Side;
          import cpw.mods.fml.relauncher.SideOnly;
          import net.minecraft.client.renderer.texture.IIconRegister;
          import net.minecraft.creativetab.CreativeTabs;
          import net.minecraft.enchantment.Enchantment;
          import net.minecraft.enchantment.EnchantmentHelper;
          import net.minecraft.entity.player.EntityPlayer;
          import net.minecraft.entity.projectile.EntityArrow;
          import net.minecraft.init.Items;
          import net.minecraft.item.EnumAction;
          import net.minecraft.item.ItemStack;
          import net.minecraft.util.IIcon;
          import net.minecraft.world.World;
          import net.minecraftforge.common.MinecraftForge;
          import net.minecraftforge.event.entity.player.ArrowLooseEvent;
          import net.minecraftforge.event.entity.player.ArrowNockEvent;
          
          public class obsidianBow
          {
              public static final String[] bowPullIconNameArray = new String[] {"a", "b", "c"};
              @SideOnly(Side.CLIENT)
              private IIcon[] iconArray;
              private static final String __OBFID = "CL_00001777";
          
              public obsidianBow()
              {
                  this.maxStackSize = 1;
                  this.setMaxDamage(395);
                  this.setCreativeTab(CreativeTabs.tabCombat);
              }
          
              public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_)
              {
                  int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
          
                  ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
                  MinecraftForge.EVENT_BUS.post(event);
                  if (event.isCanceled())
                  {
                      return;
                  }
                  j = event.charge;
          
                  boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
          
                  if (flag || p_77615_3_.inventory.hasItem(Items.arrow))
                  {
                      float f = (float)j / 20.0F;
                      f = (f * f + f * 2.0F) / 3.0F;
          
                      if ((double)f < 0.1D)
                      {
                          return;
                      }
          
                      if (f > 1.0F)
                      {
                          f = 1.0F;
                      }
          
                      EntityArrow entityarrow = new EntityArrow(p_77615_2_, p_77615_3_, f * 2.0F);
          
                      if (f == 1.0F)
                      {
                          entityarrow.setIsCritical(true);
                      }
          
                      int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_);
          
                      if (k > 0)
                      {
                          entityarrow.setDamage(entityarrow.getDamage() + (double)k * 0.6D + 0.5D);
                      }
          
                      int l = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, p_77615_1_);
          
                      if (l > 0)
                      {
                          entityarrow.setKnockbackStrength(l);
                      }
          
                      if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0)
                      {
                          entityarrow.setFire(100);
                      }
          
                      p_77615_1_.damageItem(1, p_77615_3_);
                      p_77615_2_.playSoundAtEntity(p_77615_3_, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
          
                      if (flag)
                      {
                          entityarrow.canBePickedUp = 5;
                      }
                      else
                      {
                          p_77615_3_.inventory.consumeInventoryItem(Items.arrow);
                      }
          
                      if (!p_77615_2_.isRemote)
                      {
                          p_77615_2_.spawnEntityInWorld(entityarrow);
                      }
                  }
              }
          
              public ItemStack onEaten(ItemStack p_77654_1_, World p_77654_2_, EntityPlayer p_77654_3_)
              {
                  return p_77654_1_;
              }
          
              public int getMaxItemUseDuration(ItemStack p_77626_1_)
              {
                  return 72000;
              }
          
              public EnumAction getItemUseAction(ItemStack p_77661_1_)
              {
                  return EnumAction.bow;
              }
          
              public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
              {
                  ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
                  MinecraftForge.EVENT_BUS.post(event);
                  if (event.isCanceled())
                  {
                      return event.result;
                  }
          
                  if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(Items.arrow))
                  {
                      p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
                  }
          
                  return p_77659_1_;
              }
          
              public int getItemEnchantability()
              {
                  return 1;
              }
          
              @SideOnly(Side.CLIENT)
              public void registerIcons(IIconRegister p_94581_1_)
              {
                  this.itemIcon = p_94581_1_.registerIcon(this.getIconString() + "_standby");
                  this.iconArray = new IIcon[bowPullIconNameArray.length];
          
                  for (int i = 0; i < this.iconArray.length; ++i)
                  {
                      this.iconArray* = p_94581_1_.registerIcon(this.getIconString() + "_" + bowPullIconNameArray*);
                  }
              }
          
              @SideOnly(Side.CLIENT)
              public IIcon getItemIconForUseDuration(int p_94599_1_)
              {
                  return this.iconArray[p_94599_1_];
              }
          }
          

          a la ligne 91 il y a une erreur avec itemRand

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

            ok j’suis niope et alors ?

            bref. ca fait ce bug pour toutes les frame de larc quand tu le charges ?

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

              oui Spyman, comme sur le screen 😄

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

                c’est bizarre j’ai jamais vu ce bug pourtant ta class me semble correct

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

                  😕 dommage

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

                    quelqu’un aurait-il une idée,car j’ai recommencé deux fois ma classe et ca me fait toujours la même chose 😕

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

                      Tu fois faire une classe itembowrender avec le rendu voulu de ton arc et ensuite tu dois l’enregistrer dans ton client proxy

                      Envoyé de mon ZTE BLADE V7 LITE en utilisant Tapatalk

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

                        bien vu j’avais oublier cette class (perso j’en n’avais pas eu besion avant)

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

                        MINECRAFT FORGE FRANCE © 2024

                        Powered by NodeBB