Class SetVariable<Action>

Type Parameters

Hierarchy

Constructors

  • Set a variable using a specific action.

    Type Parameters

    • Action extends "FaceLocation" | "SetParticleType" | "SetItemEnchants" | "PurgeVars" | "ShiftAllAxes" | "GetParticleMat" | "SetParticleSprd" | "AbsoluteValue" | "AppendValue" | "%" | "ShiftOnVector" | "GetItemAttribute" | "ClearDict" | "+" | "ShiftRotation" | "-" | "GetItemRarity" | "MultiplyVector" | "/" | "GetSignText" | "Bitwise" | "GetLecternPage" | "ParseX" | "ShiftOnAxis" | "ParseY" | "VectorBetween" | "ParseZ" | "GetVectorComp" | "=" | "RmText" | "AddItemAttribute" | "GetCenterLoc" | "AlignLoc" | "GetSoundVolume" | "RandomNumber" | "Raycast" | "RotateAroundVec" | "GetParticleMotion" | "SetParticleMotion" | "RepeatText" | "Average" | "WrapNumber" | "SetY" | "SetMapTexture" | "GetBlockData" | "SetX" | "SortDict" | "GetLecternBook" | "CrossProduct" | "x" | "GetParticleRoll" | "ParseYaw" | "DotProduct" | "SetZ" | "GetPotionType" | "SetItemName" | "ListLength" | "Sine" | "DirectionName" | "GetItemLore" | "ReverseList" | "CreateDict" | "RoundNumber" | "GetItemLoreLine" | "SetVectorLength" | "SetPotionDur" | "NormalRandom" | "SetPotionType" | "AlignVector" | "SetItemDura" | "SetBreakability" | "RaycastEntity" | "SetDictValue" | "SetAllCoords" | "RGBColor" | "SetCanDestroy" | "SplitText" | "HSLColor" | "GetDirection" | "RemoveListIndex" | "Logarithm" | "SetItemTag" | "GetItemAmount" | "SetPotionAmp" | "RotateAroundAxis" | "GetItemName" | "GetItemDura" | "ShiftInDirection" | "ReplaceText" | "TextLength" | "SetLodestoneLoc" | "GetPotionAmp" | "GetParticleAmount" | "GetDictSize" | "SetItemAmount" | "SubtractVectors" | "SetCase" | "SetParticleColor" | "GetLight" | "GetDictValues" | "Vector" | "Distance" | "SetItemLore" | "Root" | "SetParticleAmount" | "AddItemEnchant" | "GetItemType" | "TrimText" | "GetParticleType" | "GetAllBlockData" | "GetDictKeys" | "SetParticleMat" | "GetCoord" | "RemoveItemTag" | "SetParticleSize" | "GetPotionDur" | "RandomLoc" | "SetSoundType" | "GetLodestoneLoc" | "ShiftDirection" | "GetContainerName" | "GetParticleSprd" | "ReflectVector" | "GetHeadOwner" | "GetItemEnchants" | "AppendDict" | "GetMaxItemAmount" | "GetColorChannels" | "SetDirection" | "SetListValue" | "SetBookText" | "RandomValue" | "SetItemType" | "GetSoundType" | "GetListValue" | "Tangent" | "Text" | "VoronoiNoise" | "HSBColor" | "+=" | "GetSoundVariant" | "GetItemColor" | "InsertListValue" | "SetSoundVolume" | "SetCoord" | "AddVectors" | "SetPitch" | "RaycastBlock" | "SetHeadTexture" | "PerlinNoise" | "WorleyNoise" | "SetItemColor" | "GetParticleColor" | "SetSoundPitch" | "SortList" | "RemoveDictEntry" | "FormatTime" | "SetItemFlags" | "GetItemEffects" | "SetYaw" | "SetItemEffects" | "-=" | "GetItemTag" | "CreateList" | "AppendList" | "GetContainerItems" | "ShiftToward" | "TrimList" | "RemoveText" | "Cosine" | "SetVectorComp" | "ParseNumber" | "Exponent" | "ShiftAllDirs" | "GetValueIndex" | "RemItemEnchant" | "GetBookText" | "SetParticleRoll" | "SetSoundVariant" | "ShiftLocation" | "RandomizeList" | "ClampNumber" | "Round" | "GetSoundPitch" | "JoinText" | "TranslateColors" | "GetBlockGrowth" | "GetAllItemTags" | "RemoveListValue" | "ShiftAllDirections" | "SetCanPlaceOn" | "GetBlockType" | "ParsePitch" | "GetDictValue" | "ContainerLock" | "GetBlockPower" | "GetVectorLength" | "SetModelData" | "SetCoords" | "GetParticleSize"

    Parameters

    • action: Action

      Action to perform.

    • variable: Variable

      Variable to set.

    • Rest ...args: DFValueType[]

      Arguments to pass.

    Returns SetVariable<Action>

  • Type Parameters

    • Action extends "FaceLocation" | "SetParticleType" | "SetItemEnchants" | "PurgeVars" | "ShiftAllAxes" | "GetParticleMat" | "SetParticleSprd" | "AbsoluteValue" | "AppendValue" | "%" | "ShiftOnVector" | "GetItemAttribute" | "ClearDict" | "+" | "ShiftRotation" | "-" | "GetItemRarity" | "MultiplyVector" | "/" | "GetSignText" | "Bitwise" | "GetLecternPage" | "ParseX" | "ShiftOnAxis" | "ParseY" | "VectorBetween" | "ParseZ" | "GetVectorComp" | "=" | "RmText" | "AddItemAttribute" | "GetCenterLoc" | "AlignLoc" | "GetSoundVolume" | "RandomNumber" | "Raycast" | "RotateAroundVec" | "GetParticleMotion" | "SetParticleMotion" | "RepeatText" | "Average" | "WrapNumber" | "SetY" | "SetMapTexture" | "GetBlockData" | "SetX" | "SortDict" | "GetLecternBook" | "CrossProduct" | "x" | "GetParticleRoll" | "ParseYaw" | "DotProduct" | "SetZ" | "GetPotionType" | "SetItemName" | "ListLength" | "Sine" | "DirectionName" | "GetItemLore" | "ReverseList" | "CreateDict" | "RoundNumber" | "GetItemLoreLine" | "SetVectorLength" | "SetPotionDur" | "NormalRandom" | "SetPotionType" | "AlignVector" | "SetItemDura" | "SetBreakability" | "RaycastEntity" | "SetDictValue" | "SetAllCoords" | "RGBColor" | "SetCanDestroy" | "SplitText" | "HSLColor" | "GetDirection" | "RemoveListIndex" | "Logarithm" | "SetItemTag" | "GetItemAmount" | "SetPotionAmp" | "RotateAroundAxis" | "GetItemName" | "GetItemDura" | "ShiftInDirection" | "ReplaceText" | "TextLength" | "SetLodestoneLoc" | "GetPotionAmp" | "GetParticleAmount" | "GetDictSize" | "SetItemAmount" | "SubtractVectors" | "SetCase" | "SetParticleColor" | "GetLight" | "GetDictValues" | "Vector" | "Distance" | "SetItemLore" | "Root" | "SetParticleAmount" | "AddItemEnchant" | "GetItemType" | "TrimText" | "GetParticleType" | "GetAllBlockData" | "GetDictKeys" | "SetParticleMat" | "GetCoord" | "RemoveItemTag" | "SetParticleSize" | "GetPotionDur" | "RandomLoc" | "SetSoundType" | "GetLodestoneLoc" | "ShiftDirection" | "GetContainerName" | "GetParticleSprd" | "ReflectVector" | "GetHeadOwner" | "GetItemEnchants" | "AppendDict" | "GetMaxItemAmount" | "GetColorChannels" | "SetDirection" | "SetListValue" | "SetBookText" | "RandomValue" | "SetItemType" | "GetSoundType" | "GetListValue" | "Tangent" | "Text" | "VoronoiNoise" | "HSBColor" | "+=" | "GetSoundVariant" | "GetItemColor" | "InsertListValue" | "SetSoundVolume" | "SetCoord" | "AddVectors" | "SetPitch" | "RaycastBlock" | "SetHeadTexture" | "PerlinNoise" | "WorleyNoise" | "SetItemColor" | "GetParticleColor" | "SetSoundPitch" | "SortList" | "RemoveDictEntry" | "FormatTime" | "SetItemFlags" | "GetItemEffects" | "SetYaw" | "SetItemEffects" | "-=" | "GetItemTag" | "CreateList" | "AppendList" | "GetContainerItems" | "ShiftToward" | "TrimList" | "RemoveText" | "Cosine" | "SetVectorComp" | "ParseNumber" | "Exponent" | "ShiftAllDirs" | "GetValueIndex" | "RemItemEnchant" | "GetBookText" | "SetParticleRoll" | "SetSoundVariant" | "ShiftLocation" | "RandomizeList" | "ClampNumber" | "Round" | "GetSoundPitch" | "JoinText" | "TranslateColors" | "GetBlockGrowth" | "GetAllItemTags" | "RemoveListValue" | "ShiftAllDirections" | "SetCanPlaceOn" | "GetBlockType" | "ParsePitch" | "GetDictValue" | "ContainerLock" | "GetBlockPower" | "GetVectorLength" | "SetModelData" | "SetCoords" | "GetParticleSize"

    Parameters

    Returns SetVariable<Action>

Properties

_componentName: string = "serializable"

The component's name

action: Action

The action to perform.

args: DFValueType[]

Arguments to pass.

isInverted: boolean = false

If the codeblock is inverted (mostly for conditional blocks).

tags: BLTagArray<"set_var", Action> = ...

The tags of the action on this action block.

Remark

Will be an empty array if the action has no tags.

target: DFTarget = ...

The target for the action.

type: "set_var"

Type of the codeblock.

variable: Variable

Methods

  • Serialize the object into a readable DiamondFire format.

    Returns

    DiamondFire codeblock object.

    Returns RawDFActionBlock<"set_var", "FaceLocation" | "SetParticleType" | "SetItemEnchants" | "PurgeVars" | "ShiftAllAxes" | "GetParticleMat" | "SetParticleSprd" | "AbsoluteValue" | "AppendValue" | "%" | "ShiftOnVector" | "GetItemAttribute" | "ClearDict" | "+" | "ShiftRotation" | "-" | "GetItemRarity" | "MultiplyVector" | "/" | "GetSignText" | "Bitwise" | "GetLecternPage" | "ParseX" | "ShiftOnAxis" | "ParseY" | "VectorBetween" | "ParseZ" | "GetVectorComp" | "=" | "RmText" | "AddItemAttribute" | "GetCenterLoc" | "AlignLoc" | "GetSoundVolume" | "RandomNumber" | "Raycast" | "RotateAroundVec" | "GetParticleMotion" | "SetParticleMotion" | "RepeatText" | "Average" | "WrapNumber" | "SetY" | "SetMapTexture" | "GetBlockData" | "SetX" | "SortDict" | "GetLecternBook" | "CrossProduct" | "x" | "GetParticleRoll" | "ParseYaw" | "DotProduct" | "SetZ" | "GetPotionType" | "SetItemName" | "ListLength" | "Sine" | "DirectionName" | "GetItemLore" | "ReverseList" | "CreateDict" | "RoundNumber" | "GetItemLoreLine" | "SetVectorLength" | "SetPotionDur" | "NormalRandom" | "SetPotionType" | "AlignVector" | "SetItemDura" | "SetBreakability" | "RaycastEntity" | "SetDictValue" | "SetAllCoords" | "RGBColor" | "SetCanDestroy" | "SplitText" | "HSLColor" | "GetDirection" | "RemoveListIndex" | "Logarithm" | "SetItemTag" | "GetItemAmount" | "SetPotionAmp" | "RotateAroundAxis" | "GetItemName" | "GetItemDura" | "ShiftInDirection" | "ReplaceText" | "TextLength" | "SetLodestoneLoc" | "GetPotionAmp" | "GetParticleAmount" | "GetDictSize" | "SetItemAmount" | "SubtractVectors" | "SetCase" | "SetParticleColor" | "GetLight" | "GetDictValues" | "Vector" | "Distance" | "SetItemLore" | "Root" | "SetParticleAmount" | "AddItemEnchant" | "GetItemType" | "TrimText" | "GetParticleType" | "GetAllBlockData" | "GetDictKeys" | "SetParticleMat" | "GetCoord" | "RemoveItemTag" | "SetParticleSize" | "GetPotionDur" | "RandomLoc" | "SetSoundType" | "GetLodestoneLoc" | "ShiftDirection" | "GetContainerName" | "GetParticleSprd" | "ReflectVector" | "GetHeadOwner" | "GetItemEnchants" | "AppendDict" | "GetMaxItemAmount" | "GetColorChannels" | "SetDirection" | "SetListValue" | "SetBookText" | "RandomValue" | "SetItemType" | "GetSoundType" | "GetListValue" | "Tangent" | "Text" | "VoronoiNoise" | "HSBColor" | "+=" | "GetSoundVariant" | "GetItemColor" | "InsertListValue" | "SetSoundVolume" | "SetCoord" | "AddVectors" | "SetPitch" | "RaycastBlock" | "SetHeadTexture" | "PerlinNoise" | "WorleyNoise" | "SetItemColor" | "GetParticleColor" | "SetSoundPitch" | "SortList" | "RemoveDictEntry" | "FormatTime" | "SetItemFlags" | "GetItemEffects" | "SetYaw" | "SetItemEffects" | "-=" | "GetItemTag" | "CreateList" | "AppendList" | "GetContainerItems" | "ShiftToward" | "TrimList" | "RemoveText" | "Cosine" | "SetVectorComp" | "ParseNumber" | "Exponent" | "ShiftAllDirs" | "GetValueIndex" | "RemItemEnchant" | "GetBookText" | "SetParticleRoll" | "SetSoundVariant" | "ShiftLocation" | "RandomizeList" | "ClampNumber" | "Round" | "GetSoundPitch" | "JoinText" | "TranslateColors" | "GetBlockGrowth" | "GetAllItemTags" | "RemoveListValue" | "ShiftAllDirections" | "SetCanPlaceOn" | "GetBlockType" | "ParsePitch" | "GetDictValue" | "ContainerLock" | "GetBlockPower" | "GetVectorLength" | "SetModelData" | "SetCoords" | "GetParticleSize">

Generated using TypeDoc