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
  • #45

Closed
Open
Created Nov 03, 2023 by Diogo Vaz@Splitrox

Model duplication when changing worlds

Issue applicable to Model Engine 3 and 4

It seems that for some reason, when a player disconnects or changes world the model loses the connection to your internal instances for the actual entities, this only happens if the model is using a bukkit entity as defaultand if the model is not on "world", "world_nether", "world_the_end" (The default ones)

Video showing the problem:

minecraft-1201-multiplayer-3rd-party-server-2023-10-28-12-11-57_6jSufEOW__1___1___1_

Did some debugging on the chat to see instances and making sure I'm calling the correct ModelEngine objects (Based on the hashcode)

I'm using MultiverseCore for the worlds

Code:

ArmorStand entity = (ArmorStand) loc.getWorld().spawnEntity(loc, EntityType.ARMOR_STAND);

entity.setVisible(false);
entity.setGravity(false);
entity.teleport(loc);

this.modeledEntity = ModelEngine.getApi().createModeledEntity(entity);

this.modeledEntity.addModel(this.activeModel, false);

this.modeledEntity.setRenderRadius(this.crate.getPlugin().getConfiguration().getCratesRenderRadius());

Note: "ModelEngine.getApi()" is a custom implementation for multi-version support. This problem was already happen before and the system itself is not a problem

My plugin list: (Only used Plugman to reload my own plugin - not the problem) image

Edited Nov 03, 2023 by Diogo Vaz
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