Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Check all items in a chest for a specific item [1.8.9]
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
portalthree

Check all items in a chest for a specific item [1.8.9]

By portalthree, November 28, 2020 in Modder Support

  • Start new topic

Recommended Posts

portalthree    0

portalthree

portalthree    0

  • Tree Puncher
  • portalthree
  • Members
  • 0
  • 3 posts
Posted November 28, 2020 (edited)
if (ToggleCommand.) {
    if (Minecraft.getMinecraft().instanceof GuiChest) {
        GuiChest = (GuiChest) Minecraft.getMinecraft().;
        ContainerChest = (ContainerChest) .;
        String = .getLowerChestInventory().getDisplayName().getUnformattedText();
        if (.trim().startsWith("Select all the SILVER items!")) {
            System.out.println();
            if(cc.getLowerChestInventory().getStackInSlot().getDisplayName().startsWith("Silver")){
                System.out.println("Silver block detected");
            } else {
                return;
            }
        } else {
            return;
        }
    }
}

I need to check all the items in cc to see if there is an item wich name start with "Silver", if i use getStackInSlot() i have to specify wich slot i want to check and that's not effecient since i'll have to copy that lign like 40 times.

Edited November 28, 2020 by portalthree

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1798 posts
Posted November 28, 2020

that is not valid java

 

you are using a unsupported version of minecraft

 

Share this post


Link to post
Share on other sites

portalthree    0

portalthree

portalthree    0

  • Tree Puncher
  • portalthree
  • Members
  • 0
  • 3 posts
Posted November 28, 2020
10 minutes ago, loordgek said:

that is not valid java

 

you are using a unsupported version of minecraft

 

Where am i supposed to get 1.8.9 support then?

Share this post


Link to post
Share on other sites

loordgek    174

loordgek

loordgek    174

  • World Shaper
  • loordgek
  • Members
  • 174
  • 1798 posts
Posted November 28, 2020

why do need it ?

Share this post


Link to post
Share on other sites

portalthree    0

portalthree

portalthree    0

  • Tree Puncher
  • portalthree
  • Members
  • 0
  • 3 posts
Posted November 28, 2020
2 minutes ago, loordgek said:

why do need it ?

I'm making a mod to make hypixel skyblock players life a bit easier ig and this would save a bunch of time to everyone

Share this post


Link to post
Share on other sites

diesieben07    7597

diesieben07

diesieben07    7597

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7597
  • 55122 posts
Posted November 28, 2020

1.8 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Gubipe
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By Gubipe · Posted 39 minutes ago

      I am making the two mods with the same functionality. One is 1.16.4 and the other is 1.8.9. The current one is 1.8.9 and then I shall try to port it over to 1.16.4
    • poopoodice
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By poopoodice · Posted 56 minutes ago

      It's for animation only. Btw what version are you using?
    • TheDonkey_King
      I just started modding minecraft and I thought i had finished modding it but Titanium mod isn't loading properly. Can someone help me fix this?

      By TheDonkey_King · Posted 1 hour ago

      What file?
    • BIGDog8808
      HELP! WORLD WONT WORK

      By BIGDog8808 · Posted 1 hour ago

      so is there anyway that i can copy the world and use it with forge  
    • mightymoy
      Cant craft items in modded server

      By mightymoy · Posted 1 hour ago

      we arent using Opti fine anymore and no specific reason we had just picked 1.16.1 
  • Topics

    • Gubipe
      2
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By Gubipe
      Started 3 hours ago

    • TheDonkey_King
      4
      I just started modding minecraft and I thought i had finished modding it but Titanium mod isn't loading properly. Can someone help me fix this?

      By TheDonkey_King
      Started 7 hours ago

    • BIGDog8808
      10
      HELP! WORLD WONT WORK

      By BIGDog8808
      Started 7 hours ago

    • mightymoy
      8
      Cant craft items in modded server

      By mightymoy
      Started Yesterday at 03:00 AM

    • tinyborisYT
      2
      [1.12.2] Crash at Launch, No clue why

      By tinyborisYT
      Started 2 hours ago

  • Who's Online (See full list)

    • TheDonkey_King
    • Caffeinated Pinkie
    • RafaMv
    • Veiro
    • LexManos
    • Frog :)
    • CaelTheQuail
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Check all items in a chest for a specific item [1.8.9]
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community