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 levelblockLight- fixed block light level returned by the scene levelshade- fixed directional shade value used by the scene leveltime- time-of-day behavior for the sceneweather- 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BattleSceneRenderSettings> static final BattleSceneRenderSettings -
Constructor Summary
ConstructorsConstructorDescriptionBattleSceneRenderSettings(int skyLight, int blockLight, float shade, BattleSceneTimeSettings time, BattleSceneWeatherSettings weather) Creates an instance of aBattleSceneRenderSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theblockLightrecord component.static BattleSceneRenderSettingsdecode(net.minecraft.network.FriendlyByteBuf buffer) Decodes render settings from a battle scene packet.voidencode(net.minecraft.network.FriendlyByteBuf buffer) Encodes these render settings for a battle scene packet.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatshade()Returns the value of theshaderecord component.intskyLight()Returns the value of theskyLightrecord component.time()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.weather()Returns the value of theweatherrecord component.
-
Field Details
-
DEFAULT
-
CODEC
-
-
Constructor Details
-
BattleSceneRenderSettings
public BattleSceneRenderSettings(int skyLight, int blockLight, float shade, BattleSceneTimeSettings time, BattleSceneWeatherSettings weather) Creates an instance of aBattleSceneRenderSettingsrecord class.- Parameters:
skyLight- the value for theskyLightrecord componentblockLight- the value for theblockLightrecord componentshade- the value for theshaderecord componenttime- the value for thetimerecord componentweather- the value for theweatherrecord component
-
-
Method Details
-
decode
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
skyLight
public int skyLight()Returns the value of theskyLightrecord component.- Returns:
- the value of the
skyLightrecord component
-
blockLight
public int blockLight()Returns the value of theblockLightrecord component.- Returns:
- the value of the
blockLightrecord component
-
shade
public float shade()Returns the value of theshaderecord component.- Returns:
- the value of the
shaderecord component
-
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
weather
Returns the value of theweatherrecord component.- Returns:
- the value of the
weatherrecord component
-