net.minecraft.entity

## Class DataWatcher

- java.lang.Object
- - net.minecraft.entity.DataWatcher

-     public class DataWatcher
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataWatcher()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addObject(int par1, Object par2Obj)` adds a new object to dataWatcher to watch, to update an already existing object see updateObject.
    `void` | `addObjectByDataType(int par1, int par2)` Add a new object for the DataWatcher to watch, using the specified data type.
    `List` | `getAllWatched()`
    `boolean` | `getIsBlank()`
    `byte` | `getWatchableObjectByte(int par1)` gets the bytevalue of a watchable object
    `int` | `getWatchableObjectInt(int par1)` gets a watchable object and returns it as a Integer
    `ItemStack` | `getWatchableObjectItemStack(int par1)` Get a watchable object as an ItemStack.
    `short` | `getWatchableObjectShort(int par1)`
    `String` | `getWatchableObjectString(int par1)` gets a watchable object and returns it as a String
    `boolean` | `hasChanges()`
    `static List` | `readWatchableObjects(DataInputStream par0DataInputStream)`
    `void` | `setObjectWatched(int par1)`
    `List` | `unwatchAndReturnAllWatched()`
    `void` | `updateObject(int par1, Object par2Obj)` updates an already existing object
    `void` | `updateWatchedObjectsFromList(List par1List)`
    `static void` | `writeObjectsInListToStream(List par0List, DataOutputStream par1DataOutputStream)` writes every object in passed list to dataoutputstream, terminated by 0x7F
    `void` | `writeWatchableObjects(DataOutputStream par1DataOutputStream)`

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

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

- - ### Constructor Detail

    - #### DataWatcher

          public DataWatcher()

  - ### Method Detail

    - #### addObject

          public void addObject(int par1,
                       Object par2Obj)

      adds a new object to dataWatcher to watch, to update an already existing object see updateObject. Arguments: data Value Id, Object to add

    - #### addObjectByDataType

          public void addObjectByDataType(int par1,
                                 int par2)

      Add a new object for the DataWatcher to watch, using the specified data type.

    - #### getWatchableObjectByte

          public byte getWatchableObjectByte(int par1)

      gets the bytevalue of a watchable object

    - #### getWatchableObjectShort

          public short getWatchableObjectShort(int par1)

    - #### getWatchableObjectInt

          public int getWatchableObjectInt(int par1)

      gets a watchable object and returns it as a Integer

    - #### getWatchableObjectString

          public String getWatchableObjectString(int par1)

      gets a watchable object and returns it as a String

    - #### getWatchableObjectItemStack

          public ItemStack getWatchableObjectItemStack(int par1)

      Get a watchable object as an ItemStack.

    - #### updateObject

          public void updateObject(int par1,
                          Object par2Obj)

      updates an already existing object

    - #### setObjectWatched

          public void setObjectWatched(int par1)

    - #### hasChanges

          public boolean hasChanges()

    - #### writeObjectsInListToStream

          public static void writeObjectsInListToStream(List par0List,
                                        DataOutputStream par1DataOutputStream)
                                                 throws IOException

      writes every object in passed list to dataoutputstream, terminated by 0x7F
      Throws:
        `IOException`

    - #### unwatchAndReturnAllWatched

          public List unwatchAndReturnAllWatched()

    - #### writeWatchableObjects

          public void writeWatchableObjects(DataOutputStream par1DataOutputStream)
                                     throws IOException

      Throws:
        `IOException`

    - #### getAllWatched

          public List getAllWatched()

    - #### readWatchableObjects

          public static List readWatchableObjects(DataInputStream par0DataInputStream)
                                           throws IOException

      Throws:
        `IOException`

    - #### updateWatchedObjectsFromList

          public void updateWatchedObjectsFromList(List par1List)

    - #### getIsBlank

          public boolean getIsBlank()