001package net.minecraft.entity.item;
002
003import net.minecraft.entity.player.EntityPlayer;
004import net.minecraft.world.World;
005import net.minecraftforge.common.MinecraftForge;
006import net.minecraftforge.event.entity.minecart.MinecartInteractEvent;
007
008public class EntityMinecartEmpty extends EntityMinecart
009{
010    public EntityMinecartEmpty(World par1World)
011    {
012        super(par1World);
013    }
014
015    public EntityMinecartEmpty(World par1, double par2, double par4, double par6)
016    {
017        super(par1, par2, par4, par6);
018    }
019
020    /**
021     * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
022     */
023    public boolean interact(EntityPlayer par1EntityPlayer)
024    {
025        if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer))) 
026        {
027            return true;
028        }
029        if (this.riddenByEntity != null && this.riddenByEntity instanceof EntityPlayer && this.riddenByEntity != par1EntityPlayer)
030        {
031            return true;
032        }
033        else if (this.riddenByEntity != null && this.riddenByEntity != par1EntityPlayer)
034        {
035            return false;
036        }
037        else
038        {
039            if (!this.worldObj.isRemote)
040            {
041                par1EntityPlayer.mountEntity(this);
042            }
043
044            return true;
045        }
046    }
047
048    public int func_94087_l()
049    {
050        return 0;
051    }
052}