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 152
    • Issues 152
    • 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
  • removehelditem

removehelditem · Changes

Page history
Updated example to match player-only, no-target limitation using a sudoskill... authored Sep 30, 2024 by Brickgard's avatar Brickgard
Updated example to match player-only, no-target limitation using a sudoskill and recommend consumeslot mechanic instead, added links.
Hide whitespace changes
Inline Side-by-side
Showing with 18 additions and 3 deletions
+18 -3
  • skills/mechanics/removehelditem.md skills/mechanics/removehelditem.md +18 -3
  • No files found.
skills/mechanics/removehelditem.md
View page @ a02ba0ef
## Description
Removes the given amount from the casting player's held item.
> **This is a no-target mechanic, and the affected entity will always be the caster**
> **This is a no-target mechanic, and the affected player will always be the caster**
<details><summary>Easier Alternative:</summary>
The [consumeslot](skills/mechanics/consumeslot) mechanic is likely an easier choice for most use-cases, since it can target entities directly and choose which slot to remove from.
</details>
## Attributes
| Attribute | Aliases | Description | Default |
......@@ -10,11 +14,22 @@ Removes the given amount from the casting player's held item.
## Examples
As a skill that only targets the casting player, a mob may need to use a [sudoskill](skills/mechanics/sudoskill) to remove the player's item:
```yaml
munchy:
Type: PIG
Skills:
- SudoSkill{s=removeApple} @trigger ~onInteract
```
This will cause a player to cast the `removeApple` meta-skill when right-clicking the mob:
```yaml
ExampleSkill:
removeApple:
Conditions:
- holding{m=APPLE} true
Skills:
- removeHeldItem{amount=1} @trigger
- removeHeldItem{amount=1}
```
This example checks for if the player (now the caster) is holding an apple, and if so, remove 1 from their hand.
## Aliases
......
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