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:
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)