Class DataWatcher


  • public class DataWatcher
    extends java.lang.Object
    + This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
    • Constructor Detail

      • DataWatcher

        public DataWatcher​(Entity owner)
    • Method Detail

      • addObject

        public <T> void addObject​(int id,
                                  T object)
      • addObjectByDataType

        public void addObjectByDataType​(int id,
                                        int type)
        + Add a new object for the DataWatcher to watch, using the specified data type.
      • getWatchableObjectByte

        public byte getWatchableObjectByte​(int id)
        + gets the bytevalue of a watchable object
      • getWatchableObjectShort

        public short getWatchableObjectShort​(int id)
      • getWatchableObjectInt

        public int getWatchableObjectInt​(int id)
        + gets a watchable object and returns it as a Integer
      • getWatchableObjectFloat

        public float getWatchableObjectFloat​(int id)
      • getWatchableObjectString

        public java.lang.String getWatchableObjectString​(int id)
        + gets a watchable object and returns it as a String
      • getWatchableObjectItemStack

        public ItemStack getWatchableObjectItemStack​(int id)
        + Get a watchable object as an ItemStack.
      • getWatchableObjectRotations

        public Rotations getWatchableObjectRotations​(int id)
      • updateObject

        public <T> void updateObject​(int id,
                                     T newData)
      • setObjectWatched

        public void setObjectWatched​(int id)
      • hasObjectChanged

        public boolean hasObjectChanged()
        + true if one or more object was changed
      • writeWatchedListToPacketBuffer

        public static void writeWatchedListToPacketBuffer​(java.util.List<DataWatcher.WatchableObject> objectsList,
                                                          PacketBuffer buffer)
                                                   throws java.io.IOException
        + Writes the list of watched objects (entity attribute of type {byte, short, int, float, string, ItemStack, ChunkCoordinates}) to the specified PacketBuffer
        Throws:
        java.io.IOException
      • writeTo

        public void writeTo​(PacketBuffer buffer)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • readWatchedListFromPacketBuffer

        public static java.util.List<DataWatcher.WatchableObject> readWatchedListFromPacketBuffer​(PacketBuffer buffer)
                                                                                           throws java.io.IOException
        + Reads a list of watched objects (entity attribute of type {byte, short, int, float, string, ItemStack, ChunkCoordinates}) from the supplied PacketBuffer
        Throws:
        java.io.IOException
      • getIsBlank

        public boolean getIsBlank()
      • func_111144_e

        public void func_111144_e()