Add an entity riding on top of an existing entity?

Discussion in 'Plugin Development' started by HaitherecreeperMC, Apr 2, 2014.

Thread Status:
Not open for further replies.
  1. So all I want to do is take an arrow named "arrow" and add a Creeper riding on it. Or if that's not possible, how to spawn an arrow with a creeper riding on it. Thanks in advance!
     
  2. Offline

    viper_monster

    HaitherecreeperMC

    final Arrow arrow = (Arrow) World.spawnEntity(Location, Arrow.class);
    final Creeper creeper = (Creeper) World.spawnEntity(Location, Creeper.class);

    arrow.setPassenger(creeper);

    Something like this could work :)
     
  3. Thanks!
     
  4. Offline

    DevRosemberg

    spoljo666 That would actually look kinda funny :p
     
    spoljo666 likes this.
Thread Status:
Not open for further replies.

Share This Page