Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Model Engine 4 Model Engine 4
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 110
    • Issues 110
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • Model Engine 4Model Engine 4
  • Wiki
    • Skills
    • Targeters
  • ModelPart

Last edited by Lxlp Oct 21, 2024
Page history

ModelPart

Description

Targets the location of a specific part of the specified model applied on the casting modeled entity

Attributes

Attribute Aliases Description Default
modelid model, mid, m The id of the model of the modeled entity to check against
partid part, pid, p The id of the bone whose location you wish to target
offset off, o The type of the Offset. Can be LOCAL, MODEL, GLOBAL LOCAL
x The offset in the X axis 0
y The offset in the Y axis 0
z The offset in the Z axis 0
location loc, l, coordinates, c The offset on all three axis, in the x,y,z format.
If not set, the normal x, y and z attributes will be used instead.
exactmatch exact, match, em Does the part need to match the partid completely
If set to false, this will get the location of all bones whose id contains the specified one
Example: pid=arm;em=false
This will target both leftarm and rightarm
true
scale sc, s If the offset should scale with the model's scale. This works by multiplying the offset by the value of the model's scale true

Offset Attribute

Note: Depending on how you made your model, each axis might not represent the same direction as stated here.
In this scenario, Z-axis is forward/backward, X-axis is right/left, and Y-axis is up/down.

Local

This mode would get the offset based on the bone's rotation.
Let's say we have a humanoid model who holds a gun. To get where the barrel is pointing at, we can use this mode with a positive Z offset.

Model

This mode would get the offset based on the model's rotation.
Essentially, this is the Forward targeter from MythicMobs, with the added benefit of starting from the location of the selected bone.

Global

This mode just uses Minecraft's world axis to calculate the offset.
Same as Model mode, this just has the benefit of starting from the selected bone, instead of the base of the mob.

Examples

This will damage every entity near a specific part of the modeled entity

ExampleSkill1:
  Skills:
  - skill{s=[
      - damage{a=20} @LivingNearTargetLocation{r=2}
    ]} @modelpart{mid=your_model;pid=boneid}

This will let a projectile be launched from a specific part of the modeled entity

ExampleSkill:
  Skills:
  - projectile{
    ...;
    origin=@modelpart{mid=your_model;pid=boneid;location=0,1,0};
    fromorigin=true
    } @target
Clone repository
Home
FAQ / Common Issues
Commands & Permissions
Configuration

Modeling
  • Creating a Model
    • Hitbox & Eye Height
    • Shadow
  • Bone Behaviors
    • Player Limbs
  • Animating a Model
  • Importing a Model
  • Scriptable Keyframes
  • Optional Tools
MythicMobs
  • Mechanics
  • Conditions
  • Targeters
Citizens (R4.0.4)
  • Trait
  • Commands & Permissions

API
  • Basic
    • Apply / Remove Model
    • Play / Stop Animation
    • Configure Bone Behaviors
    • Mounting / Dismounting Model
    • Per-Player Model
    • Events
  • Advanced
    • Custom Base Entity
    • Custom Mount Controller
    • Custom Importer
    • Custom Bone Behaviors
    • Custom Script Reader
    • Custom Timeline
    • Custom Animation Handler
    • Custom Render Type

Technical
  • Terminology
  • Animation Systems
  • Mount Controllers
Promotional Material