Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 137
    • Issues 137
    • 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
  • MythicMobsMythicMobs
  • Wiki
    • Skills
    • Mechanics
  • onblockplace

onblockplace · Changes

Page history
updated layout and informations authored Sep 02, 2024 by Lxlp's avatar Lxlp
Hide whitespace changes
Inline Side-by-side
Showing with 38 additions and 34 deletions
+38 -34
  • skills/mechanics/onblockplace.md skills/mechanics/onblockplace.md +38 -34
  • No files found.
skills/mechanics/onblockplace.md
View page @ 613837d9
Mechanic: onBlockPlace ## Description
==================
Applies an aura to the target that triggers a skill when they break a block Applies an aura to the target that triggers a skill when they break a block
Attributes
----------
| Attribute | Aliases | Description | Default Value | ## Attributes
|------------------|---------------|------------------------------------------------------------|---------------| | Attribute | Aliases | Description | Default |
| onBlockPlace | op | Skill to execute if the target places a block | NONE | |-----------|-----------|----------------------------------------------------------------------|---------|
| cancelEvent | cE | Whether or not to cancel the event that triggered the aura | false | | onPlaceSkill | onplace, op | Skill to execute if the target places a block | |
| cancelEvent | cancel, cE | Whether or not to cancel the event that triggered the aura | false |
> This mechanic inherits every attribute of the [aura] mechanic
Examples
--------
## Examples
Simple: Simple:
Apply an onBlockPlace aura on yourself. Whenever you place a block, it will change the terrain around it into gold blocks (Midas Touch). Here we use 2 meta-skills in order to make the @BlocksInRadius be centered around the @targetlocation, which is where the block will is placed. If you don't use 2 meta-skills the @BlocksInRadius will be centered around the person who placed the block instead. Apply an onBlockPlace aura on yourself. Whenever you place a block, it will change the terrain around it into gold blocks (Midas Touch). Here we use 2 meta-skills in order to make the @BlocksInRadius be centered around the @targetlocation, which is where the block will is placed. If you don't use 2 meta-skills the @BlocksInRadius will be centered around the person who placed the block instead.
```yaml
ApplyAura: ApplyAura:
Skills: Skills:
- onBlockPlace{op=MidasTouch1;auraname=Golden;d=300;i=1} @self - onBlockPlace{op=MidasTouch1;auraname=Golden;d=300;i=1} @self
MidasTouch1: MidasTouch1:
Skills: Skills:
- skill{s=MidasTouch2} @targetlocation - skill{s=MidasTouch2} @targetlocation
MidasTouch2: MidasTouch2:
Skills: Skills:
- setblock{m=GOLD_BLOCK} @BlocksInRadius{r=5;ry=1} - setblock{m=GOLD_BLOCK} @BlocksInRadius{r=5;ry=1}
```
##
Intermediate: Intermediate:
Apply an onBlockPlace aura on yourself. When you place a block make it turn all non valueable ore blocks into glass. This is effectively an X-Ray ability. We have 2 meta-skills again this time, but we are not focusing the skill around the block place location. We use the second meta-skill to make sure that we do not set any valuable ore blocks to glass instead. We could center it around the block place location, you would just use 3 meta-skills instead, merging the top example with this one. Apply an onBlockPlace aura on yourself. When you place a block make it turn all non valueable ore blocks into glass. This is effectively an X-Ray ability. We have 2 meta-skills again this time, but we are not focusing the skill around the block place location. We use the second meta-skill to make sure that we do not set any valuable ore blocks to glass instead. We could center it around the block place location, you would just use 3 meta-skills instead, merging the top example with this one.
If you don't want this xray to be permanent you can try using blockmask with material set to glass instead of using the setblock mechanic. Blockmask uses packets, so can cause client lag. Play around with it! its the best way to learn. If you don't want this xray to be permanent you can try using blockmask with material set to glass instead of using the setblock mechanic. Blockmask uses packets, so can cause client lag. Play around with it! its the best way to learn.
```yaml
ApplyAura: ApplyAura:
Skills: Skills:
- onBlockPlace{op=XRay;auraname=Cheater;d=200;i=1} @self - onBlockPlace{op=XRay;auraname=Cheater;d=200;i=1} @self
XRay: XRay:
Skills: Skills:
- skill{s=XRay2} @BlocksInRadius{r=20;ry=20} - skill{s=XRay2} @BlocksInRadius{r=20;ry=20}
XRay2: XRay2:
TargetConditions: TargetConditions:
- blocktype{type=BEDROCK,END_PORTAL,END_PORTAL_FRAME,NETHER_PORTAL,CRAFTING_TABLE,SMITHING_TABLE,ENCHANTING_TABLE,COAL_ORE,DEEPSLATE_COAL_ORE,DIAMOND_ORE,DEEPSLATE_DIAMOND_ORE,EMERALD_ORE,DEEPSLATE_EMERALD_ORE,GOLD_ORE,NETHER_GOLD_ORE,DEEPSLATE_GOLD_ORE,NETHER_QUARTZ_ORE,IRON_ORE,DEEPSLATE_IRON_ORE,COPPER_ORE,DEEPSLATE_COPPER_ORE,LAPIS_ORE,DEEPSLATE_LAPIS_ORE,REDSTONE_ORE,DEEPSLATE_REDSTONE_ORE,ANCIENT_DEBRIS} false - blocktype{type=BEDROCK,END_PORTAL,END_PORTAL_FRAME,NETHER_PORTAL,CRAFTING_TABLE,SMITHING_TABLE,ENCHANTING_TABLE,COAL_ORE,DEEPSLATE_COAL_ORE,DIAMOND_ORE,DEEPSLATE_DIAMOND_ORE,EMERALD_ORE,DEEPSLATE_EMERALD_ORE,GOLD_ORE,NETHER_GOLD_ORE,DEEPSLATE_GOLD_ORE,NETHER_QUARTZ_ORE,IRON_ORE,DEEPSLATE_IRON_ORE,COPPER_ORE,DEEPSLATE_COPPER_ORE,LAPIS_ORE,DEEPSLATE_LAPIS_ORE,REDSTONE_ORE,DEEPSLATE_REDSTONE_ORE,ANCIENT_DEBRIS} false
Skills: Skills:
- setblock{m=GLASS} - setblock{m=GLASS}
\ No newline at end of file ```
<!-- LINKS -->
[aura]: /skills/mechanics/aura
\ No newline at end of file
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs
Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops
Spawning
  • Spawners
  • Random Spawns
Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats
Technical
  • Math
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • Particles Types
  • Audience
  • Equipment Slots
  • SkillTree
  • Intratick Scheduling
  • Dynamic Metaskills
Other
  • Pins