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 108
    • Issues 108
    • 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
    • Api
    • Advanced
  • Custom Base Entity

Last edited by Ticxo Sep 29, 2023
Page history

Custom Base Entity

Sometimes you are trying to apply a model to something that is not an entity, or you want something that is a bit more complex than the default Dummy. You can wrap your custom target with your own BaseEntity class.

public class CustomBaseEntity implements BaseEntity<CustomTarget> {

	@Getter private final CustomTarget original;

	public CustomBaseEntity(CustomTarget original) {
		this.original = original;
	}
	
	// Implement the rest of the methods

}

When it is time to add models to this custom target, we can do something similar to the Dummy method.

CustomBaseEntity baseEntity = new CustomBaseEntity(customTarget);
ModeledEntity modeledEntity = ModelEngineAPI.createModeledEntity(baseEntity);
// The rest is exactly the same
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