• Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Solved ItemStack Teinture

    1.7.x
    1.7.10
    2
    2
    556
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Benjamin Loison
      Benjamin Loison last edited by

      Salut !

      J’aimerais “convertir” se code pour qu’il marche avec des ItemStacks de Teinture (colorant rouge etc)

      else if(list[1].equalsIgnoreCase("buy") && list.length == 4)
      {
      if(props != null)
      {
      i = Integer.parseInt(list[2]);
      
      if(StringUtils.isNumeric(list[2]))
      {
      
      String[] parts = list[3].split(":");
      String part1 = parts[0];
      String part2 = parts[1];
      
      if(part1 != null || part2 != null)
      {
      if(GameRegistry.findItem(part1, part2) != null)
      {
      Item item2 = GameRegistry.findItem(part1, part2);
      if(props.buyCashTest(i, new ItemStack(item2)) == "t4.notenoughmoney")
      {
      Base.instance.network.sendTo(new PacketMessage("t4.notenoughmoney ", true), (EntityPlayerMP)sender);
      props.sync();
      }
      else if(props.buyCashTest(i, new ItemStack(item2)) == "t4.notenoughspace")
      {
      Base.instance.network.sendTo(new PacketMessage("t4.notenoughspace", true), (EntityPlayerMP)sender);
      }
      else
      {
      Base.instance.network.sendTo(new PacketMessage("t4.bought", false, i), (EntityPlayerMP)sender);
      props.buyCash(i, new ItemStack(item2));
      }
      }
      }
      
      }
      
      }
      }
      

      Sinon question plus simple comment GameRegistry.findItem pour un colorant ?

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

      1 Reply Last reply Reply Quote 0
      • SCAREX
        SCAREX last edited by

        Comment veux-tu “convertir” un code si on ne sait pas d’où il provient ni à quoi il sert ?

        Pour les colorants : pas besoin de GameRegistry.findItem, il faut utiliser l’OreDictionnary

        Site web contenant mes scripts : http://SCAREXgaming.github.io

        Pas de demandes de support par MP ni par skype SVP.
        Je n'accepte sur skype que l…

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Design by Woryk
        Contact / Mentions Légales

        MINECRAFT FORGE FRANCE © 2018

        Powered by NodeBB