Record Class BattleScene
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.battles.scene.BattleScene
- Record Components:
structure- the server-side structure template to use for the scenestructureRotation- the grid-aligned rotation applied to structure blocks around theplayer_posmarkermarkerYawOffset- an arbitrary yaw offset applied to all parsed markers after structure rotationrenderSettings- rendering values and world-state behavior for the client scene
public record BattleScene(net.minecraft.resources.ResourceLocation structure, net.minecraft.world.level.block.Rotation structureRotation, float markerYawOffset, BattleSceneRenderSettings renderSettings)
extends Record
Datapack definition for a battle scene.
The battle context references entries in this registry. The server resolves the definition, loads the configured structure, and sends the client the resolved blocks, markers, and render settings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BattleScene> static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<BattleScene>> static final com.mojang.serialization.Codec<net.minecraft.world.level.block.Rotation> -
Constructor Summary
ConstructorsConstructorDescriptionBattleScene(net.minecraft.resources.ResourceLocation structure, net.minecraft.world.level.block.Rotation structureRotation, float markerYawOffset, BattleSceneRenderSettings renderSettings) Creates an instance of aBattleScenerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of themarkerYawOffsetrecord component.Returns the value of therenderSettingsrecord component.net.minecraft.resources.ResourceLocationReturns the value of thestructurerecord component.net.minecraft.world.level.block.RotationReturns the value of thestructureRotationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
REGISTRY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<BattleScene>> REGISTRY -
ROTATION_CODEC
public static final com.mojang.serialization.Codec<net.minecraft.world.level.block.Rotation> ROTATION_CODEC -
CODEC
-
-
Constructor Details
-
BattleScene
public BattleScene(net.minecraft.resources.ResourceLocation structure, net.minecraft.world.level.block.Rotation structureRotation, float markerYawOffset, BattleSceneRenderSettings renderSettings) Creates an instance of aBattleScenerecord class.- Parameters:
structure- the value for thestructurerecord componentstructureRotation- the value for thestructureRotationrecord componentmarkerYawOffset- the value for themarkerYawOffsetrecord componentrenderSettings- the value for therenderSettingsrecord component
-
-
Method Details
-
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 '=='. -
structure
public net.minecraft.resources.ResourceLocation structure()Returns the value of thestructurerecord component.- Returns:
- the value of the
structurerecord component
-
structureRotation
public net.minecraft.world.level.block.Rotation structureRotation()Returns the value of thestructureRotationrecord component.- Returns:
- the value of the
structureRotationrecord component
-
markerYawOffset
public float markerYawOffset()Returns the value of themarkerYawOffsetrecord component.- Returns:
- the value of the
markerYawOffsetrecord component
-
renderSettings
Returns the value of therenderSettingsrecord component.- Returns:
- the value of the
renderSettingsrecord component
-