public class OldGenModeValue extends java.lang.Object implements PropertyValue<EnumOldGenMode>
Constructor and Description |
---|
OldGenModeValue(EnumOldGenMode 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 |
EnumOldGenMode |
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(EnumOldGenMode 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, wait
set
public OldGenModeValue(EnumOldGenMode value)
public EnumOldGenMode get()
PropertyValue
get
in interface PropertyValue<EnumOldGenMode>
public void update(EnumOldGenMode integer)
PropertyValue
update
in interface PropertyValue<EnumOldGenMode>
integer
- The new valuepublic void encode(net.minecraft.network.PacketBuffer buffer)
PropertyValue
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)
methodencode
in interface PropertyValue<EnumOldGenMode>
buffer
- The packet buffer being written topublic void decode(net.minecraft.network.PacketBuffer buffer)
PropertyValue
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)
methoddecode
in interface PropertyValue<EnumOldGenMode>
buffer
- The packet buffer being read frompublic void write(java.lang.String key, net.minecraft.nbt.CompoundNBT compound)
PropertyValue
CompoundNBT
with the specified key
Only implement if you want the battle rule/property to be persistentwrite
in interface PropertyValue<EnumOldGenMode>
key
- The key being stored undercompound
- The compound being written topublic void read(java.lang.String key, net.minecraft.nbt.CompoundNBT compound)
PropertyValue
CompoundNBT
with the specified key
Only implement if you want the battle rule/property to be persistentread
in interface PropertyValue<EnumOldGenMode>
key
- The key being stored undercompound
- The compound being read from