Solved Can't mount player on mob

Discussion in 'General Help' started by i3ick, Apr 26, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    i3ick

    Code:
                for (Entity en : p.getWorld().getNearbyEntities(p.getLocation(),5.0, 5.0, 5.0)) {
                    if (en.getEntityId() == mobID) {
                        Silverfish sfish = (Silverfish) en;
                        sfish.getPassengers().add(p);
                        sfish.removePotionEffect(PotionEffectType.INVISIBILITY);
                    }
    
                }
    I also tried setPassanger but that doesn't work either. The event fires, invisibility is gone, but the player isn't mounted back on. (This is inside EntityDismountEvent )
     
  2. Online

    timtower Moderator Moderator

    @i3ick Run it a tick later.
     
    i3ick likes this.
Thread Status:
Not open for further replies.

Share This Page