Interface IMinecartCollisionHandler


public interface IMinecartCollisionHandler
This class defines a replacement for the default minecart collision code. Only one handler can be registered at a time. It it registered with AbstractMinecartEntity.registerCollisionHandler(). If you use this, make it a configuration option.
Author:
CovertJaguar
  • Method Details

    • onEntityCollision

      void onEntityCollision(AbstractMinecartEntity cart, Entity other)
      This basically replaces the function of the same name in EntityMinecart. Code in IMinecartHooks.applyEntityCollisionHook is still run.
      Parameters:
      cart - The cart that called the collision.
      other - The object it collided with.
    • getCollisionBox

      AxisAlignedBB getCollisionBox(AbstractMinecartEntity cart, Entity other)
      This function replaced the function of the same name in EntityMinecart. It is used to define whether minecarts collide with specific entities, for example items.
      Parameters:
      cart - The cart for which the collision box was requested.
      other - The entity requesting the collision box.
      Returns:
      The collision box or null.
    • getMinecartCollisionBox

      AxisAlignedBB getMinecartCollisionBox(AbstractMinecartEntity cart)
      This function is used to define the box used for detecting minecart collisions. It is generally bigger that the normal collision box.
      Parameters:
      cart - The cart for which the collision box was requested.
      Returns:
      The collision box, cannot be null.
    • getBoundingBox

      AxisAlignedBB getBoundingBox(AbstractMinecartEntity cart)
      This function replaces the function of the same name in EntityMinecart. It defines whether minecarts are solid to the player.
      Parameters:
      cart - The cart for which the bounding box was requested.
      Returns:
      The bounding box or null.