Package cpw.mods.fml.common.registry.GameRegistry

Examples of cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier


    return map;
  }

  private static void fillBasicProperties(Map<String, Object> map, Item item, ItemStack itemstack) {
    UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor(item);
    Preconditions.checkNotNull(id, "Invalid item stack: %s", itemstack);
    map.put("id", id.toString());
    map.put("name", id.name);
    map.put("mod_id", id.modId);
    map.put("display_name", getNameForItemStack(itemstack));
    map.put("raw_name", getRawNameForStack(itemstack));
    map.put("qty", itemstack.stackSize);
View Full Code Here


  private final List<UniqueIdentifier> blackList = new ArrayList<GameRegistry.UniqueIdentifier>();

  private TravelController() {
    String[] blackListNames = Config.travelStaffBlinkBlackList;
    for(String name : blackListNames) {
      blackList.add(new UniqueIdentifier(name))
    }   
  }
View Full Code Here

    }
    return false;
  }

  private boolean isBlackListedBlock(EntityPlayer player, MovingObjectPosition pos, Block hitBlock) {
    UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor(hitBlock);
    if(ui == null) {
      return false;
    }
    return blackList.contains(ui);
  }
View Full Code Here

  protected BlockPoweredSpawner() {
    super(ModObject.blockPoweredSpawner, TilePoweredSpawner.class);

    String[] blackListNames = Config.brokenSpawnerToolBlacklist;
    for (String name : blackListNames) {
      toolBlackList.add(new UniqueIdentifier(name));
    }
  }
View Full Code Here

    if(itemStack == null || itemStack.getItem() == null) {
      setMod(index, (String) null);
      return null;
    }
    UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor(itemStack.getItem());
    if(ui == null) {
      setMod(index, (String) null);
      return null;
    }
    String targetMod = ui.modId;
View Full Code Here

  @Override
  public boolean doesItemPassFilter(NetworkedInventory inv, ItemStack item) {
    if(item == null || item.getItem() == null) {
      return false;
    }
    UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor(item.getItem());
    if(ui == null) {
      return false;
    }
    String targetMod = ui.modId;
    if(targetMod == null) {
View Full Code Here

  private static final IWikiProvider FALLBACK_PROVIDER = new SimpleWikiProvider("FTB Wiki", "http://wiki.feed-the-beast.com/%s");

  private static final Map<String, IWikiProvider> modWikis = new HashMap();

  public static IWikiProvider getWikiFor(Block block) {
    UniqueIdentifier mod = GameRegistry.findUniqueIdentifierFor(block);
    return getWikiFor(mod.modId.toLowerCase());
  }
View Full Code Here

    }

    private static void parseModItems() {
        HashMap<String, ItemStackSet> modSubsets = new HashMap<String, ItemStackSet>();
        for (Item item : (Iterable<Item>) Item.itemRegistry) {
            UniqueIdentifier ident = GameRegistry.findUniqueIdentifierFor(item);
            if(ident == null) {
                NEIClientConfig.logger.error("Failed to find identifier for: "+item);
                continue;
            }
            String modId = GameRegistry.findUniqueIdentifierFor(item).modId;
View Full Code Here

        public Map<Integer, String> getBlockIDMap() {
            Map<Integer, String> map = new HashMap<Integer, String>();
            for (int i = 0; i < 4096; i++) {
                Block b = getBlockByID(i);
                if (b == null) continue;
                UniqueIdentifier ui = GameRegistry.findUniqueIdentifierFor(b);
                if (ui != null) {
                    map.put(i, ui.modId + ":" + ui.name);
                }
            }
            return map;
View Full Code Here

        public Map<String, Integer> getBlockUniqueIDMap() {
            HashMap<String, Integer> map = new HashMap<String, Integer>();
            for (int i = 0; i < 4096; i++) {
                Block b = getBlockByID(i);
                if (b == null) continue;
                UniqueIdentifier ui = null;
                try {
                    ui = GameRegistry.findUniqueIdentifierFor(b);
                } catch (Exception x) {
                    Log.warning("Exception caught reading unique ID for block " + i);
                }
View Full Code Here

TOP

Related Classes of cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.