Record Class BattleSceneRenderSettings

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.battles.scene.BattleSceneRenderSettings
Record Components:
skyLight - fixed sky light level returned by the scene level
blockLight - fixed block light level returned by the scene level
shade - fixed directional shade value used by the scene level
time - time-of-day behavior for the scene
weather - weather behavior for the scene

public record BattleSceneRenderSettings(int skyLight, int blockLight, float shade, BattleSceneTimeSettings time, BattleSceneWeatherSettings weather) extends Record
Render settings that are resolved on the server from a battle scene definition and sent to the client.
  • Field Details

  • Constructor Details

    • BattleSceneRenderSettings

      public BattleSceneRenderSettings(int skyLight, int blockLight, float shade, BattleSceneTimeSettings time, BattleSceneWeatherSettings weather)
      Creates an instance of a BattleSceneRenderSettings record class.
      Parameters:
      skyLight - the value for the skyLight record component
      blockLight - the value for the blockLight record component
      shade - the value for the shade record component
      time - the value for the time record component
      weather - the value for the weather record component
  • Method Details

    • decode

      public static BattleSceneRenderSettings decode(net.minecraft.network.FriendlyByteBuf buffer)
      Decodes render settings from a battle scene packet.
      Parameters:
      buffer - the packet buffer to read from
      Returns:
      the decoded render settings
    • encode

      public void encode(net.minecraft.network.FriendlyByteBuf buffer)
      Encodes these render settings for a battle scene packet.
      Parameters:
      buffer - the packet buffer to write to
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • skyLight

      public int skyLight()
      Returns the value of the skyLight record component.
      Returns:
      the value of the skyLight record component
    • blockLight

      public int blockLight()
      Returns the value of the blockLight record component.
      Returns:
      the value of the blockLight record component
    • shade

      public float shade()
      Returns the value of the shade record component.
      Returns:
      the value of the shade record component
    • time

      public BattleSceneTimeSettings time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • weather

      public BattleSceneWeatherSettings weather()
      Returns the value of the weather record component.
      Returns:
      the value of the weather record component