Class OldGenModeValue
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.value.OldGenModeValue
- All Implemented Interfaces:
PropertyValue<EnumOldGenMode>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
decode
(net.minecraft.network.FriendlyByteBuf buffer) Decodes the data from the givenFriendlyByteBuf
When being sent to the client theBattleProperty
's ID will come first so that when being de-serialized it can get a default value and then call thePropertyValue.decode(FriendlyByteBuf)
methodvoid
encode
(net.minecraft.network.FriendlyByteBuf buffer) Encodes the data to the givenFriendlyByteBuf
When being sent to the client theBattleProperty
's ID will come first so that when being de-serialized it can get a default value and then call thePropertyValue.decode(FriendlyByteBuf)
methodget()
Gets the current data stored in the valuevoid
Reads a value from theCompoundTag
with the specified key Only implement if you want the battle rule/property to be persistentvoid
update
(EnumOldGenMode integer) The method used for directly setting the stored value to an instance of the type, T, specified by the classvoid
Writes the given value to theCompoundTag
with the specified key Only implement if you want the battle rule/property to be persistentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.battles.api.rules.PropertyValue
set
-
Constructor Details
-
OldGenModeValue
-
-
Method Details
-
get
Description copied from interface:PropertyValue
Gets the current data stored in the value- Specified by:
get
in interfacePropertyValue<EnumOldGenMode>
- Returns:
- The data
-
update
Description copied from interface:PropertyValue
The method used for directly setting the stored value to an instance of the type, T, specified by the class- Specified by:
update
in interfacePropertyValue<EnumOldGenMode>
- Parameters:
integer
- The new value
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PropertyValue
Encodes the data to the givenFriendlyByteBuf
When being sent to the client theBattleProperty
's ID will come first so that when being de-serialized it can get a default value and then call thePropertyValue.decode(FriendlyByteBuf)
method- Specified by:
encode
in interfacePropertyValue<EnumOldGenMode>
- Parameters:
buffer
- The packet buffer being written to
-
decode
public void decode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PropertyValue
Decodes the data from the givenFriendlyByteBuf
When being sent to the client theBattleProperty
's ID will come first so that when being de-serialized it can get a default value and then call thePropertyValue.decode(FriendlyByteBuf)
method- Specified by:
decode
in interfacePropertyValue<EnumOldGenMode>
- Parameters:
buffer
- The packet buffer being read from
-
write
Description copied from interface:PropertyValue
Writes the given value to theCompoundTag
with the specified key Only implement if you want the battle rule/property to be persistent- Specified by:
write
in interfacePropertyValue<EnumOldGenMode>
- Parameters:
key
- The key being stored undercompound
- The compound being written to
-
read
Description copied from interface:PropertyValue
Reads a value from theCompoundTag
with the specified key Only implement if you want the battle rule/property to be persistent- Specified by:
read
in interfacePropertyValue<EnumOldGenMode>
- Parameters:
key
- The key being stored undercompound
- The compound being read from
-