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
  • 1796 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
  • 1796 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    7586

diesieben07

diesieben07    7586

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7586
  • 54921 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

    • Heinzchen
      Update mod to 1.16.5

      By Heinzchen · Posted 15 minutes ago

      Hi. I am  new to programming mods. I have a mod for the minecraft version 1.15.2. But I do not know how to update it to the newest minecraft version (1.16.5).
    • diesieben07
      Forge error mid-loading (Redstone flux, 1.12.2)

      By diesieben07 · Posted 21 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • amundo
      Forge error mid-loading (Redstone flux, 1.12.2)

      By amundo · Posted 23 minutes ago

      Hey, i have alot of mods installed, and one of them requires redstone flux. I read that i should add "-Dcofh.rf.crashOnOldAPI=false" but it doesn't work, i tried deleting the whole JVM arguments and just adding onto the "original" ones but it just won't work. Can someone help me with this?
    • cadbane86140
      Minecraft: Survival Island Episode 6- Beds, Mineshafts and more Stupidity!

      By cadbane86140 · Posted 24 minutes ago

      Hello There! In today's Survival Island episode we FINALLY make beds, yeah I know it's been like 5 episodes and that was the first challenge haha but we got it! We also explore the mineshaft we found last episode and we also discuss our next big project! There are so many hilarious moments in this episode that I know you guys are gonna love! I hope you all enjoy this video and if you did don't forget to like and sub for more survival island in the future!   
    • Gęsioł
      1.16.4 "The Vanilla Experience" Server problem

      By Gęsioł · Posted 34 minutes ago

      Well i removed mods thaw was causing problems and it works...
  • Topics

    • Heinzchen
      0
      Update mod to 1.16.5

      By Heinzchen
      Started 15 minutes ago

    • amundo
      1
      Forge error mid-loading (Redstone flux, 1.12.2)

      By amundo
      Started 23 minutes ago

    • cadbane86140
      0
      Minecraft: Survival Island Episode 6- Beds, Mineshafts and more Stupidity!

      By cadbane86140
      Started 24 minutes ago

    • Gęsioł
      2
      1.16.4 "The Vanilla Experience" Server problem

      By Gęsioł
      Started 1 hour ago

    • Forix
      0
      [1.16.4] Multiple worlds

      By Forix
      Started 40 minutes ago

  • Who's Online (See full list)

    • TheCapriKing
    • WildHeart
    • BGames
    • JeffMan
    • Heinzchen
    • Klarks
    • XmasAspire
    • diesieben07
    • stray00000009
    • stray
    • loordgek
    • Leafy Vine
    • Microcellule
    • RedBobKid
    • amundo
    • Forix
  • 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