Skip to content

GitLab

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

Closed
Open
Created Feb 26, 2023 by WizardlyBump17@WizardlyBump17

Fast entity kicking passengers

All the code I used is in the video.
https://youtu.be/8REpSlR53wg

Simple description: I have a custom entity and I am applying a model to it. It is a vehicle plugin I am coding. When the entity is fast enough, the driver or one of the passengers (or all the passengers, need more tests) is kicked from the vehicle and the

    public List<org.bukkit.entity.Entity> getMegPassengers() {
        List<org.bukkit.entity.Entity> passengers = new ArrayList<>();
        MountManager manager = megEntity.getMountManager();
        if (manager.getDriver() != null)
            passengers.add(manager.getDriver());

        for (Mountable mountable : manager.getPassengers().values())
            passengers.addAll(mountable.getRiders());

        return passengers;
    }

still returns the passengers even if they were kicked. After that, an exception is thrown if the player who was kicked gets close to the model range.

/version: Paper version git-Paper-388 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: fc9ee65 on ver/1.18.2)
ModelEngine version: Demo vR3.1.3

Edited Feb 26, 2023 by WizardlyBump17
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