The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
Managers
By Guest on 11th October 2018 02:18:24 AM | Syntax: JAVA | Views: 1



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. import net.minecraft.client.Minecraft;
  2. import java.util.ArrayList;
  3. import java.util.HashMap;
  4. import java.io.BufferedInputStream;
  5. import java.io.File;
  6. import java.io.FileInputStream;
  7. import java.io.InputStream;
  8.  
  9. public class MCExtendedManagers {
  10.  
  11.    public static final Minecraft mc = ModLoader.getMinecraftInstance();
  12.  
  13.    public static class MCExtendedManagers$ItemManager {
  14.  
  15.    private static int currentIndex = 0;
  16.    private static HashMap pathToIdMap = new HashMap();
  17.    private static ArrayList items = new ArrayList();
  18.  
  19.  
  20.    public static String getItemName(int itemNum) {
  21.       return (String)items.get(itemNum);
  22.    }
  23.  
  24.    public static int getItem(int itemNum) {
  25.       return MCExtendedManagers.mc.p.b((String)items.get(itemNum));
  26.    }
  27.  
  28.    public static int getItemNumBasedonPath(String path) {
  29.       return ((Integer)pathToIdMap.get(path)).intValue();
  30.    }
  31.  
  32.    public static int registerItem(String path) {
  33.       items.add(currentIndex, path);
  34.       pathToIdMap.put(path, Integer.valueOf(currentIndex));
  35.       return currentIndex++;
  36.    }
  37.  
  38.    public static int getTotal() {
  39.       return items.size();
  40.    }
  41.  
  42.    static {
  43.       registerItem("/gui/items.png");
  44.    }
  45.  }
  46.  
  47. }



  • Recent Pastes