YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraftforge.common.IMinecartCollisionHandler Interface Reference

Public Member Functions

void onEntityCollision (EntityMinecart cart, Entity other)
 
AxisAlignedBB getCollisionBox (EntityMinecart cart, Entity other)
 
AxisAlignedBB getMinecartCollisionBox (EntityMinecart cart)
 
AxisAlignedBB getBoundingBox (EntityMinecart cart)
 

Detailed Description

This class defines a replacement for the default minecart collision code. Only one handler can be registered at a time. It it registered with EntityMinecart.registerCollisionHandler(). If you use this, make it a configuration option.

Author
CovertJaguar

Member Function Documentation

AxisAlignedBB net.minecraftforge.common.IMinecartCollisionHandler.getBoundingBox ( EntityMinecart  cart)

This function replaces the function of the same name in EntityMinecart. It defines whether minecarts are solid to the player.

Parameters
cartThe cart for which the bounding box was requested.
Returns
The bounding box or null.
AxisAlignedBB net.minecraftforge.common.IMinecartCollisionHandler.getCollisionBox ( EntityMinecart  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
cartThe cart for which the collision box was requested.
otherThe entity requesting the collision box.
Returns
The collision box or null.
AxisAlignedBB net.minecraftforge.common.IMinecartCollisionHandler.getMinecartCollisionBox ( EntityMinecart  cart)

This function is used to define the box used for detecting minecart collisions. It is generally bigger that the normal collision box.

Parameters
cartThe cart for which the collision box was requested.
Returns
The collision box, cannot be null.
void net.minecraftforge.common.IMinecartCollisionHandler.onEntityCollision ( EntityMinecart  cart,
Entity  other 
)

This basically replaces the function of the same name in EnityMinecart. Code in IMinecartHooks.applyEntityCollisionHook is still run.

Parameters
cartThe cart that called the collision.
otherThe object it collided with.

The documentation for this interface was generated from the following file: