Class GameAction<Action>

Type Parameters

Hierarchy

Constructors

  • Used to do something related to the plot and everyone playing it.

    Type Parameters

    • Action extends "ParticleSphere" | "ParticleSpiral" | "ParticleEffect" | "RemoveScore" | "ParticleCircle" | "ClearItems" | "ReplaceItems" | "ParticleLineA" | "LaunchProj" | "RemoveItems" | "ParticleCircleA" | "ParticleRay" | "ParticleSpiralA" | "SetScore" | "ParticleLine" | "Wait" | "BreakBlock" | "StartLoop" | "SetFurnaceSpeed" | "BlockDropsOn" | "FillContainer" | "LPFXSpiral" | "BoneMeal" | "DebugStackTrace" | "FallingBlock" | "DiscordWebhook" | "ChangeSign" | "TickBlock" | "WebRequest" | "ClearScBoard" | "HideSidebar" | "SpawnItemDisplay" | "SetEventProj" | "Explosion" | "SpawnMob" | "SpawnEnderEye" | "ShowSidebar" | "SpawnPotionCloud" | "SetBlockData" | "Firework" | "SetBlock" | "SetEventDamage" | "SetBlockGrowth" | "SetContainerName" | "SpawnItem" | "SignColor" | "SetHead" | "RemoveHologram" | "ShulkerBullet" | "SpawnRngItem" | "FireworkEffect" | "SetRegion" | "SetContainer" | "SpawnInteraction" | "SetItemInSlot" | "CloneRegion" | "UncancelEvent" | "SetLecternBook" | "SpawnTNT" | "SpawnArmorStand" | "SpawnExpOrb" | "SetEventHeal" | "PFXPath" | "SpawnBlockDisp" | "GenerateTree" | "StopLoop" | "ClearContainer" | "SetScObj" | "CancelEvent" | "SpawnCrystal" | "SpawnFangs" | "SetEventSound" | "SetCampfireItem" | "SpawnTextDisplay" | "SetEventXP" | "LockContainer" | "SpawnVehicle" | "Lightning" | "CreateHologram" | "ParticleCluster" | "BlockDropsOff" | "PFXLine[A]"

    Parameters

    • action: Action

      Action to perform.

    • Rest ...args: DFValueType[]

      Arguments to pass.

    Returns GameAction<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<"game_action", 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: "game_action"

Type of the codeblock.

Methods

  • Serialize the object into a readable DiamondFire format.

    Returns

    DiamondFire codeblock object.

    Returns RawDFActionBlock<"game_action", "ParticleSphere" | "ParticleSpiral" | "ParticleEffect" | "RemoveScore" | "ParticleCircle" | "ClearItems" | "ReplaceItems" | "ParticleLineA" | "LaunchProj" | "RemoveItems" | "ParticleCircleA" | "ParticleRay" | "ParticleSpiralA" | "SetScore" | "ParticleLine" | "Wait" | "BreakBlock" | "StartLoop" | "SetFurnaceSpeed" | "BlockDropsOn" | "FillContainer" | "LPFXSpiral" | "BoneMeal" | "DebugStackTrace" | "FallingBlock" | "DiscordWebhook" | "ChangeSign" | "TickBlock" | "WebRequest" | "ClearScBoard" | "HideSidebar" | "SpawnItemDisplay" | "SetEventProj" | "Explosion" | "SpawnMob" | "SpawnEnderEye" | "ShowSidebar" | "SpawnPotionCloud" | "SetBlockData" | "Firework" | "SetBlock" | "SetEventDamage" | "SetBlockGrowth" | "SetContainerName" | "SpawnItem" | "SignColor" | "SetHead" | "RemoveHologram" | "ShulkerBullet" | "SpawnRngItem" | "FireworkEffect" | "SetRegion" | "SetContainer" | "SpawnInteraction" | "SetItemInSlot" | "CloneRegion" | "UncancelEvent" | "SetLecternBook" | "SpawnTNT" | "SpawnArmorStand" | "SpawnExpOrb" | "SetEventHeal" | "PFXPath" | "SpawnBlockDisp" | "GenerateTree" | "StopLoop" | "ClearContainer" | "SetScObj" | "CancelEvent" | "SpawnCrystal" | "SpawnFangs" | "SetEventSound" | "SetCampfireItem" | "SpawnTextDisplay" | "SetEventXP" | "LockContainer" | "SpawnVehicle" | "Lightning" | "CreateHologram" | "ParticleCluster" | "BlockDropsOff" | "PFXLine[A]">

Generated using TypeDoc