CCBlueX Forum

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

    plz help

    ScriptAPI
    6
    14
    350
    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.
    • K
      KnechtRobert5 last edited by

      i have a problem with these Creative Tabs
      this is what my script looks like:

      /// api_version=2
      var script = registerScript({
          name: “ExamplePfiff“,
          version: “0.0“,
          authors: [“KnechtRobert5“]
      });
      script.registerTab({
          name: “Pfiff“,
          icon: “apple“,
          items: [
               Item.create(“wooden_button 1 0“)
          ]
      });
      

      my script is much more complicated but the error also occurs when its just this simple version.
      if i click on the arrow that leads me to the second section of the creative tabs my game crashes and i get a “java.lang.NoSuchFieldException: apple“
      i believe it has to do with the icon?

      im not that experienced with scripting and coding in general, but i think i did nothing wrong.
      if im not dumb this looks almost exactly like the examples that are shown on the liquidbounce.net website.

      1 Reply Last reply Reply Quote 0
      • U
        ultraskid last edited by

        try using item IDs

        1 Reply Last reply Reply Quote 0
        • K
          KnechtRobert5 last edited by

          what do you mean by that?
          minecraft:apple gave me the same error but instead of apple it said minecraft:apple in the crash report

          1 Reply Last reply Reply Quote 0
          • superblaubeere27
            superblaubeere27 Moderator last edited by

            Replace apple with field_151034_e. You have to use the obfuscated name due to a twerk in the ScriptAPI, that will hopefully be fixed soon

            infAura K 2 Replies Last reply Reply Quote 1
            • infAura
              infAura @superblaubeere27 last edited by

              @superblaubeere27 twerk hmmmmmmmm

              1 Reply Last reply Reply Quote 0
              • K
                KnechtRobert5 @superblaubeere27 last edited by KnechtRobert5

                @superblaubeere27 thanks 🙂

                edit: i didnt especially want an apple as the icon and i dont want to bother you with giving me every single obfuscated name but is there a way for me to know which item (?) equals which obfuscated name?

                C 1 Reply Last reply Reply Quote 0
                • C
                  commandblock2 @KnechtRobert5 last edited by commandblock2

                  @KnechtRobert5 .minecraft/LiquidBounce-1.8/mcp-stable_22.srg
                  Edit if you can't find it on your computer then download it from here, that's where LB downloads the file.
                  Here is what it looks like

                  FD: net/minecraft/init/Items/flint_and_steel net/minecraft/init/Items/field_151033_d
                  FD: net/minecraft/init/Items/apple net/minecraft/init/Items/field_151034_e
                  FD: net/minecraft/init/Items/bow net/minecraft/init/Items/field_151031_f
                  
                  K 1 Reply Last reply Reply Quote 1
                  • K
                    KnechtRobert5 @commandblock2 last edited by

                    @commandblock2 found most of what i needed by just STRG + F searching for it in the file, sorry to bother you but how do i find blocks as items? searching for it didnt seem to be helpful in this case

                    C 1 Reply Last reply Reply Quote 0
                    • C
                      commandblock2 @KnechtRobert5 last edited by

                      @KnechtRobert5 wdym by

                      find block as items

                      do you mean something like this

                      FD: net/minecraft/init/Blocks/lapis_block net/minecraft/init/Blocks/field_150368_y
                      FD: net/minecraft/init/Blocks/dispenser net/minecraft/init/Blocks/field_150367_z
                      

                      or somthing idk.

                      also I find this very confusing. If that didn't work then some one might need to update it.

                      Senk Ju K 2 Replies Last reply Reply Quote 0
                      • Senk Ju
                        Senk Ju Admin @commandblock2 last edited by

                        @commandblock2 When I wrote the new script API, I only tested scripts in IntelliJ where Minecraft isn't obfuscated. That's why I didn't notice, it won't work this way outside of IDEs. I haven't updated the example yet because this bug will most likely be fixed in the upcoming version anyway and not many people make scripts which add more inventory tabs.

                        1 Reply Last reply Reply Quote 0
                        • K
                          KnechtRobert5 @commandblock2 last edited by KnechtRobert5

                          @commandblock2 for items e.g. an apple which hasnt a block form, i could just search for apple and find an obfuscated name (?)
                          (FD: net/minecraft/init/Items/apple net/minecraft/init/Items/field_151034_e)
                          which worked and displayed the correct texture but for e.g. a sponge its different idk why but there is no item like structure like that one shown above for that.
                          ive tried varius different obfuscated names that where found when searching sponge but no one seemed to match, anyway if that issue is fixed sooner or later i can probably live with that because i just need a working tab, icons can be adjusted later on.

                          Senk Ju 1 Reply Last reply Reply Quote 0
                          • Senk Ju
                            Senk Ju Admin @KnechtRobert5 last edited by Senk Ju

                            @KnechtRobert5 I will change the way items for tab icons are generated in the next update. Then both the problem with obfuscation and the fact that you cannot use every item should be fixed.

                            https://github.com/CCBlueX/LiquidBounce1.8-Issues/issues/3825

                            SenkJu created this issue in CCBlueX/LiquidBounce1.8-Issues

                            closed [BUG] Setting icon of script tab not working because Minecraft is obfuscated #189

                            K 1 Reply Last reply Reply Quote 0
                            • K
                              KnechtRobert5 @Senk Ju last edited by

                              @Senk-Ju thanks, another thing:
                              idk if thats a bug or if it is intended but if you .reload or .scriptmanager reload and your script adds creative tabs, it reloads the tabs and adds them but does not clear the old ones.
                              this does not have any priority of any kind and i dont think this is a major issue but i just wanted to say that bcs idk if it is intended to work that way.
                              If it is, im sorry ^^

                              Senk Ju 1 Reply Last reply Reply Quote 0
                              • Senk Ju
                                Senk Ju Admin @KnechtRobert5 last edited by

                                @KnechtRobert5 This is a bug. I will try to resolve it as well. I created an issue for it: https://github.com/CCBlueX/LiquidBounce1.8-Issues/issues/3883

                                SenkJu created this issue in CCBlueX/LiquidBounce1.8-Issues

                                open [BUG] Duplicate Script InventoryTabs after reloading #3883

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                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