Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicCrucible MythicCrucible
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 53
    • Issues 53
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicCrucibleMythicCrucible
  • Issues
  • #170

Closed
Open
Created Oct 09, 2023 by BookWyrm114@BookWyrm114

Redstone-based triggers for custom blocks

Add 4 new triggers for custom blocks allowing them to execute action when powered (or unpowered) by redstone:

~OnPowered:[redstone_signal_strength] - Executes a skill once when powered, if the signal strength is undefined, it activates on any redstone signal, regardless of strength, an "!" can also be added before a signal strength to define any signal Except a specific number, and multiple numbers can be listed, separated by commas.

~OnUnpowered:[redstone_signal_strength] - executes a skill when a block loses redstone signal completely, a signal strength can be specified to make the skill execute when the received signal strength changes from the specified number, an "!" can also be added before a signal strength to define any signal except a specific number, and multiple numbers can be listed, separated by commas.

~OnPoweredRepeating:[redstone_signal_strength] - repeatedly executes a skill whilst powered, signal strength can be specified, an "!" can also be added before a signal strength to define any signal Except a specific number, and multiple numbers can be listed, separated by commas.

~OnUnpoweredRepeating - executes a skill constantly whilst not powered, basically just a constantly executing skill that stops if powered by redstone

short example of ~OnPoweredRepeating and ~OnUnpowered to show a skill that let a block do 2 different things depending on if the redstone strength was odd or even, and also execute a small transition skill when the block's received signal changes in strength, but not when the block is first powered

CoolBlock:
  Id: STONE
  Model: 5
  Display: 'Probably a Block'
  Type: BLOCK
  CustomBlock:
    Type: NOTE_BLOCK
    Id: 1
  CustomBlockSkills:
  - sound{s=block.amethyst_block.place} @self ~onBlockPlace
  - sound{s=block.amethyst_block.break} @self ~onBlockBreak
  - skill{s=coolskill} @self ~OnPoweredRepeating:!1,3,5,7,9,11,13,15
  - skill{s=coolskill2} @self ~OnPoweredRepeating:1,3,5,7,9,11,13,15
  - skill{s=transition skill} @self ~OnUnpowered:!0
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking