Package tschipp.carryon.common.scripting
Record Class CarryOnScript.ScriptRender
java.lang.Object
java.lang.Record
tschipp.carryon.common.scripting.CarryOnScript.ScriptRender
- Enclosing class:
- CarryOnScript
public static record CarryOnScript.ScriptRender(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>> renderNameBlock, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> renderNameEntity, Optional<net.minecraft.nbt.CompoundTag> renderNBT, Matchables.OptionalVec3 renderTranslation, Matchables.OptionalVec3 renderRotation, Matchables.OptionalVec3 renderscale, Matchables.OptionalVec3 renderRotationLeftArm, Matchables.OptionalVec3 renderRotationRightArm, boolean renderLeftArm, boolean renderRightArm)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CarryOnScript.ScriptRender>static final CarryOnScript.ScriptRender -
Constructor Summary
ConstructorsConstructorDescriptionScriptRender(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>> renderNameBlock, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> renderNameEntity, Optional<net.minecraft.nbt.CompoundTag> renderNBT, Matchables.OptionalVec3 renderTranslation, Matchables.OptionalVec3 renderRotation, Matchables.OptionalVec3 renderscale, Matchables.OptionalVec3 renderRotationLeftArm, Matchables.OptionalVec3 renderRotationRightArm, boolean renderLeftArm, boolean renderRightArm) Creates an instance of aScriptRenderrecord 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.booleanReturns the value of therenderLeftArmrecord component.Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>>Returns the value of therenderNameBlockrecord component.Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>>Returns the value of therenderNameEntityrecord component.Optional<net.minecraft.nbt.CompoundTag>Returns the value of therenderNBTrecord component.booleanReturns the value of therenderRightArmrecord component.Returns the value of therenderRotationrecord component.Returns the value of therenderRotationLeftArmrecord component.Returns the value of therenderRotationRightArmrecord component.Returns the value of therenderscalerecord component.Returns the value of therenderTranslationrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
ScriptRender
public ScriptRender(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>> renderNameBlock, Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> renderNameEntity, Optional<net.minecraft.nbt.CompoundTag> renderNBT, Matchables.OptionalVec3 renderTranslation, Matchables.OptionalVec3 renderRotation, Matchables.OptionalVec3 renderscale, Matchables.OptionalVec3 renderRotationLeftArm, Matchables.OptionalVec3 renderRotationRightArm, boolean renderLeftArm, boolean renderRightArm) Creates an instance of aScriptRenderrecord class.- Parameters:
renderNameBlock- the value for therenderNameBlockrecord componentrenderNameEntity- the value for therenderNameEntityrecord componentrenderNBT- the value for therenderNBTrecord componentrenderTranslation- the value for therenderTranslationrecord componentrenderRotation- the value for therenderRotationrecord componentrenderscale- the value for therenderscalerecord componentrenderRotationLeftArm- the value for therenderRotationLeftArmrecord componentrenderRotationRightArm- the value for therenderRotationRightArmrecord componentrenderLeftArm- the value for therenderLeftArmrecord componentrenderRightArm- the value for therenderRightArmrecord 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 '=='. -
renderNameBlock
public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.level.block.Block>> renderNameBlock()Returns the value of therenderNameBlockrecord component.- Returns:
- the value of the
renderNameBlockrecord component
-
renderNameEntity
public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> renderNameEntity()Returns the value of therenderNameEntityrecord component.- Returns:
- the value of the
renderNameEntityrecord component
-
renderNBT
Returns the value of therenderNBTrecord component.- Returns:
- the value of the
renderNBTrecord component
-
renderTranslation
Returns the value of therenderTranslationrecord component.- Returns:
- the value of the
renderTranslationrecord component
-
renderRotation
Returns the value of therenderRotationrecord component.- Returns:
- the value of the
renderRotationrecord component
-
renderscale
Returns the value of therenderscalerecord component.- Returns:
- the value of the
renderscalerecord component
-
renderRotationLeftArm
Returns the value of therenderRotationLeftArmrecord component.- Returns:
- the value of the
renderRotationLeftArmrecord component
-
renderRotationRightArm
Returns the value of therenderRotationRightArmrecord component.- Returns:
- the value of the
renderRotationRightArmrecord component
-
renderLeftArm
public boolean renderLeftArm()Returns the value of therenderLeftArmrecord component.- Returns:
- the value of the
renderLeftArmrecord component
-
renderRightArm
public boolean renderRightArm()Returns the value of therenderRightArmrecord component.- Returns:
- the value of the
renderRightArmrecord component
-