Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. how to get arrow

how to get arrow

Scheduled Pinned Locked Moved Solved ScriptAPI
13 Posts 5 Posters 2.6k Views 1 Watching
  • 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.
  • DreamWasFuckedD Offline
    DreamWasFuckedD Offline
    DreamWasFucked
    wrote on last edited by DreamWasFucked
    #1

    i tried getting arrow with

    Item.getItemById(262), net.minecraft.item.ItemArrow
    

    but it doesnt work
    how pls help

    dntdbtD 1 Reply Last reply
    0
    • Q Offline
      Q Offline
      quadro
      wrote on last edited by quadro
      #13

      net.minecraft.init.Items -> public static final Item arrow
      recommended reading: minecraft source code

      edit: also accomplishable by checking unlocalized item name

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #2

        what are you trying to do

        DreamWasFuckedD 1 Reply Last reply
        0
        • ? A Former User

          what are you trying to do

          DreamWasFuckedD Offline
          DreamWasFuckedD Offline
          DreamWasFucked
          wrote on last edited by
          #3

          bow longjump

          1 Reply Last reply
          0
          • DreamWasFuckedD DreamWasFucked

            i tried getting arrow with

            Item.getItemById(262), net.minecraft.item.ItemArrow
            

            but it doesnt work
            how pls help

            dntdbtD Offline
            dntdbtD Offline
            dntdbt
            wrote on last edited by
            #4

            @auto-reply-bot (object instanceof Java.type("net.minecraft.item.ItemArrow")) ?

            DreamWasFuckedD 1 Reply Last reply
            0
            • dntdbtD dntdbt

              @auto-reply-bot (object instanceof Java.type("net.minecraft.item.ItemArrow")) ?

              DreamWasFuckedD Offline
              DreamWasFuckedD Offline
              DreamWasFucked
              wrote on last edited by
              #5

              doesnt work

              dntdbtD 1 Reply Last reply
              0
              • DreamWasFuckedD DreamWasFucked

                doesnt work

                dntdbtD Offline
                dntdbtD Offline
                dntdbt
                wrote on last edited by
                #6

                @auto-reply-bot
                think you meant shooted arrow
                so, shooted arrow = entity

                (object instanceof Java.type("net.minecraft.entity.projectile.EntityArrow"))

                DreamWasFuckedD 1 Reply Last reply
                0
                • dntdbtD dntdbt

                  @auto-reply-bot
                  think you meant shooted arrow
                  so, shooted arrow = entity

                  (object instanceof Java.type("net.minecraft.entity.projectile.EntityArrow"))

                  DreamWasFuckedD Offline
                  DreamWasFuckedD Offline
                  DreamWasFucked
                  wrote on last edited by DreamWasFucked
                  #7

                  i mean i need to get how many arrows in the inventory

                  like this:

                  function getArrowsAmount() {
                      var amount = 0;
                      for(i = 9; i < 45; ++i) {
                          stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
                          if (stack != null && stack instanceof Arrow) {
                              amount += stack.stackSize;
                          }
                      }
                      return amount;
                  }
                  
                  C dntdbtD 2 Replies Last reply
                  0
                  • DreamWasFuckedD DreamWasFucked

                    i mean i need to get how many arrows in the inventory

                    like this:

                    function getArrowsAmount() {
                        var amount = 0;
                        for(i = 9; i < 45; ++i) {
                            stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
                            if (stack != null && stack instanceof Arrow) {
                                amount += stack.stackSize;
                            }
                        }
                        return amount;
                    }
                    
                    C Offline
                    C Offline
                    Co丶Dynamic
                    wrote on last edited by
                    #8

                    @auto-reply-bot I think that's unnecessary to find out how many arrows currently in your inventory

                    1 Reply Last reply
                    0
                    • DreamWasFuckedD DreamWasFucked

                      i mean i need to get how many arrows in the inventory

                      like this:

                      function getArrowsAmount() {
                          var amount = 0;
                          for(i = 9; i < 45; ++i) {
                              stack = mc.thePlayer.inventoryContainer.getSlot(i).getStack();
                              if (stack != null && stack instanceof Arrow) {
                                  amount += stack.stackSize;
                              }
                          }
                          return amount;
                      }
                      
                      dntdbtD Offline
                      dntdbtD Offline
                      dntdbt
                      wrote on last edited by dntdbt
                      #9

                      @auto-reply-bot think, getStack() breaks the instance of arrow
                      try this

                      var Arrow = Java.type("net.minecraft.item.ItemArrow");
                      
                      function getArrowsAmount() {
                          var amount = 0;
                          for (i = 9; i < 45; ++i) {
                              var slot = mc.thePlayer.intentoryContainer.getSlot(i);
                              if (slot != null && slot instanceof Arrow) {
                                  amount += slot.stack.stackSize;
                              }
                          }
                          return amount;
                      }
                      
                      C 1 Reply Last reply
                      0
                      • dntdbtD dntdbt

                        @auto-reply-bot think, getStack() breaks the instance of arrow
                        try this

                        var Arrow = Java.type("net.minecraft.item.ItemArrow");
                        
                        function getArrowsAmount() {
                            var amount = 0;
                            for (i = 9; i < 45; ++i) {
                                var slot = mc.thePlayer.intentoryContainer.getSlot(i);
                                if (slot != null && slot instanceof Arrow) {
                                    amount += slot.stack.stackSize;
                                }
                            }
                            return amount;
                        }
                        
                        C Offline
                        C Offline
                        Co丶Dynamic
                        wrote on last edited by
                        #10

                        @dntdbt 捕获.PNG
                        that's strange
                        no ItemArrow at all

                        dntdbtD 1 Reply Last reply
                        0
                        • DreamWasFuckedD Offline
                          DreamWasFuckedD Offline
                          DreamWasFucked
                          wrote on last edited by
                          #11

                          net.minecraft.item.ItemArrow does not exist

                          1 Reply Last reply
                          0
                          • C Co丶Dynamic

                            @dntdbt 捕获.PNG
                            that's strange
                            no ItemArrow at all

                            dntdbtD Offline
                            dntdbtD Offline
                            dntdbt
                            wrote on last edited by dntdbt
                            #12

                            @co丶dynamic was looking in 1.12 sources
                            weird, there are ItemArrow exists

                            1 Reply Last reply
                            0
                            • Q Offline
                              Q Offline
                              quadro
                              wrote on last edited by quadro
                              #13

                              net.minecraft.init.Items -> public static final Item arrow
                              recommended reading: minecraft source code

                              edit: also accomplishable by checking unlocalized item name

                              1 Reply Last reply
                              0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              About
                              • Terms of Service
                              • Privacy Policy
                              • Status
                              • Contact Us
                              Downloads
                              • Releases
                              • Source code
                              • License
                              Docs
                              • Tutorials
                              • CustomHUD
                              • AutoSettings
                              • ScriptAPI
                              Community
                              • Forum
                              • Guilded
                              • YouTube
                              • Twitter
                              • D.Tube
                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups