Class ClausesValue
java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.value.ClausesValue
- All Implemented Interfaces:
PropertyValue<Set<BattleClause>>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(net.minecraft.network.FriendlyByteBuf buffer) Decodes the data from the givenFriendlyByteBufWhen 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)methodvoidencode(net.minecraft.network.FriendlyByteBuf buffer) Encodes the data to the givenFriendlyByteBufWhen 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 valuevoidReads a value from theCompoundTagwith the specified key Only implement if you want the battle rule/property to be persistentvoidupdate(Set<BattleClause> integer) The method used for directly setting the stored value to an instance of the type, T, specified by the classvoidWrites the given value to theCompoundTagwith 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, waitMethods inherited from interface com.pixelmonmod.pixelmon.battles.api.rules.PropertyValue
set
-
Constructor Details
-
ClausesValue
-
-
Method Details
-
get
Description copied from interface:PropertyValueGets the current data stored in the value- Specified by:
getin interfacePropertyValue<Set<BattleClause>>- Returns:
- The data
-
update
Description copied from interface:PropertyValueThe method used for directly setting the stored value to an instance of the type, T, specified by the class- Specified by:
updatein interfacePropertyValue<Set<BattleClause>>- Parameters:
integer- The new value
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PropertyValueEncodes the data to the givenFriendlyByteBufWhen 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:
encodein interfacePropertyValue<Set<BattleClause>>- Parameters:
buffer- The packet buffer being written to
-
decode
public void decode(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:PropertyValueDecodes the data from the givenFriendlyByteBufWhen 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:
decodein interfacePropertyValue<Set<BattleClause>>- Parameters:
buffer- The packet buffer being read from
-
write
Description copied from interface:PropertyValueWrites the given value to theCompoundTagwith the specified key Only implement if you want the battle rule/property to be persistent- Specified by:
writein interfacePropertyValue<Set<BattleClause>>- Parameters:
key- The key being stored undercompound- The compound being written to
-
read
Description copied from interface:PropertyValueReads a value from theCompoundTagwith the specified key Only implement if you want the battle rule/property to be persistent- Specified by:
readin interfacePropertyValue<Set<BattleClause>>- Parameters:
key- The key being stored undercompound- The compound being read from
-