Package net.minecraftforge.common
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 Summary
Modifier and TypeMethodDescriptionThis function replaces the function of the same name in EntityMinecart.getCollisionBox
(AbstractMinecart cart, Entity other) This function replaced the function of the same name in EntityMinecart.This function is used to define the box used for detecting minecart collisions.void
onEntityCollision
(AbstractMinecart cart, Entity other) This basically replaces the function of the same name in EntityMinecart.
-
Method Details
-
onEntityCollision
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
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
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
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.
-