public class BooleanValue extends java.lang.Object implements PropertyValue<java.lang.Boolean>
| Constructor and Description |
|---|
BooleanValue(boolean value) |
| Modifier and Type | Method and Description |
|---|---|
void |
decode(net.minecraft.network.PacketBuffer buffer)
Decodes the data from the given
PacketBuffer
When being sent to the client the BattleProperty's ID will come first so that when being de-serialized it
can get a default value and then call the PropertyValue.decode(PacketBuffer) method |
void |
encode(net.minecraft.network.PacketBuffer buffer)
Encodes the data to the given
PacketBuffer
When being sent to the client the BattleProperty's ID will come first so that when being de-serialized it
can get a default value and then call the PropertyValue.decode(PacketBuffer) method |
java.lang.Boolean |
get()
Gets the current data stored in the value
|
void |
read(java.lang.String key,
net.minecraft.nbt.CompoundNBT compound)
Reads a value from the
CompoundNBT with the specified key
Only implement if you want the battle rule/property to be persistent |
void |
update(java.lang.Boolean integer)
The method used for directly setting the stored value to an instance of the type, T, specified by the class
|
void |
write(java.lang.String key,
net.minecraft.nbt.CompoundNBT compound)
Writes the given value to the
CompoundNBT with the specified key
Only implement if you want the battle rule/property to be persistent |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetpublic java.lang.Boolean get()
PropertyValueget in interface PropertyValue<java.lang.Boolean>public void update(java.lang.Boolean integer)
PropertyValueupdate in interface PropertyValue<java.lang.Boolean>integer - The new valuepublic void encode(net.minecraft.network.PacketBuffer buffer)
PropertyValuePacketBuffer
When being sent to the client the BattleProperty's ID will come first so that when being de-serialized it
can get a default value and then call the PropertyValue.decode(PacketBuffer) methodencode in interface PropertyValue<java.lang.Boolean>buffer - The packet buffer being written topublic void decode(net.minecraft.network.PacketBuffer buffer)
PropertyValuePacketBuffer
When being sent to the client the BattleProperty's ID will come first so that when being de-serialized it
can get a default value and then call the PropertyValue.decode(PacketBuffer) methoddecode in interface PropertyValue<java.lang.Boolean>buffer - The packet buffer being read frompublic void write(java.lang.String key,
net.minecraft.nbt.CompoundNBT compound)
PropertyValueCompoundNBT with the specified key
Only implement if you want the battle rule/property to be persistentwrite in interface PropertyValue<java.lang.Boolean>key - The key being stored undercompound - The compound being written topublic void read(java.lang.String key,
net.minecraft.nbt.CompoundNBT compound)
PropertyValueCompoundNBT with the specified key
Only implement if you want the battle rule/property to be persistentread in interface PropertyValue<java.lang.Boolean>key - The key being stored undercompound - The compound being read from