java.lang.Object
com.pixelmonmod.pixelmon.battles.api.rules.value.ClausesValue
All Implemented Interfaces:
PropertyValue<Set<BattleClause>>

public class ClausesValue extends Object implements PropertyValue<Set<BattleClause>>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    decode(net.minecraft.network.FriendlyByteBuf buffer)
    Decodes the data from the given FriendlyByteBuf 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(FriendlyByteBuf) method
    void
    encode(net.minecraft.network.FriendlyByteBuf buffer)
    Encodes the data to the given FriendlyByteBuf 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(FriendlyByteBuf) method
    get()
    Gets the current data stored in the value
    void
    read(String key, net.minecraft.nbt.CompoundTag compound)
    Reads a value from the CompoundTag with the specified key Only implement if you want the battle rule/property to be persistent
    void
    The method used for directly setting the stored value to an instance of the type, T, specified by the class
    void
    write(String key, net.minecraft.nbt.CompoundTag compound)
    Writes the given value to the CompoundTag with the specified key Only implement if you want the battle rule/property to be persistent

    Methods 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

  • Method Details

    • get

      public Set<BattleClause> get()
      Description copied from interface: PropertyValue
      Gets the current data stored in the value
      Specified by:
      get in interface PropertyValue<Set<BattleClause>>
      Returns:
      The data
    • update

      public void update(Set<BattleClause> integer)
      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 interface PropertyValue<Set<BattleClause>>
      Parameters:
      integer - The new value
    • encode

      public void encode(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from interface: PropertyValue
      Encodes the data to the given FriendlyByteBuf 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(FriendlyByteBuf) method
      Specified by:
      encode in interface PropertyValue<Set<BattleClause>>
      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 given FriendlyByteBuf 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(FriendlyByteBuf) method
      Specified by:
      decode in interface PropertyValue<Set<BattleClause>>
      Parameters:
      buffer - The packet buffer being read from
    • write

      public void write(String key, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: PropertyValue
      Writes the given value to the CompoundTag with the specified key Only implement if you want the battle rule/property to be persistent
      Specified by:
      write in interface PropertyValue<Set<BattleClause>>
      Parameters:
      key - The key being stored under
      compound - The compound being written to
    • read

      public void read(String key, net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: PropertyValue
      Reads a value from the CompoundTag with the specified key Only implement if you want the battle rule/property to be persistent
      Specified by:
      read in interface PropertyValue<Set<BattleClause>>
      Parameters:
      key - The key being stored under
      compound - The compound being read from