cpw.mods.fml.common.registry

## Class FMLControlledNamespacedRegistry<I>

- java.lang.Object
- - net.minecraft.util.RegistrySimple
  - - net.minecraft.util.RegistryNamespaced
    - - cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry<I>

- All Implemented Interfaces:
    java.lang.Iterable, IObjectIntIterable, IRegistry

      public class FMLControlledNamespacedRegistry<I>
      extends RegistryNamespaced

- - ### Field Summary

    - ### Fields inherited from class net.minecraft.util.RegistryNamespaced

      `field_148758_b, underlyingIntegerMap`

    - ### Fields inherited from class net.minecraft.util.RegistrySimple

      `registryObjects`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addObject(int id, java.lang.String name, java.lang.Object thing)` Deprecated. register through `GameRegistry` instead.
    `boolean` | `contains(java.lang.String itemName)` Deprecated. use containsKey instead
    `boolean` | `containsKey(java.lang.String name)` Determine if the registry has an entry for the specified name.
    `I` | `get(int id)` Deprecated. use getObjectById instead
    `I` | `get(java.lang.String name)` Deprecated. use getObject instead
    `java.util.Map<java.lang.String,java.lang.String>` | `getAliases()`
    `I` | `getDefaultValue()`
    `int` | `getId(I thing)` Get the id for the specified object.
    `int` | `getId(java.lang.String itemName)` Get the id for the specified object.
    `I` | `getObject(java.lang.String name)` Fetch the object identified by the specified name or the default object.
    `I` | `getObjectById(int id)` Fetch the object identified by the specified id or the default object.
    `I` | `getRaw(int id)` Get the object identified by the specified id.
    `I` | `getRaw(java.lang.String name)` Get the object identified by the specified name.
    `void` | `putObject(java.lang.Object objName, java.lang.Object obj)` Deprecated. register through `GameRegistry` instead.
    `void` | `serializeInto(java.util.Map<java.lang.String,java.lang.Integer> idMapping)`
    `java.lang.Iterable<I>` | `typeSafeIterable()`

    - ### Methods inherited from class net.minecraft.util.RegistryNamespaced

      `containsId, containsKey, createUnderlyingMap, ensureNamespaced, getIDForObject, getNameForObject, getObject, iterator`

    - ### Methods inherited from class net.minecraft.util.RegistrySimple

      `getKeys`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### addObject

          @Deprecated
          public void addObject(int id,
                                  java.lang.String name,
                                  java.lang.Object thing)

      Deprecated. register through `GameRegistry` instead.
      Add an object to the registry, trying to use the specified id.
      Overrides:
        `addObject` in class `RegistryNamespaced`

    - #### putObject

          @Deprecated
          public void putObject(java.lang.Object objName,
                                  java.lang.Object obj)

      Deprecated. register through `GameRegistry` instead.
      DANGEROUS! EVIL! DO NOT USE!
      Specified by:
        `putObject` in interface `IRegistry`
      Overrides:
        `putObject` in class `RegistrySimple`

    - #### getObject

          public I getObject(java.lang.String name)

      Fetch the object identified by the specified name or the default object. For blocks the default object is the air block, for items it's null.
      Overrides:
        `getObject` in class `RegistryNamespaced`
      Parameters:
        `name` - Unique name identifying the object.
      Returns:
        Registered object of the default object if it wasn't found-

    - #### getObjectById

          public I getObjectById(int id)

      Fetch the object identified by the specified id or the default object. For blocks the default object is the air block, for items it's null.
      Overrides:
        `getObjectById` in class `RegistryNamespaced`
      Parameters:
        `id` - ID identifying the object.
      Returns:
        Registered object of the default object if it wasn't found-

    - #### get

          @Deprecated
          public I get(int id)

      Deprecated. use getObjectById instead

    - #### get

          @Deprecated
          public I get(java.lang.String name)

      Deprecated. use getObject instead

    - #### getId

          public int getId(I thing)

      Get the id for the specified object. Don't hold onto the id across the world, it's being dynamically re-mapped as needed. Usually the name should be used instead of the id, if using the Block/Item object itself is not suitable for the task.
      Parameters:
        `thing` - Block/Item object.
      Returns:
        Block/Item id or -1 if it wasn't found.

    - #### getRaw

          public I getRaw(int id)

      Get the object identified by the specified id.
      Parameters:
        `id` - Block/Item id.
      Returns:
        Block/Item object or null if it wasn't found.

    - #### getRaw

          public I getRaw(java.lang.String name)

      Get the object identified by the specified name.
      Parameters:
        `name` - Block/Item name.
      Returns:
        Block/Item object or null if it wasn't found.

    - #### containsKey

          public boolean containsKey(java.lang.String name)

      Determine if the registry has an entry for the specified name. Aliased names will be resolved as well.
      Overrides:
        `containsKey` in class `RegistryNamespaced`
      Parameters:
        `name` - Object name to check.
      Returns:
        true if a matching entry was found.

    - #### getId

          public int getId(java.lang.String itemName)

      Get the id for the specified object. Don't hold onto the id across the world, it's being dynamically re-mapped as needed. Usually the name should be used instead of the id, if using the Block/Item object itself is not suitable for the task.
      Parameters:
        `itemName` - Block/Item registry name.
      Returns:
        Block/Item id or -1 if it wasn't found.

    - #### contains

          @Deprecated
          public boolean contains(java.lang.String itemName)

      Deprecated. use containsKey instead

    - #### typeSafeIterable

          public java.lang.Iterable<I> typeSafeIterable()

    - #### serializeInto

          public void serializeInto(java.util.Map<java.lang.String,java.lang.Integer> idMapping)

    - #### getAliases

          public java.util.Map<java.lang.String,java.lang.String> getAliases()

    - #### getDefaultValue

          public I getDefaultValue()