public class WrappedWatchableObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected net.minecraft.server.WatchableObject |
handle |
protected StructureModifier<java.lang.Object> |
modifier |
Constructor and Description |
---|
WrappedWatchableObject(net.minecraft.server.WatchableObject handle) |
Modifier and Type | Method and Description |
---|---|
boolean |
getDirtyState()
Retrieve whether or not the value must be synchronized with the client.
|
net.minecraft.server.WatchableObject |
getHandle()
Retrieves the underlying watchable object.
|
int |
getIndex()
Retrieve the index of this watchable object.
|
java.lang.Class<?> |
getType()
Retrieve the correct super type of the current value.
|
int |
getTypeID()
Retrieve the type ID of a watchable object.
|
java.lang.Object |
getValue()
Read the value field.
|
void |
setDirtyState(boolean dirty)
Set whether or not the value must be synchronized with the client.
|
void |
setIndex(int index)
Set the the index of this watchable object.
|
void |
setTypeID(int id)
Set the type ID of a watchable object.
|
void |
setValue(java.lang.Object newValue)
Update the value field.
|
void |
setValue(java.lang.Object newValue,
boolean updateClient)
Update the value field.
|
protected net.minecraft.server.WatchableObject handle
protected StructureModifier<java.lang.Object> modifier
public WrappedWatchableObject(net.minecraft.server.WatchableObject handle)
public net.minecraft.server.WatchableObject getHandle()
public java.lang.Class<?> getType() throws FieldAccessException
FieldAccessException
- Unable to read values.public int getIndex() throws FieldAccessException
FieldAccessException
- Reflection failed.public void setIndex(int index) throws FieldAccessException
index
- - the new object index.FieldAccessException
- Reflection failed.public int getTypeID() throws FieldAccessException
FieldAccessException
- Reflection failed.public void setTypeID(int id) throws FieldAccessException
id
- - the new ID.FieldAccessException
- Reflection failed.public void setValue(java.lang.Object newValue) throws FieldAccessException
newValue
- - new value.FieldAccessException
- Unable to use reflection.public void setValue(java.lang.Object newValue, boolean updateClient) throws FieldAccessException
newValue
- - new value.updateClient
- - whether or not to update listening clients.FieldAccessException
- Unable to use reflection.public java.lang.Object getValue() throws FieldAccessException
FieldAccessException
- Unable to use reflection.public void setDirtyState(boolean dirty) throws FieldAccessException
dirty
- - TRUE if the value should be synchronized, FALSE otherwise.FieldAccessException
- Unable to use reflection.public boolean getDirtyState() throws FieldAccessException
FieldAccessException
- Unable to use reflection.