Package net.minecraft.entity
Class DataWatcher
- java.lang.Object
-
- net.minecraft.entity.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)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataWatcher.WatchableObject
-
Constructor Summary
Constructors Constructor Description DataWatcher(Entity owner)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addObject(int id, T object)
void
addObjectByDataType(int id, int type)
+ Add a new object for the DataWatcher to watch, using the specified data type.void
func_111144_e()
java.util.List<DataWatcher.WatchableObject>
getAllWatched()
java.util.List<DataWatcher.WatchableObject>
getChanged()
boolean
getIsBlank()
byte
getWatchableObjectByte(int id)
+ gets the bytevalue of a watchable objectfloat
getWatchableObjectFloat(int id)
int
getWatchableObjectInt(int id)
+ gets a watchable object and returns it as a IntegerItemStack
getWatchableObjectItemStack(int id)
+ Get a watchable object as an ItemStack.Rotations
getWatchableObjectRotations(int id)
short
getWatchableObjectShort(int id)
java.lang.String
getWatchableObjectString(int id)
+ gets a watchable object and returns it as a Stringboolean
hasObjectChanged()
+ true if one or more object was changedstatic java.util.List<DataWatcher.WatchableObject>
readWatchedListFromPacketBuffer(PacketBuffer buffer)
+ Reads a list of watched objects (entity attribute of type {byte, short, int, float, string, ItemStack, ChunkCoordinates}) from the supplied PacketBuffervoid
setObjectWatched(int id)
<T> void
updateObject(int id, T newData)
void
updateWatchedObjectsFromList(java.util.List<DataWatcher.WatchableObject> parList)
void
writeTo(PacketBuffer buffer)
static void
writeWatchedListToPacketBuffer(java.util.List<DataWatcher.WatchableObject> objectsList, PacketBuffer buffer)
+ Writes the list of watched objects (entity attribute of type {byte, short, int, float, string, ItemStack, ChunkCoordinates}) to the specified PacketBuffer
-
-
-
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
-
getChanged
public java.util.List<DataWatcher.WatchableObject> getChanged()
-
writeTo
public void writeTo(PacketBuffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
getAllWatched
public java.util.List<DataWatcher.WatchableObject> getAllWatched()
-
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
-
updateWatchedObjectsFromList
public void updateWatchedObjectsFromList(java.util.List<DataWatcher.WatchableObject> parList)
-
getIsBlank
public boolean getIsBlank()
-
func_111144_e
public void func_111144_e()
-
-