Buggy code:
public class EntityMachineModRideable extends Entity implements IInventory { public double velocity ; public float yaw ; protected ItemStack [ ] inventory ; public boolean shouldSendClientInvetoryUpdates = false ; public boolean isPlayerAccelerating = false ; public boolean isPlayerBreaking = false ; public boolean isPlayerTurningRight = false ; public boolean isPlayerTurningLeft = false ; public boolean isPlayerPushingSprintButton = false ; public boolean isPlayerPushingJumpButton = false ; public double TargetposX ; public double TargetposY ; public double TargetposZ ; public float TargetYaw ; public boolean isFristTick = true ; public double lastPosX = 0.0 ; public double lastPosY = 0.0 ; public double lastPosZ = 0.0 ; public float lastAttribute1 = 0.0F ; public int sendInterval = 0 ; public double maxSpeed = 0.2 ; public float Attribute1 ; public AxisAlignedBB BoundingBox ; protected double mountedOffsetY = 0.0 ; protected double mountedOffsetX = 0.0 ; protected double mountedOffsetZ = 0.0 ; protected float maxAngle = 0 ; protected float minAngle = 0 ; public double accelerationAmount = 0.02 ; protected Item droppedItem = null ; public int currentFuelLevel = 0 ; public int maxFuelLevel = 1000 ; public int runTimeTillNextFuelUsage = 20 ; public int maxRunTimeTillNextFuelUsage = 20 ; public EntityMachineModRideable ( World world ) { } public void clientInit ( ) { } public double getMaxVelocity ( ) { } @ Override public boolean canBeCollidedWith ( ) { } public Item getItemToBeDropped ( ) { } @ Override public boolean interactFirst ( EntityPlayer player ) { if ( ( ! ( worldObj . isRemote ) ) && ( ( riddenByEntity ) == null ) ) { <START_BUG> if ( ( ( player . getHeldItem ( ) . getItem ( ) ) == ( ModItems . fuelcan ) ) && ( ( player . getHeldItem ( ) . getItemDamage ( ) ) < ( player . getHeldItem ( ) . getMaxDamage ( ) ) ) ) { <END_BUG> if ( ( this . currentFuelLevel ) < ( maxFuelLevel ) ) { int amountInCan = ( player . getHeldItem ( ) . getMaxDamage ( ) ) - ( player . getHeldItem ( ) . getItemDamage ( ) ) ; int roomInEntityTank = ( this . maxFuelLevel ) - ( this . currentFuelLevel ) ; if ( amountInCan > roomInEntityTank ) { player . getHeldItem ( ) . setItemDamage ( ( ( player . getHeldItem ( ) . getMaxDamage ( ) ) - ( amountInCan - roomInEntityTank ) ) ) ; this . currentFuelLevel = this . maxFuelLevel ; } else { player . getHeldItem ( ) . setItemDamage ( player . getHeldItem ( ) . getMaxDamage ( ) ) ; this . currentFuelLevel = ( this . currentFuelLevel ) + amountInCan ; } } } else { if ( player . isSneaking ( ) ) { if ( ( getItemToBeDropped ( ) ) != null ) { this . dropItem ( getItemToBeDropped ( ) , 1 ) ; this . setDead ( ) ; } } else { player . mountEntity ( this ) ; } } } return true ; } @ Override public double getMountedYOffset ( ) { } public double getMountedXOffset ( ) { } public double getMountedZOffset ( ) { } public void updateServer ( ) { } public void updateClient ( ) { } @ Override @ SideOnly ( Side . CLIENT ) public void func_180426_a ( double p_70056_1_ , double p_70056_3_ , double p_70056_5_ , float p_70056_7_ , float p_70056_8_ , int p_70056_9_ , boolean bool ) { } @ Override public void onUpdate ( ) { } public void updateRiderPosition ( ) { } @ Override protected void entityInit ( ) { } @ Override protected void readEntityFromNBT ( NBTTagCompound compound ) { } @ Override protected void writeEntityToNBT ( NBTTagCompound compound ) { } public float getMaxAngle ( ) { } public float getMinAngle ( ) { } public double calcOffsetX ( double distance ) { } public double calcOffsetZ ( double distance ) { } public double calcOffsetX ( double distance , float rot ) { } public double calcOffsetZ ( double distance , float rot ) { } public double calcTwoOffsetX ( double distance , int secondOffsetAngle , double secondOffsetDistance ) { } public double calcTwoOffsetZ ( double distance , int secondOffsetAngle , double secondOffsetDistance ) { } public float clampAngelto360 ( float inAngle ) { } public void toppleTree ( BlockPos bp , int depth , int widthDepth , Block previousBlock ) { } protected ItemStack addToinventory ( ItemStack is ) { } @ Override public int getSizeInventory ( ) { } @ Override public ItemStack getStackInSlot ( int slot ) { } @ Override public void setInventorySlotContents ( int slot , ItemStack stack ) { } public void sendAllInventoryToPlayer ( EntityPlayerMP player ) { } @ Override public void markDirty ( ) { } @ Override public void openInventory ( EntityPlayer playerIn ) { } @ Override public void closeInventory ( EntityPlayer playerIn ) { } @ Override public boolean isItemValidForSlot ( int index , ItemStack stack ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer player ) { } @ Override public ItemStack decrStackSize ( int slot , int amt ) { } @ Override public ItemStack getStackInSlotOnClosing ( int slot ) { } @ Override public int getField ( int id ) { } @ Override public void setField ( int id , int value ) { } @ Override public int getFieldCount ( ) { } @ Override public void clear ( ) { } }

Fix:
if ( ( ( ( player . getHeldItem ( ) ) != null ) && ( ( player . getHeldItem ( ) . getItem ( ) ) == ( ModItems . fuelcan ) ) ) && ( ( player . getHeldItem ( ) . getItemDamage ( ) ) < ( player . getHeldItem ( ) . getMaxDamage ( ) ) ) ) {