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
  • Issues
  • #212

Closed
Open
Created Apr 24, 2025 by Presti@DxsSucuk

Modeled Entity has no movement collision

When spawning an entity and changing the model with hitbox overwrite the movement collision of that entity breaks.
Other collisions, like Arrow, Snowball, and Egg, still hit the entity.
But as a player, you are not being pushed away when moving in.

Below is the code I use to spawn and set the data:

            // PlayerUtil method gets the block on the ground, can be ignored.
            Villager entity = (Villager) world.spawnEntity(PlayerUtil.getFirstBlockBelow(killed), EntityType.VILLAGER);
            entity.setSilent(true);
            entity.setAI(false);
            entity.setInvulnerable(true);
            entity.setCollidable(true);
            entity.getCollidableExemptions().clear();
            entity.setRotation(killed.getYaw(), killed.getPitch());

            NamedTextColor textColorToConvert = event.getKilledPlayerTeam().getConvertedColor();

            ModeledEntity modeledEntity = ModelEngineAPI.createModeledEntity(entity);

            ActiveModel activeModel = ModelEngineAPI.createActiveModel(modelName);

            modeledEntity.addModel(activeModel, true);
            modeledEntity.setBaseEntityVisible(false);
            modeledEntity.setModelRotationLocked(true);

            activeModel.setGlowColor(textColorToConvert.value());
            activeModel.setGlowing(true);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking