[SOLVED]Minecart Colliding With Boat?

Discussion in 'Plugin Development' started by HappyPikachu, Dec 26, 2011.

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


    VehicleEntityCollisionEvent doesn't seem to fire when a Minecart collides with a Boat. Is there something I'm missing here?

    1. public void onVehicleEntityCollision(VehicleEntityCollisionEvent event) {
    2. if (event.getVehicle().getPassenger() instanceof Player & event.getVehicle() instanceof Minecart) {
    3. if (event.getEntity() instanceof Entity) {
    4. event.getEntity().remove();
    5. }
    6. }
    7. }
  2. What exactly is that line for:
    1. if (event.getEntity() instanceof Entity) {

    ? But, well, I don't see any real mistake here.
  3. Offline


    Originally, it was "instanceof Boat". I changed it to "Entity" out of frustration, I guess.

    Either way, the event doesn't fire on contact with a Boat. Should I report this as a bug?
  4. I think so, yes.
  5. Offline


    Have you registered the VehicleListener?
    May print anything (System.out.println()) and collide, then look in the Console.
  6. Offline


    I've registered the VehicleListener. Console doesn't report any problems. I'm going to consider this solved, and report on JIRA.

    Thanks for the help! ^.^
Thread Status:
Not open for further replies.

Share This Page